Permalink
Browse files

Improvements for using w3m

  • Loading branch information...
jwiegley committed Aug 15, 2012
1 parent a1df069 commit 5643613aa07e09532c9e013d227c7d11e43d0cb2
Showing with 14 additions and 1 deletion.
  1. +14 −1 init.el
View
15 init.el
@@ -3278,7 +3278,7 @@ FORM => (eval FORM)."
;;;_ , w3m
(use-package w3m
- :commands w3m-search
+ :commands (w3m-search w3m-find-file)
:bind (("C-. u" . w3m-browse-url)
("C-. U" . w3m-browse-url-new-session)
("C-. A-u" . w3m-browse-chrome-url-new-session))
@@ -3297,6 +3297,19 @@ FORM => (eval FORM)."
(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)
(interactive (list (read-string "Wikipedia search: " (word-at-point))))
(require 'w3m-search)

0 comments on commit 5643613

Please sign in to comment.