* my search/paste idiom not supported in emacs
@ 2010-12-30 0:39 Perry Wagle
2010-12-30 9:39 ` Tassilo Horn
` (2 more replies)
0 siblings, 3 replies; 11+ messages in thread
From: Perry Wagle @ 2010-12-30 0:39 UTC (permalink / raw
To: help-gnu-emacs
In xemacs, if I double click on a word, the word is highlighted. If I then press control-s for search, and click the middle mouse button *without moving the mouse*, I will paste that word into the search string, and all is good.
Emacs, on the other hand, does not support this idiom. For some reason, the middle mouse button *ABORTS* the search mode, and then pastes the word under the mouse. Why would you want that?
This idiom alone has kept me using xemacs for over a decade. I'd like to switch to emacs now.
Can I fix this easily with option-setting, or does it require me to hack and add the correct behavior?
Any suggestions?
Thanks!
-- Perry
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: my search/paste idiom not supported in emacs
2010-12-30 0:39 my search/paste idiom not supported in emacs Perry Wagle
@ 2010-12-30 9:39 ` Tassilo Horn
2010-12-30 16:23 ` Perry Wagle
2010-12-30 10:01 ` Peter Dyballa
2010-12-30 15:36 ` Kenneth Goldman
2 siblings, 1 reply; 11+ messages in thread
From: Tassilo Horn @ 2010-12-30 9:39 UTC (permalink / raw
To: help-gnu-emacs
Perry Wagle <wagle@mac.com> writes:
Hi Perry,
> In xemacs, if I double click on a word, the word is highlighted. If I
> then press control-s for search, and click the middle mouse button
> *without moving the mouse*, I will paste that word into the search
> string, and all is good.
>
> Emacs, on the other hand, does not support this idiom. For some
> reason, the middle mouse button *ABORTS* the search mode, and then
> pastes the word under the mouse. Why would you want that?
Hm, middle mouse button is "paste the primary selection at this
position" in almost any X application.
> This idiom alone has kept me using xemacs for over a decade. I'd like
> to switch to emacs now.
>
> Can I fix this easily with option-setting, or does it require me to
> hack and add the correct behavior?
Simply add a keybinding for that:
--8<---------------cut here---------------start------------->8---
(define-key isearch-mode-map (kbd "<mouse-2>")
'isearch-yank-x-selection)
--8<---------------cut here---------------end--------------->8---
If you don't like how that expands the region (including highlighting),
then use something like that to deactivate the mark before:
--8<---------------cut here---------------start------------->8---
(define-key isearch-mode-map (kbd "<mouse-2>")
(lambda ()
(interactive)
(deactivate-mark)
(isearch-yank-x-selection)))
--8<---------------cut here---------------end--------------->8---
Bye,
Tassilo
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: my search/paste idiom not supported in emacs
2010-12-30 9:39 ` Tassilo Horn
@ 2010-12-30 16:23 ` Perry Wagle
0 siblings, 0 replies; 11+ messages in thread
From: Perry Wagle @ 2010-12-30 16:23 UTC (permalink / raw
To: Tassilo Horn; +Cc: help-gnu-emacs
[-- Attachment #1: Type: text/plain, Size: 1661 bytes --]
On Dec 30, 2010, at 1:39 AM, Tassilo Horn wrote:
> Perry Wagle <wagle@mac.com> writes:
>
> Hi Perry,
>
>> In xemacs, if I double click on a word, the word is highlighted. If I
>> then press control-s for search, and click the middle mouse button
>> *without moving the mouse*, I will paste that word into the search
>> string, and all is good.
>>
>> Emacs, on the other hand, does not support this idiom. For some
>> reason, the middle mouse button *ABORTS* the search mode, and then
>> pastes the word under the mouse. Why would you want that?
>
> Hm, middle mouse button is "paste the primary selection at this
> position" in almost any X application.
The position is the search function waiting for a string to look for.
>> This idiom alone has kept me using xemacs for over a decade. I'd like
>> to switch to emacs now.
>>
>> Can I fix this easily with option-setting, or does it require me to
>> hack and add the correct behavior?
>
> Simply add a keybinding for that:
>
> --8<---------------cut here---------------start------------->8---
> (define-key isearch-mode-map (kbd "<mouse-2>")
> 'isearch-yank-x-selection)
> --8<---------------cut here---------------end--------------->8---
>
> If you don't like how that expands the region (including highlighting),
> then use something like that to deactivate the mark before:
>
> --8<---------------cut here---------------start------------->8---
> (define-key isearch-mode-map (kbd "<mouse-2>")
> (lambda ()
> (interactive)
> (deactivate-mark)
> (isearch-yank-x-selection)))
> --8<---------------cut here---------------end--------------->8---
>
WIll try this, thanks!
-- Perry
[-- Attachment #2: Type: text/html, Size: 2815 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: my search/paste idiom not supported in emacs
2010-12-30 0:39 my search/paste idiom not supported in emacs Perry Wagle
2010-12-30 9:39 ` Tassilo Horn
@ 2010-12-30 10:01 ` Peter Dyballa
2010-12-30 16:26 ` Perry Wagle
2010-12-30 15:36 ` Kenneth Goldman
2 siblings, 1 reply; 11+ messages in thread
From: Peter Dyballa @ 2010-12-30 10:01 UTC (permalink / raw
To: Perry Wagle; +Cc: help-gnu-emacs
Am 30.12.2010 um 01:39 schrieb Perry Wagle:
> For some reason, the middle mouse button *ABORTS* the search mode,
> and then pastes the word under the mouse. Why would you want that?
Because it's consistent with X11: <down-mouse-2> or <mouse-2> insert
text.
Consider changing isearch-mode-map to remap which has
(define-key map [mouse-movement] nil)
;; People expect to be able to paste with the mouse.
(define-key map [mouse-2] #'isearch-mouse-2)
(define-key map [down-mouse-2] nil)
and which is defined in isearch.el.
--
Greetings
Pete
Ce qui été compris n'existe plus.
(Paul Eluard)
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: my search/paste idiom not supported in emacs
2010-12-30 10:01 ` Peter Dyballa
@ 2010-12-30 16:26 ` Perry Wagle
0 siblings, 0 replies; 11+ messages in thread
From: Perry Wagle @ 2010-12-30 16:26 UTC (permalink / raw
To: Peter Dyballa; +Cc: help-gnu-emacs
On Dec 30, 2010, at 2:01 AM, Peter Dyballa wrote:
>
> Am 30.12.2010 um 01:39 schrieb Perry Wagle:
>
>> For some reason, the middle mouse button *ABORTS* the search mode, and then pastes the word under the mouse. Why would you want that?
>
>
> Because it's consistent with X11: <down-mouse-2> or <mouse-2> insert text.
No, you are inserting the saved text into the search mode prompt, which is being *aborted* to provide the current behavior.
> Consider changing isearch-mode-map to remap which has
>
> (define-key map [mouse-movement] nil)
> ;; People expect to be able to paste with the mouse.
> (define-key map [mouse-2] #'isearch-mouse-2)
> (define-key map [down-mouse-2] nil)
>
> and which is defined in isearch.el.
I will try that, thanks!
-- Perry
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: my search/paste idiom not supported in emacs
2010-12-30 0:39 my search/paste idiom not supported in emacs Perry Wagle
2010-12-30 9:39 ` Tassilo Horn
2010-12-30 10:01 ` Peter Dyballa
@ 2010-12-30 15:36 ` Kenneth Goldman
2 siblings, 0 replies; 11+ messages in thread
From: Kenneth Goldman @ 2010-12-30 15:36 UTC (permalink / raw
To: help-gnu-emacs
[-- Attachment #1: Type: text/plain, Size: 673 bytes --]
> From: Perry Wagle <wagle@mac.com>
>
> In xemacs, if I double click on a word, the word is highlighted. If
> I then press control-s for search, and click the middle mouse button
> *without moving the mouse*, I will paste that word into the search
> string, and all is good.
>
> Emacs, on the other hand, does not support this idiom. For some
> reason, the middle mouse button *ABORTS* the search mode, and then
> pastes the word under the mouse. Why would you want that?
(You want C-w instead of middle mouse)
Try this idiom:
Put the cursor at the beginning of the work you want to search for
C-s C-w (more C-w 's paste more words into the search string
C-s ...
[-- Attachment #2: Type: text/html, Size: 1022 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
[parent not found: <mailman.4.1293700342.31316.help-gnu-emacs@gnu.org>]
* Re: my search/paste idiom not supported in emacs
[not found] <mailman.4.1293700342.31316.help-gnu-emacs@gnu.org>
@ 2010-12-30 9:35 ` Joost Kremers
2011-01-03 4:36 ` Stefan Monnier
1 sibling, 0 replies; 11+ messages in thread
From: Joost Kremers @ 2010-12-30 9:35 UTC (permalink / raw
To: help-gnu-emacs
Perry Wagle wrote:
> In xemacs, if I double click on a word, the word is highlighted. If I then
> press control-s for search, and click the middle mouse button *without moving
> the mouse*, I will paste that word into the search string, and all is good.
[...]
> Can I fix this easily with option-setting, or does it require me to hack and
> add the correct behavior?
perhaps you can use this instead:
(info "(emacs) Isearch Yank")
--
Joost Kremers joostkremers@yahoo.com
Selbst in die Unterwelt dringt durch Spalten Licht
EN:SiS(9)
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: my search/paste idiom not supported in emacs
[not found] <mailman.4.1293700342.31316.help-gnu-emacs@gnu.org>
2010-12-30 9:35 ` Joost Kremers
@ 2011-01-03 4:36 ` Stefan Monnier
2011-01-05 8:56 ` Perry Wagle
1 sibling, 1 reply; 11+ messages in thread
From: Stefan Monnier @ 2011-01-03 4:36 UTC (permalink / raw
To: help-gnu-emacs
> In xemacs, if I double click on a word, the word is highlighted. If I then
> press control-s for search, and click the middle mouse button *without
> moving the mouse*, I will paste that word into the search string, and all
> is good.
I recommend you M-x report-emacs-bug (which is also used for feature
requests). It seems reasonable to give mouse-2 the meaning of "insert
in the search string" rather than "insert in the current buffer".
Stefan
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: my search/paste idiom not supported in emacs
2011-01-03 4:36 ` Stefan Monnier
@ 2011-01-05 8:56 ` Perry Wagle
2011-02-09 3:33 ` Perry Wagle
0 siblings, 1 reply; 11+ messages in thread
From: Perry Wagle @ 2011-01-05 8:56 UTC (permalink / raw
To: Stefan Monnier; +Cc: help-gnu-emacs
Its now http://debbugs.gnu.org/cgi/bugreport.cgi?bug=7787
Thanks!
-- Perry
On Jan 2, 2011, at 8:36 PM, Stefan Monnier wrote:
>> In xemacs, if I double click on a word, the word is highlighted. If I then
>> press control-s for search, and click the middle mouse button *without
>> moving the mouse*, I will paste that word into the search string, and all
>> is good.
>
> I recommend you M-x report-emacs-bug (which is also used for feature
> requests). It seems reasonable to give mouse-2 the meaning of "insert
> in the search string" rather than "insert in the current buffer".
>
>
> Stefan
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: my search/paste idiom not supported in emacs
2011-01-05 8:56 ` Perry Wagle
@ 2011-02-09 3:33 ` Perry Wagle
2011-02-09 9:18 ` Gary
0 siblings, 1 reply; 11+ messages in thread
From: Perry Wagle @ 2011-02-09 3:33 UTC (permalink / raw
To: help-gnu-emacs
I'm starting now to work seriously on fixing this, and re-reading the previous responses, I'm not sure I was clear on the situation, and people didn't understand why there was a problem. So me fixing it wouldn't stick. Let me try again in hopes of achieving agreement:
In emacs, I double click on a word with mouse-1. This highlights it. If I then mouse-2, its pasted at the mouse cursor. No problem.
But if I double click on a word, highlighting it, and press control-S, this starts a "dialog" at the bottom of the screen where *what you type is captured* to give it text to search for. But if you then press mouse-2, the search mode is *aborted*, and the highlighted text is pasted at the mouse cursor.
I think the highlighted text should be pasted in the dialog at the bottom of the screen, which is already capturing keyboard events. Xemacs does it that way, and has been doing it for over a decade, and its very quick and natural.
Does anyone think emacs should work as it does now? Why would you want to have it abort the search mode? Why not capture mouse events the same as keyboard events?
Am I making more sense now?
-- Perry
On Jan 5, 2011, at 12:56 AM, Perry Wagle wrote:
> Its now http://debbugs.gnu.org/cgi/bugreport.cgi?bug=7787
>
> Thanks!
>
> -- Perry
>
>
> On Jan 2, 2011, at 8:36 PM, Stefan Monnier wrote:
>
>>> In xemacs, if I double click on a word, the word is highlighted. If I then
>>> press control-s for search, and click the middle mouse button *without
>>> moving the mouse*, I will paste that word into the search string, and all
>>> is good.
>>
>> I recommend you M-x report-emacs-bug (which is also used for feature
>> requests). It seems reasonable to give mouse-2 the meaning of "insert
>> in the search string" rather than "insert in the current buffer".
>>
>>
>> Stefan
>
>
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: my search/paste idiom not supported in emacs
2011-02-09 3:33 ` Perry Wagle
@ 2011-02-09 9:18 ` Gary
0 siblings, 0 replies; 11+ messages in thread
From: Gary @ 2011-02-09 9:18 UTC (permalink / raw
To: help-gnu-emacs
Perry Wagle wrote:
> In emacs, I double click on a word with mouse-1. This highlights it.
> If I then mouse-2, its pasted at the mouse cursor. No problem.
>
> But if I double click on a word, highlighting it, and press control-S,
> this starts a "dialog" at the bottom of the screen where *what you type
> is captured* to give it text to search for. But if you then press
> mouse-2, the search mode is *aborted*, and the highlighted text is
> pasted at the mouse cursor.
>
> I think the highlighted text should be pasted in the dialog at the
> bottom of the screen, which is already capturing keyboard events.
I think you're probably right. Could it be related to a thread I started
some months ago ("Yanking in isearch mode")? That whole area seems to
have some usability issues.
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2011-02-09 9:18 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-12-30 0:39 my search/paste idiom not supported in emacs Perry Wagle
2010-12-30 9:39 ` Tassilo Horn
2010-12-30 16:23 ` Perry Wagle
2010-12-30 10:01 ` Peter Dyballa
2010-12-30 16:26 ` Perry Wagle
2010-12-30 15:36 ` Kenneth Goldman
[not found] <mailman.4.1293700342.31316.help-gnu-emacs@gnu.org>
2010-12-30 9:35 ` Joost Kremers
2011-01-03 4:36 ` Stefan Monnier
2011-01-05 8:56 ` Perry Wagle
2011-02-09 3:33 ` Perry Wagle
2011-02-09 9:18 ` Gary
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.