Rely on webjump for dictionaries; zap CNTRL, since eww chokes on it
This commit is contained in:
parent
75e7f8b3f4
commit
ad5c15f5e6
21
README.org
21
README.org
@ -3639,21 +3639,6 @@ Listing [[lst:configure-browse-url]] configures =browse-url=.
|
|||||||
#+name: lst:configure-eww-urls
|
#+name: lst:configure-eww-urls
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
(when (fboundp 'eww-browse-url)
|
(when (fboundp 'eww-browse-url)
|
||||||
(defmacro defun-dictionary (name where how)
|
|
||||||
`(defun ,name (word)
|
|
||||||
,(format "Look up WORD at '%s' in Emacs." where)
|
|
||||||
(interactive
|
|
||||||
(list (if (use-region-p)
|
|
||||||
(buffer-substring (region-beginning) (region-end))
|
|
||||||
(read-string ,(format "Search '%s' for: " where)
|
|
||||||
(thing-at-point 'word)))))
|
|
||||||
(eww-browse-url (concat ,(format "%s%s" where how) word))))
|
|
||||||
|
|
||||||
(defun-dictionary eww-dict-en "www.thefreedictionary.com" "/")
|
|
||||||
(defun-dictionary eww-dict-fr "www.cntrl.fr" "/definition/")
|
|
||||||
(defun-dictionary eww-dict-nl "www.woorden.org" "/woord/")
|
|
||||||
(defun-dictionary eww-webster "webster-dictionary.org" "/definition/")
|
|
||||||
|
|
||||||
(defun eww-subreddit ()
|
(defun eww-subreddit ()
|
||||||
"Read a subreddit in Emacs."
|
"Read a subreddit in Emacs."
|
||||||
(interactive)
|
(interactive)
|
||||||
@ -3717,7 +3702,6 @@ initializes a list of =webjump-sites=.
|
|||||||
(custom-set-variables
|
(custom-set-variables
|
||||||
'(webjump-sites
|
'(webjump-sites
|
||||||
'(("CS 325 AI Programming" . "courses.cs.northwestern.edu/325")
|
'(("CS 325 AI Programming" . "courses.cs.northwestern.edu/325")
|
||||||
;; ("Emacs Git Repositories" . "savannah.gnu.org/git/?group=emacs")
|
|
||||||
("Emacs Git Repository" . "git.savannah.gnu.org/cgit/emacs.git")
|
("Emacs Git Repository" . "git.savannah.gnu.org/cgit/emacs.git")
|
||||||
("Emacs News" . "sachachua.com/blog/category/emacs-news")
|
("Emacs News" . "sachachua.com/blog/category/emacs-news")
|
||||||
("GNU ELPA Git Repository" . "git.savannah.gnu.org/cgit/emacs/elpa.git")
|
("GNU ELPA Git Repository" . "git.savannah.gnu.org/cgit/emacs/elpa.git")
|
||||||
@ -3730,8 +3714,9 @@ initializes a list of =webjump-sites=.
|
|||||||
("Counterpunch" . "www.counterpunch.org")
|
("Counterpunch" . "www.counterpunch.org")
|
||||||
("Dictionary EN" . [simple-query "thefreedictionary.com"
|
("Dictionary EN" . [simple-query "thefreedictionary.com"
|
||||||
"thefreedictionary.com/" ""])
|
"thefreedictionary.com/" ""])
|
||||||
("Dictionary FR" . [simple-query "www.cntrl.fr"
|
;; CNTRL refuses http, accepts https, and lets Eww hang.
|
||||||
"www.cntrl.fr/definition/" ""])
|
;; ("Dictionary FR" . [simple-query "www.cntrl.fr"
|
||||||
|
;; "https://www.cntrl.fr/definition/" ""])
|
||||||
("Dictionary NL" . [simple-query "www.woorden.org"
|
("Dictionary NL" . [simple-query "www.woorden.org"
|
||||||
"www.woorden.org/woord/" ""])
|
"www.woorden.org/woord/" ""])
|
||||||
("Dictionary Webster" . [simple-query
|
("Dictionary Webster" . [simple-query
|
||||||
|
Loading…
x
Reference in New Issue
Block a user