Remove eaf-open-buffer-url

master
Matthew 6 years ago
parent dc8d4ee551
commit dc8a9578ab
  1. 41
      eaf.el

@ -7,7 +7,7 @@
;; Copyright (C) 2018, Andy Stewart, all rights reserved.
;; Created: 2018-06-15 14:10:12
;; Version: 0.5
;; Last-Updated: Mon Jan 13 02:32:58 2020 (-0500)
;; Last-Updated: Mon Jan 13 02:37:04 2020 (-0500)
;; By: Mingde (Matthew) Zeng
;; URL: http://www.emacswiki.org/emacs/download/eaf.el
;; Keywords:
@ -879,14 +879,6 @@ of `eaf--buffer-app-name' inside the EAF buffer."
(rename-buffer title)
(throw 'find-buffer t))))))))
(dbus-register-signal
:session "com.lazycat.eaf" "/com/lazycat/eaf"
"com.lazycat.eaf" "open_buffer_url"
#'eaf-open-buffer-url)
(defun eaf-open-buffer-url (url)
(eaf-open-browser url))
(dbus-register-signal
:session "com.lazycat.eaf" "/com/lazycat/eaf"
"com.lazycat.eaf" "translate_text"
@ -1017,25 +1009,17 @@ In that way the corresponding function will be called to retrieve the HTML
(insert html))
(eaf-open file "browser" "temp_html_file")))
;;;###autoload
(defun eaf-google-it ()
"Google symbol or region string."
(interactive)
(let* ((current-symbol (if mark-active
(buffer-substring (region-beginning) (region-end))
(symbol-at-point)))
(search-string (read-string (format "[EAF/browser] Google (%s): " current-symbol))))
(if (string-blank-p search-string)
(when current-symbol
(eaf-open-browser (format "http://www.google.com/search?ie=utf-8&oe=utf-8&q=%s" current-symbol)))
(eaf-open-browser (format "http://www.google.com/search?ie=utf-8&oe=utf-8&q=%s" search-string)))))
;;;###autoload
(defun eaf-open-rss-reader ()
"Open EAF RSS Reader."
(interactive)
(eaf-open "RSS Reader" "rss-reader"))
(dbus-register-signal
:session "com.lazycat.eaf" "/com/lazycat/eaf"
"com.lazycat.eaf" "open_buffer_url"
#'eaf-open-browser)
;;;###autoload
(defun eaf-open-browser (url &optional arguments)
"Open EAF browser application given a URL and ARGUMENTS."
@ -1071,6 +1055,19 @@ This function works best if paired with a fuzzy search package."
(match-string 0 history))))
(eaf-open-browser history-url)))))
;;;###autoload
(defun eaf-google-it ()
"Google symbol or region string."
(interactive)
(let* ((current-symbol (if mark-active
(buffer-substring (region-beginning) (region-end))
(symbol-at-point)))
(search-string (read-string (format "[EAF/browser] Google (%s): " current-symbol))))
(if (string-blank-p search-string)
(when current-symbol
(eaf-open-browser (format "http://www.google.com/search?ie=utf-8&oe=utf-8&q=%s" current-symbol)))
(eaf-open-browser (format "http://www.google.com/search?ie=utf-8&oe=utf-8&q=%s" search-string)))))
;;;###autoload
(define-obsolete-function-alias 'eaf-open-url #'eaf-open-browser)

Loading…
Cancel
Save