Skip to content

Commit

Permalink
Improvements for using w3m
Browse files Browse the repository at this point in the history
  • Loading branch information
jwiegley committed Aug 15, 2012
1 parent a1df069 commit 5643613
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion init.el
Expand Up @@ -3278,7 +3278,7 @@ FORM => (eval FORM)."
;;;_ , w3m ;;;_ , w3m


(use-package w3m (use-package w3m
:commands w3m-search :commands (w3m-search w3m-find-file)
:bind (("C-. u" . w3m-browse-url) :bind (("C-. u" . w3m-browse-url)
("C-. U" . w3m-browse-url-new-session) ("C-. U" . w3m-browse-url-new-session)
("C-. A-u" . w3m-browse-chrome-url-new-session)) ("C-. A-u" . w3m-browse-chrome-url-new-session))
Expand All @@ -3297,6 +3297,19 @@ FORM => (eval FORM)."


(autoload 'w3m-session-crash-recovery-remove "w3m-session") (autoload 'w3m-session-crash-recovery-remove "w3m-session")


(defun show-browser ()
(interactive)
(let ((w3m-buf
(catch 'found
(dolist (buf (buffer-list))
(if (string-match "\\*w3m" (buffer-name buf))
(throw 'found buf))))))
(if w3m-buf
(switch-to-buffer-other-window w3m-buf)
(call-interactively 'w3m-find-file))))

(bind-key "C-. w" 'show-browser)

(defun wikipedia-query (term) (defun wikipedia-query (term)
(interactive (list (read-string "Wikipedia search: " (word-at-point)))) (interactive (list (read-string "Wikipedia search: " (word-at-point))))
(require 'w3m-search) (require 'w3m-search)
Expand Down

0 comments on commit 5643613

Please sign in to comment.