GNU bug report logs - #6232
Suggestion for isearch: in backward search yank to front of search string

Previous Next

Package: emacs;

Reported by: Lennart Borgman <lennart.borgman <at> gmail.com>

Date: Thu, 20 May 2010 16:10:03 UTC

Severity: wishlist

Tags: wontfix

Done: Glenn Morris <rgm <at> gnu.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 6232 in the body.
You can then email your comments to 6232 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#6232; Package emacs. (Thu, 20 May 2010 16:10:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Lennart Borgman <lennart.borgman <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Thu, 20 May 2010 16:10:03 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Lennart Borgman <lennart.borgman <at> gmail.com>
To: Emacs Bugs <bug-gnu-emacs <at> gnu.org>
Subject: Suggestion for isearch: in backward search yank to front of search 
	string
Date: Thu, 20 May 2010 18:09:12 +0200
Yanking to the end of the search string in isearh (i.e. C-w etc.) is
very practical. However I miss yanking to the front of the search
string.

My suggestion is to change the semantics a bit and yank to the front
of the search string when searching backwards. What do you think?




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#6232; Package emacs. (Fri, 21 May 2010 00:13:02 GMT) Full text and rfc822 format available.

Message #8 received at 6232 <at> debbugs.gnu.org (full text, mbox):

From: Juri Linkov <juri <at> jurta.org>
To: Lennart Borgman <lennart.borgman <at> gmail.com>
Cc: 6232 <at> debbugs.gnu.org
Subject: Re: bug#6232: Suggestion for isearch: in backward search yank to
	front of search string
Date: Fri, 21 May 2010 03:09:37 +0300
> Yanking to the end of the search string in isearh (i.e. C-w etc.) is
> very practical. However I miss yanking to the front of the search
> string.
>
> My suggestion is to change the semantics a bit and yank to the front
> of the search string when searching backwards. What do you think?

I think this would be wrong to do because C-w and all other yanking commands
always yank in the forward direction.

-- 
Juri Linkov
http://www.jurta.org/emacs/




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#6232; Package emacs. (Fri, 21 May 2010 01:19:02 GMT) Full text and rfc822 format available.

Message #11 received at 6232 <at> debbugs.gnu.org (full text, mbox):

From: Lennart Borgman <lennart.borgman <at> gmail.com>
To: Juri Linkov <juri <at> jurta.org>
Cc: 6232 <at> debbugs.gnu.org
Subject: Re: bug#6232: Suggestion for isearch: in backward search yank to 
	front of search string
Date: Fri, 21 May 2010 03:18:19 +0200
On Fri, May 21, 2010 at 2:09 AM, Juri Linkov <juri <at> jurta.org> wrote:
>> Yanking to the end of the search string in isearh (i.e. C-w etc.) is
>> very practical. However I miss yanking to the front of the search
>> string.
>>
>> My suggestion is to change the semantics a bit and yank to the front
>> of the search string when searching backwards. What do you think?
>
> I think this would be wrong to do because C-w and all other yanking commands
> always yank in the forward direction.

My suggestion to use the normal key bindings but let them act in the
reverse direction is based on reasoning like this:

1) There is a lack of key bindings in isearch-mode.

2) Using the same keybindings make them easy to remember.

3) It does seem rather logical that the yanking is done at the other
end when search direction is reversed.

4) Maybe more important: The marker in isearch that shows the
direction will be at the position where the yanking is done. Or at
least nearly. So the semantics is in a sense the same since yanking is
done forward from that marker.




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#6232; Package emacs. (Fri, 21 May 2010 08:28:02 GMT) Full text and rfc822 format available.

Message #14 received at 6232 <at> debbugs.gnu.org (full text, mbox):

From: Andreas Schwab <schwab <at> linux-m68k.org>
To: Lennart Borgman <lennart.borgman <at> gmail.com>
Cc: 6232 <at> debbugs.gnu.org
Subject: Re: bug#6232: Suggestion for isearch: in backward search yank to
	front of search string
Date: Fri, 21 May 2010 10:27:28 +0200
Lennart Borgman <lennart.borgman <at> gmail.com> writes:

> Yanking to the end of the search string in isearh (i.e. C-w etc.) is
> very practical. However I miss yanking to the front of the search
> string.
>
> My suggestion is to change the semantics a bit and yank to the front
> of the search string when searching backwards. What do you think?

Such a feature should definitely be on a separate key.

Andreas.

-- 
Andreas Schwab, schwab <at> linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#6232; Package emacs. (Fri, 21 May 2010 08:36:02 GMT) Full text and rfc822 format available.

Message #17 received at 6232 <at> debbugs.gnu.org (full text, mbox):

From: Andreas Schwab <schwab <at> linux-m68k.org>
To: Lennart Borgman <lennart.borgman <at> gmail.com>
Cc: Juri Linkov <juri <at> jurta.org>, 6232 <at> debbugs.gnu.org
Subject: Re: bug#6232: Suggestion for isearch: in backward search yank to
	front of search string
Date: Fri, 21 May 2010 10:34:58 +0200
Lennart Borgman <lennart.borgman <at> gmail.com> writes:

> 2) Using the same keybindings make them easy to remember.
>
> 3) It does seem rather logical that the yanking is done at the other
> end when search direction is reversed.

It would be totally confusing behaviour.  Normal characters are always
added at the end, so yanking should always behave the same.

Andreas.

-- 
Andreas Schwab, schwab <at> linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#6232; Package emacs. (Fri, 21 May 2010 09:55:02 GMT) Full text and rfc822 format available.

Message #20 received at 6232 <at> debbugs.gnu.org (full text, mbox):

From: Leo <sdl.web <at> gmail.com>
To: Andreas Schwab <schwab <at> linux-m68k.org>
Cc: Lennart Borgman <lennart.borgman <at> gmail.com>, 6232 <at> debbugs.gnu.org
Subject: Re: bug#6232: Suggestion for isearch: in backward search yank to
	front of search string
Date: Fri, 21 May 2010 10:54:36 +0100
On 2010-05-21 09:27 +0100, Andreas Schwab wrote:
> Lennart Borgman <lennart.borgman <at> gmail.com> writes:
>
>> Yanking to the end of the search string in isearh (i.e. C-w etc.) is
>> very practical. However I miss yanking to the front of the search
>> string.
>>
>> My suggestion is to change the semantics a bit and yank to the front
>> of the search string when searching backwards. What do you think?
>
> Such a feature should definitely be on a separate key.
>
> Andreas.

C-y is almost useless to me so I have done something like this:

(define-key isearch-mode-map [remap isearch-yank-line] 'isearch-yank-sexp)

(defun isearch-yank-sexp ()
  "Pull the sexp at point into search string."
  (interactive)
  (if (and isearch-just-started (bounds-of-thing-at-point 'sexp))
      (progn (goto-char (car (bounds-of-thing-at-point 'sexp)))
             (isearch-yank-string (thing-at-point 'sexp)))
    (isearch-yank-internal
     (lambda () (ignore-errors (forward-sexp 1)) (point)))))

Leo




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#6232; Package emacs. (Fri, 21 May 2010 18:32:02 GMT) Full text and rfc822 format available.

Message #23 received at 6232 <at> debbugs.gnu.org (full text, mbox):

From: Lennart Borgman <lennart.borgman <at> gmail.com>
To: Andreas Schwab <schwab <at> linux-m68k.org>
Cc: Juri Linkov <juri <at> jurta.org>, 6232 <at> debbugs.gnu.org
Subject: Re: bug#6232: Suggestion for isearch: in backward search yank to 
	front of search string
Date: Fri, 21 May 2010 20:31:12 +0200
On Fri, May 21, 2010 at 10:34 AM, Andreas Schwab <schwab <at> linux-m68k.org> wrote:
> Lennart Borgman <lennart.borgman <at> gmail.com> writes:
>
>> 2) Using the same keybindings make them easy to remember.
>>
>> 3) It does seem rather logical that the yanking is done at the other
>> end when search direction is reversed.
>
> It would be totally confusing behaviour.  Normal characters are always
> added at the end, so yanking should always behave the same.


I can see your point, but my gut feeling is perhaps not the same.

Also consider the 4th point I made:


> 4) Maybe more important: The marker in isearch that shows the
> direction will be at the position where the yanking is done. Or at
> least nearly. So the semantics is in a sense the same since yanking is
> done forward from that marker.


I any case I think it is important that the key sequences for adding
at the beginning and end of the search string are similar. There are 4
yank commands in isearch for adding at the end. How about adding shift
to these to add at the beginning?




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#6232; Package emacs. (Fri, 21 May 2010 21:10:03 GMT) Full text and rfc822 format available.

Message #26 received at 6232 <at> debbugs.gnu.org (full text, mbox):

From: Richard Stallman <rms <at> gnu.org>
To: Lennart Borgman <lennart.borgman <at> gmail.com>
Cc: juri <at> jurta.org, 6232 <at> debbugs.gnu.org
Subject: Re: bug#6232: Suggestion for isearch: in backward search yank to front
	of search string
Date: Fri, 21 May 2010 17:09:44 -0400
In backward search, self-inserting characters add to the end of the
search string.  To make yank add at the beginning would be
inconsistent and not useful.




Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#6232; Package emacs. (Fri, 21 May 2010 21:20:02 GMT) Full text and rfc822 format available.

Message #29 received at 6232 <at> debbugs.gnu.org (full text, mbox):

From: Lennart Borgman <lennart.borgman <at> gmail.com>
To: rms <at> gnu.org
Cc: juri <at> jurta.org, 6232 <at> debbugs.gnu.org
Subject: Re: bug#6232: Suggestion for isearch: in backward search yank to 
	front of search string
Date: Fri, 21 May 2010 23:19:22 +0200
On Fri, May 21, 2010 at 11:09 PM, Richard Stallman <rms <at> gnu.org> wrote:
> In backward search, self-inserting characters add to the end of the
> search string.  To make yank add at the beginning would be
> inconsistent


Both you and Andreas think that yanking at the beginning for backward
isearch is inconsistent.

If you both feel that way I tend to agree (since this is a usability problem).


> and not useful.


However if it is useful is a quite different thing. I have use cases
for it. I can't imagine that other people does not have it so I assume
this is not really what you (or Andreas) wanted to say.




Reply sent to Glenn Morris <rgm <at> gnu.org>:
You have taken responsibility. (Wed, 22 Feb 2012 02:43:02 GMT) Full text and rfc822 format available.

Notification sent to Lennart Borgman <lennart.borgman <at> gmail.com>:
bug acknowledged by developer. (Wed, 22 Feb 2012 02:43:03 GMT) Full text and rfc822 format available.

Message #34 received at 6232-done <at> debbugs.gnu.org (full text, mbox):

From: Glenn Morris <rgm <at> gnu.org>
To: 6232-done <at> debbugs.gnu.org
Subject: Re: bug#6232: Suggestion for isearch: in backward search yank to
	front of search string
Date: Tue, 21 Feb 2012 21:40:17 -0500
There was fairly strong opposition to this, so closing as "wontfix".




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 21 Mar 2012 11:24:08 GMT) Full text and rfc822 format available.

This bug report was last modified 13 years and 150 days ago.

Previous Next


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