GNU bug report logs -
#16258
24.3.50;[PATCH] eww: Add new function of region-search.
Previous Next
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.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 16258 in the body.
You can then email your comments to 16258 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#16258
; Package
emacs
.
(Thu, 26 Dec 2013 03:13:01 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Kenjiro NAKAYAMA <nakayamakenjiro <at> gmail.com>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Thu, 26 Dec 2013 03:13:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
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
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#16258
; Package
emacs
.
(Thu, 26 Dec 2013 13:12:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 16258 <at> debbugs.gnu.org (full text, mbox):
Sorr, since this is new functionality, I should have sent after the feature
freeze is over.
nakayamakenjiro <at> gmail.com writes:
> 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
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#16258
; Package
emacs
.
(Thu, 26 Dec 2013 14:03:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 16258 <at> debbugs.gnu.org (full text, mbox):
Kenjiro NAKAYAMA <nakayamakenjiro <at> gmail.com> writes:
> + (define-key map [(meta s)(meta s)] 'eww-search-region)
[...]
> +(defun eww-search-region (&optional beg end)
> + (interactive "r")
> + (eww (buffer-substring beg end)))
Hm... so this would just use the default search engine to search for
whatever is in the region? I'm not sure that that's a useful eww mode
command, but it might be a useful global command...
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog http://lars.ingebrigtsen.no/
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#16258
; Package
emacs
.
(Thu, 26 Dec 2013 23:44:02 GMT)
Full text and
rfc822 format available.
Message #14 received at 16258 <at> debbugs.gnu.org (full text, mbox):
> Hm... so this would just use the default search engine to search for
> whatever is in the region?
Yes, that's right. It is not big function, sorry...
> I'm not sure that that's a useful eww mode
> command, but it might be a useful global command...
Then, how about delete the key map and include the eww-search-region?
I want to know how much eww should provide its utilities like this function.
* delete
>> + (define-key map [(meta s)(meta s)] 'eww-search-region)
* remain
>> +(defun eww-search-region (&optional beg end)
>> + (interactive "r")
>> + (eww (buffer-substring beg end)))
Kenjiro
larsi <at> gnus.org writes:
> Kenjiro NAKAYAMA <nakayamakenjiro <at> gmail.com> writes:
>
>> + (define-key map [(meta s)(meta s)] 'eww-search-region)
>
> [...]
>
>> +(defun eww-search-region (&optional beg end)
>> + (interactive "r")
>> + (eww (buffer-substring beg end)))
>
> Hm... so this would just use the default search engine to search for
> whatever is in the region? I'm not sure that that's a useful eww mode
> command, but it might be a useful global command...
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#16258
; Package
emacs
.
(Fri, 27 Dec 2013 01:53:02 GMT)
Full text and
rfc822 format available.
Message #17 received at 16258 <at> debbugs.gnu.org (full text, mbox):
Kenjiro NAKAYAMA <nakayamakenjiro <at> gmail.com> writes:
>> I'm not sure that that's a useful eww mode
>> command, but it might be a useful global command...
>
> Then, how about delete the key map and include the eww-search-region?
> I want to know how much eww should provide its utilities like this function.
Emacs is in a feature freeze, but I think it sounds like a very useful
thing to be able to just set a point and mark in any buffer, hit
`M-s M-s', and then be presented with the eww search results. Others
will have to comment on the keystroke, though.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog http://lars.ingebrigtsen.no/
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#16258
; Package
emacs
.
(Tue, 07 Jan 2014 23:37:02 GMT)
Full text and
rfc822 format available.
Message #20 received at 16258 <at> debbugs.gnu.org (full text, mbox):
On Fri, 27 Dec 2013 02:46:20 +0100 Lars Ingebrigtsen <larsi <at> gnus.org> wrote:
LI> Kenjiro NAKAYAMA <nakayamakenjiro <at> gmail.com> writes:
>>> I'm not sure that that's a useful eww mode
>>> command, but it might be a useful global command...
>>
>> Then, how about delete the key map and include the eww-search-region?
>> I want to know how much eww should provide its utilities like this function.
LI> Emacs is in a feature freeze, but I think it sounds like a very useful
LI> thing to be able to just set a point and mark in any buffer, hit
LI> `M-s M-s', and then be presented with the eww search results. Others
LI> will have to comment on the keystroke, though.
I would use this happily. The default keystroke doesn't matter too
much: I'll probably use `F2' and I imagine most people will want it on a
single key. So please commit something like it after the feature freeze.
Ted
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#16258
; Package
emacs
.
(Mon, 10 Nov 2014 21:42:01 GMT)
Full text and
rfc822 format available.
Message #23 received at 16258 <at> debbugs.gnu.org (full text, mbox):
Lars Ingebrigtsen <larsi <at> gnus.org> writes:
> Kenjiro NAKAYAMA <nakayamakenjiro <at> gmail.com> writes:
>
>>> I'm not sure that that's a useful eww mode
>>> command, but it might be a useful global command...
>>
>> Then, how about delete the key map and include the eww-search-region?
>> I want to know how much eww should provide its utilities like this function.
>
> Emacs is in a feature freeze, but I think it sounds like a very useful
> thing to be able to just set a point and mark in any buffer, hit
> `M-s M-s', and then be presented with the eww search results. Others
> will have to comment on the keystroke, though.
Does anybody have an opinion on this feature? I think it sounds useful,
but I have no idea what global keystroke we would want to bind this to.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#16258
; Package
emacs
.
(Tue, 11 Nov 2014 01:37:01 GMT)
Full text and
rfc822 format available.
Message #26 received at 16258 <at> debbugs.gnu.org (full text, mbox):
> Does anybody have an opinion on this feature? I think it sounds useful,
> but I have no idea what global keystroke we would want to bind this to.
We have the M-s prefix specifically for search-related commands, so
there's a lot of key-binding room.
Stefan
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#16258
; Package
emacs
.
(Tue, 11 Nov 2014 02:43:02 GMT)
Full text and
rfc822 format available.
Message #29 received at 16258 <at> debbugs.gnu.org (full text, mbox):
> > Does anybody have an opinion on this feature? I think it sounds
> > useful,
> > but I have no idea what global keystroke we would want to bind
> > this to.
>
> We have the M-s prefix specifically for search-related commands, so
> there's a lot of key-binding room.
I have no opinion on the feature. But it should not be named `*-region-search'. It does not search the region (IIUC). It searches for the selected text.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#16258
; Package
emacs
.
(Fri, 14 Nov 2014 03:48:02 GMT)
Full text and
rfc822 format available.
Message #32 received at 16258 <at> debbugs.gnu.org (full text, mbox):
Kenjiro NAKAYAMA <nakayamakenjiro <at> gmail.com> writes:
> +(defun eww-search-region (&optional beg end)
> + (interactive "r")
> + (eww (buffer-substring beg end)))
This has now been tweaked slightly and bound globally to `M-s M-s'.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
Added tag(s) fixed.
Request was from
Lars Magne Ingebrigtsen <larsi <at> gnus.org>
to
control <at> debbugs.gnu.org
.
(Fri, 14 Nov 2014 03:48:03 GMT)
Full text and
rfc822 format available.
bug marked as fixed in version 25.1, send any further explanations to
16258 <at> debbugs.gnu.org and Kenjiro NAKAYAMA <nakayamakenjiro <at> gmail.com>
Request was from
Lars Magne Ingebrigtsen <larsi <at> gnus.org>
to
control <at> debbugs.gnu.org
.
(Fri, 14 Nov 2014 03:48:03 GMT)
Full text and
rfc822 format available.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#16258
; Package
emacs
.
(Fri, 14 Nov 2014 03:51:01 GMT)
Full text and
rfc822 format available.
Message #39 received at 16258 <at> debbugs.gnu.org (full text, mbox):
Lars Magne Ingebrigtsen <larsi <at> gnus.org> writes:
> Kenjiro NAKAYAMA <nakayamakenjiro <at> gmail.com> writes:
>
>> +(defun eww-search-region (&optional beg end)
>> + (interactive "r")
>> + (eww (buffer-substring beg end)))
>
> This has now been tweaked slightly and bound globally to `M-s M-s'.
Although perhaps something more should be done for Emacsen that doesn't
have eww available (i.e., without libxml2 support), but I don't know what.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#16258
; Package
emacs
.
(Fri, 14 Nov 2014 17:02:02 GMT)
Full text and
rfc822 format available.
Message #42 received at 16258 <at> debbugs.gnu.org (full text, mbox):
> This has now been tweaked slightly and bound globally to `M-s M-s'.
A binding in M-s, yes, but M-s M-s should be kept for a "very common
kind of search", and I'm not convinced "pass it to eww" is
common enough.
Stefan
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#16258
; Package
emacs
.
(Sat, 15 Nov 2014 19:28:02 GMT)
Full text and
rfc822 format available.
Message #45 received at 16258 <at> debbugs.gnu.org (full text, mbox):
Stefan Monnier <monnier <at> iro.umontreal.ca> writes:
>> This has now been tweaked slightly and bound globally to `M-s M-s'.
>
> A binding in M-s, yes, but M-s M-s should be kept for a "very common
> kind of search", and I'm not convinced "pass it to eww" is
> common enough.
Sure. Uhm... what would be a good mnemonic? `M-s M-w' for "web"? And
it's kinda easy to type.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#16258
; Package
emacs
.
(Sat, 15 Nov 2014 20:11:02 GMT)
Full text and
rfc822 format available.
Message #48 received at 16258 <at> debbugs.gnu.org (full text, mbox):
> it should not be named `*- region-search'. It does not
> search the region (IIUC). It searches for the selected text.
Again, please rename the command. The name is misleading.
The command neither searches the region nor searches for the
region (which would anyway be meaningless, from point).
It searches a buffer (I assume) for the text in the region.
People checking command names (via apropos commands or
completion matching, for example) looking for commands
that do something to the region can stumble on this.
(And people looking for a command that searches for the
selected text are unlikely to find it.)
A guess is that this was named by someone for whom
English is not the first language. "Search X" is not
the same as "search for X".
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#16258
; Package
emacs
.
(Sat, 15 Nov 2014 20:13:02 GMT)
Full text and
rfc822 format available.
Message #51 received at 16258 <at> debbugs.gnu.org (full text, mbox):
Drew Adams <drew.adams <at> oracle.com> writes:
>> it should not be named `*- region-search'. It does not
>> search the region (IIUC). It searches for the selected text.
>
> Again, please rename the command. The name is misleading.
It's not called that.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#16258
; Package
emacs
.
(Sat, 15 Nov 2014 20:20:02 GMT)
Full text and
rfc822 format available.
Message #54 received at 16258 <at> debbugs.gnu.org (full text, mbox):
> >> it should not be named `*- region-search'. It does not
> >> search the region (IIUC). It searches for the selected text.
> >
> > Again, please rename the command. The name is misleading.
>
> It's not called that.
Great.
(I just saw that this thread is cc'd to emacs-devel. Why?)
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#16258
; Package
emacs
.
(Mon, 17 Nov 2014 14:06:02 GMT)
Full text and
rfc822 format available.
Message #57 received at 16258 <at> debbugs.gnu.org (full text, mbox):
On Sat, 15 Nov 2014 20:26:56 +0100 Lars Magne Ingebrigtsen <larsi <at> gnus.org> wrote:
LMI> Stefan Monnier <monnier <at> iro.umontreal.ca> writes:
>>> This has now been tweaked slightly and bound globally to `M-s M-s'.
>>
>> A binding in M-s, yes, but M-s M-s should be kept for a "very common
>> kind of search", and I'm not convinced "pass it to eww" is
>> common enough.
LMI> Sure. Uhm... what would be a good mnemonic? `M-s M-w' for "web"? And
LMI> it's kinda easy to type.
That's good IMO.
Ted
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Tue, 16 Dec 2014 12:24:04 GMT)
Full text and
rfc822 format available.
This bug report was last modified 10 years and 183 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.