Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Improvements for using w3m

  • Loading branch information...
commit 5643613aa07e09532c9e013d227c7d11e43d0cb2 1 parent a1df069
@jwiegley authored
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
+(use-package w3m
:commands (w3m-search w3m-find-file)
:bind (("C-. u" . w3m-browse-url)
("C-. U" . w3m-browse-url-new-session)
@@ -3297,6 +3297,19 @@ FORM => (eval FORM)."
(add-hook 'w3m-mode-hook 'w3m-link-numbering-mode)
(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))))
Please sign in to comment.
Something went wrong with that request. Please try again.