all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#16258: 24.3.50;[PATCH] eww: Add new function of region-search.
@ 2013-12-26  3:11 Kenjiro NAKAYAMA
  2013-12-26 13:11 ` bug#16258: 24.3.50; [PATCH] " Kenjiro NAKAYAMA
                   ` (2 more replies)
  0 siblings, 3 replies; 22+ messages in thread
From: Kenjiro NAKAYAMA @ 2013-12-26  3:11 UTC (permalink / raw)
  To: 16258

I think the function to search the selected word withought any input is useful.
But it might be a good idea to set this function in .emacs.el or init.el by
users. So please judge this function should apply or reject.
I send the patch.

Signed-off-by: Kenjiro NAKAYAMA <nakayamakenjiro@gmail.com>

        * net/eww.el(eww-search-region): New function to search region.
        (eww-mode-map): New key map to eww-search-region.
          
---
 lisp/net/eww.el | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/lisp/net/eww.el b/lisp/net/eww.el
index 25309d1..f5ca8b1 100644
--- a/lisp/net/eww.el
+++ b/lisp/net/eww.el
@@ -433,6 +433,7 @@ word(s) will be searched for via `eww-search-prefix'."
     (define-key map "B" 'eww-list-bookmarks)
     (define-key map [(meta n)] 'eww-next-bookmark)
     (define-key map [(meta p)] 'eww-previous-bookmark)
+    (define-key map [(meta s)(meta s)] 'eww-search-region)
 
     (easy-menu-define nil map ""
       '("Eww"
@@ -1358,6 +1359,12 @@ Differences in #targets are ignored."
   (setq buffer-read-only t
 	truncate-lines t))
 
+;; Utilities
+
+(defun eww-search-region (&optional beg end)
+  (interactive "r")
+  (eww (buffer-substring beg end)))
+
 (provide 'eww)
 
 ;;; eww.el ends here
-- 
1.8.3.1





^ permalink raw reply related	[flat|nested] 22+ messages in thread

end of thread, other threads:[~2014-11-17 14:05 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-26  3:11 bug#16258: 24.3.50;[PATCH] eww: Add new function of region-search Kenjiro NAKAYAMA
2013-12-26 13:11 ` bug#16258: 24.3.50; [PATCH] " Kenjiro NAKAYAMA
2013-12-26 13:56 ` Lars Ingebrigtsen
2013-12-26 23:43   ` Kenjiro NAKAYAMA
2013-12-27  1:46     ` Lars Ingebrigtsen
2014-01-07 23:37       ` Ted Zlatanov
2014-11-10 21:41       ` Lars Magne Ingebrigtsen
2014-11-10 21:41       ` Lars Magne Ingebrigtsen
2014-11-11  1:36         ` Stefan Monnier
2014-11-11  1:36         ` Stefan Monnier
2014-11-11  2:42           ` Drew Adams
2014-11-11  2:42           ` Drew Adams
2014-11-15 20:10             ` Drew Adams
2014-11-15 20:11               ` Lars Magne Ingebrigtsen
2014-11-15 20:18                 ` Drew Adams
2014-11-15 20:11               ` Lars Magne Ingebrigtsen
2014-11-15 20:10             ` Drew Adams
2014-11-14  3:47 ` Lars Magne Ingebrigtsen
2014-11-14  3:49   ` Lars Magne Ingebrigtsen
2014-11-14 17:01   ` Stefan Monnier
2014-11-15 19:26     ` Lars Magne Ingebrigtsen
2014-11-17 14:05       ` Ted Zlatanov

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.