GNU bug report logs - #16258
24.3.50;[PATCH] eww: Add new function of region-search.

Previous Next

Package: emacs;

Reported by: Kenjiro NAKAYAMA <nakayamakenjiro <at> gmail.com>

Date: Thu, 26 Dec 2013 03:13:01 UTC

Severity: wishlist

Tags: fixed, patch

Found in version 24.3.50

Fixed in version 25.1

Done: Lars Magne Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Kenjiro NAKAYAMA <nakayamakenjiro <at> gmail.com>
To: 16258 <at> debbugs.gnu.org
Subject: bug#16258: 24.3.50;[PATCH] eww: Add new function of region-search.
Date: Thu, 26 Dec 2013 12:11:49 +0900
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 <at> 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




This bug report was last modified 10 years and 186 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.