* bug#10654: 24.0.93; isearch-yank-line moved from C-y
@ 2012-01-30 15:16 Aaron S. Hawley
2012-01-30 18:54 ` Glenn Morris
2012-01-30 22:59 ` Juri Linkov
0 siblings, 2 replies; 7+ messages in thread
From: Aaron S. Hawley @ 2012-01-30 15:16 UTC (permalink / raw)
To: 10654
I appreciate the new behavior of M-y in Isearch Mode. I find it more
satisfying, and less frustrating, to be able to access the full kill
ring.
I was surprised that the previously unsatisfying command M-y overwrote
the behavior of C-y in Isearch Mode. C-y had held the very useful
command of yanking the rest of the line into Isearch. I eat and
breathe Diff output and line-oriented source code, so I would use the
C-y command often to search similar text or compare text in the buffer
or across buffers. I use M-x diff or M-x compare-windows but Isearch
Mode can get the job done quicker in some cases.
I don't have any data to support that C-y is popular. I won't suggest
that the bindings for Isearch Mode are anywhere near sane. I recall I
was flummoxed by them at first. The bindings are diabolical for
beginners in most ways, but how did I learn them if they weren't
coherent? However, the new change is disruptive for existing users of
Emacs and after trying it for two weeks, I can confirm that putting
`isearch-yank-line' to the `M-s C-e' binding is unsatisfying (M-s C-k
makes more sense). Though, without any data maybe I'm the only person
who uses it and needs a short key binding?
The proposed bindings for 24.1 are:
(define-key isearch-mode-map "\C-y" 'isearch-yank-kill)
(define-key isearch-mode-map "\M-y" 'isearch-yank-pop)
(define-key isearch-mode-map "\M-s\C-e" 'isearch-yank-line)
I'd prefer to revert partially to:
(define-key isearch-mode-map "\C-y" 'isearch-yank-line)
(define-key isearch-mode-map "\M-y" 'isearch-yank-pop)
Or keep the proposed new bindings, but at least give a better binding
than M-s C-e for the old C-y. How about the shorter (and obvious)
key binding of C-k?
(define-key isearch-mode-map "\C-y" 'isearch-yank-kill)
(define-key isearch-mode-map "\M-y" 'isearch-yank-pop)
(define-key isearch-mode-map "\C-k" 'isearch-yank-line)
Thanks for Emacs,
aaron
--
In general, we reserve the right to have a poor
memory--the computer, however, is supposed to
remember! Poor computer. -- Guy Lewis Steele Jr.
^ permalink raw reply [flat|nested] 7+ messages in thread
* bug#10654: 24.0.93; isearch-yank-line moved from C-y
2012-01-30 15:16 bug#10654: 24.0.93; isearch-yank-line moved from C-y Aaron S. Hawley
@ 2012-01-30 18:54 ` Glenn Morris
2012-01-30 20:19 ` Aaron S. Hawley
2022-01-27 16:42 ` Lars Ingebrigtsen
2012-01-30 22:59 ` Juri Linkov
1 sibling, 2 replies; 7+ messages in thread
From: Glenn Morris @ 2012-01-30 18:54 UTC (permalink / raw)
To: Aaron S. Hawley; +Cc: 10654
"Aaron S. Hawley" wrote:
> I don't have any data to support that C-y is popular.
The weight of opinion seems to be against you.
http://debbugs.gnu.org/cgi/bugreport.cgi?bug=7700#11
I've always found the C-y binding in isearch "useless" and
counter-intuitive. I'd much rather make C-y and M-y behave like they
do in the minibuffer.
http://debbugs.gnu.org/cgi/bugreport.cgi?bug=8183#5
While I'm sure there's someone in the world who has a use for
searching for the entire next line, there are many, many more people
who find it useful to search for items from the kill ring.
http://lists.gnu.org/archive/html/emacs-devel/2008-11/msg00687.html
I was reluctant about it in the first place.
> I can confirm that putting `isearch-yank-line' to the `M-s C-e'
> binding is unsatisfying (M-s C-k makes more sense).
Here is the motivation:
http://lists.gnu.org/archive/html/emacs-devel/2008-11/msg00606.html
bind `isearch-yank-line' to `M-s C-e' because `move-end-of-line' is
on `C-e'.
> Though, without any data maybe I'm the only person who uses it and
> needs a short key binding?
[...]
> How about the shorter (and obvious) key binding of C-k?
[...]
> (define-key isearch-mode-map "\C-k" 'isearch-yank-line)
Personally I have no opinion.
^ permalink raw reply [flat|nested] 7+ messages in thread
* bug#10654: 24.0.93; isearch-yank-line moved from C-y
2012-01-30 18:54 ` Glenn Morris
@ 2012-01-30 20:19 ` Aaron S. Hawley
2012-02-03 17:48 ` Kevin Rodgers
2022-01-27 16:42 ` Lars Ingebrigtsen
1 sibling, 1 reply; 7+ messages in thread
From: Aaron S. Hawley @ 2012-01-30 20:19 UTC (permalink / raw)
To: Glenn Morris; +Cc: 10654
On 1/30/12, Glenn Morris <rgm@gnu.org> wrote:
> "Aaron S. Hawley" wrote:
>
>> I don't have any data to support that C-y is popular.
>
> The weight of opinion seems to be against you.
This is what I expected.
Thanks for tracking down the threads, Glenn.
It would seem the binding for hitting C-y in Isearch to yank the rest
of the line existed ever since Daniel LaLiberte wrote Isearch 20 years
ago. I guess its time has come. This means hitting C-k C-/ C-s C-y
rather than C-s C-y. I can relinquish that C-y in Isearch wasn't
consistent with global C-y in Emacs, but if word and character yanking
are on C-w and C-M-y, respectively, it seems like line-yanking should
be on a better binding than M-s C-e.
Thanks again,
aaron
> http://debbugs.gnu.org/cgi/bugreport.cgi?bug=7700#11
> I've always found the C-y binding in isearch "useless" and
> counter-intuitive. I'd much rather make C-y and M-y behave like they
> do in the minibuffer.
>
> http://debbugs.gnu.org/cgi/bugreport.cgi?bug=8183#5
> While I'm sure there's someone in the world who has a use for
> searching for the entire next line, there are many, many more people
> who find it useful to search for items from the kill ring.
>
> http://lists.gnu.org/archive/html/emacs-devel/2008-11/msg00687.html
> I was reluctant about it in the first place.
>
>> I can confirm that putting `isearch-yank-line' to the `M-s C-e'
>> binding is unsatisfying (M-s C-k makes more sense).
>
> Here is the motivation:
> http://lists.gnu.org/archive/html/emacs-devel/2008-11/msg00606.html
> bind `isearch-yank-line' to `M-s C-e' because `move-end-of-line' is
> on `C-e'.
--
In general, we reserve the right to have a poor
memory--the computer, however, is supposed to
remember! Poor computer. -- Guy Lewis Steele Jr.
^ permalink raw reply [flat|nested] 7+ messages in thread
* bug#10654: 24.0.93; isearch-yank-line moved from C-y
2012-01-30 20:19 ` Aaron S. Hawley
@ 2012-02-03 17:48 ` Kevin Rodgers
2012-02-04 0:17 ` Juri Linkov
0 siblings, 1 reply; 7+ messages in thread
From: Kevin Rodgers @ 2012-02-03 17:48 UTC (permalink / raw)
To: 10654
On 1/30/12 1:19 PM, Aaron S. Hawley wrote:
> It would seem the binding for hitting C-y in Isearch to yank the rest
> of the line existed ever since Daniel LaLiberte wrote Isearch 20 years
> ago. I guess its time has come. This means hitting C-k C-/ C-s C-y
> rather than C-s C-y. I can relinquish that C-y in Isearch wasn't
> consistent with global C-y in Emacs, but if word and character yanking
> are on C-w and C-M-y, respectively, it seems like line-yanking should
> be on a better binding than M-s C-e.
Or word and character yanking could be bound consistently: M-s M-f and M-s C-f
That approach would be a little less onerous if additional words or characters
could be added to the search string by additional M-f and C-f without prefixing
each with M-s.
--
Kevin Rodgers
Denver, Colorado, USA
^ permalink raw reply [flat|nested] 7+ messages in thread
* bug#10654: 24.0.93; isearch-yank-line moved from C-y
2012-02-03 17:48 ` Kevin Rodgers
@ 2012-02-04 0:17 ` Juri Linkov
0 siblings, 0 replies; 7+ messages in thread
From: Juri Linkov @ 2012-02-04 0:17 UTC (permalink / raw)
To: Kevin Rodgers; +Cc: 10654
> That approach would be a little less onerous if additional words or characters
> could be added to the search string by additional M-f and C-f without prefixing
> each with M-s.
If `C-k' for `isearch-yank-line' is not under consideration,
then I recommend to allow `M-s C-e C-e C-e ...' in 24.1
because `M-s C-e M-s C-e M-s C-e ...' is unusable.
This can be achieved with the patch below.
Other repeating key sequences `M-s M-f M-f M-f ...' and `M-s C-f C-f C-f ...'
could be implemented as well, but there is no urgent need for them now.
=== modified file 'lisp/isearch.el'
--- lisp/isearch.el 2012-02-01 00:21:17 +0000
+++ lisp/isearch.el 2012-02-04 00:17:07 +0000
@@ -533,6 +533,9 @@ (defvar minibuffer-local-isearch-map
map)
"Keymap for editing Isearch strings in the minibuffer.")
+(defvar isearch-repeat-key nil)
+(defvar isearch-repeat-command nil)
+
;; Internal variables declared globally for byte-compiler.
;; These are all set with setq while isearching
;; and bound locally while editing the search string.
@@ -1662,6 +1665,8 @@
(defun isearch-yank-line ()
"Pull rest of line from buffer into search string."
(interactive)
+ (setq isearch-repeat-key last-input-event
+ isearch-repeat-command 'isearch-yank-line)
(isearch-yank-internal
(lambda () (let ((inhibit-field-text-motion t))
(line-end-position (if (eolp) 2 1))))))
@@ -1962,8 +1967,13 @@ (defun isearch-other-meta-char (&optiona
(this-command-keys)))
(main-event (aref key 0))
(keylist (listify-key-sequence key))
+ (repeat-key isearch-repeat-key)
scroll-command isearch-point)
- (cond ((and (= (length key) 1)
+ (setq isearch-repeat-key nil)
+ (cond ((and (eq main-event repeat-key) isearch-repeat-command)
+ (setq isearch-repeat-key main-event)
+ (command-execute isearch-repeat-command))
+ ((and (= (length key) 1)
(let ((lookup (lookup-key local-function-key-map key)))
(not (or (null lookup) (integerp lookup)
(keymapp lookup)))))
^ permalink raw reply [flat|nested] 7+ messages in thread
* bug#10654: 24.0.93; isearch-yank-line moved from C-y
2012-01-30 18:54 ` Glenn Morris
2012-01-30 20:19 ` Aaron S. Hawley
@ 2022-01-27 16:42 ` Lars Ingebrigtsen
1 sibling, 0 replies; 7+ messages in thread
From: Lars Ingebrigtsen @ 2022-01-27 16:42 UTC (permalink / raw)
To: Glenn Morris; +Cc: 10654, Aaron S. Hawley
Glenn Morris <rgm@gnu.org> writes:
>> I don't have any data to support that C-y is popular.
>
> The weight of opinion seems to be against you.
(I'm going through old bug reports that unfortunately weren't resolved
at the time.)
I think the conclusion here is that we didn't want to change these key
bindings, so I'm closing this bug report.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
^ permalink raw reply [flat|nested] 7+ messages in thread
* bug#10654: 24.0.93; isearch-yank-line moved from C-y
2012-01-30 15:16 bug#10654: 24.0.93; isearch-yank-line moved from C-y Aaron S. Hawley
2012-01-30 18:54 ` Glenn Morris
@ 2012-01-30 22:59 ` Juri Linkov
1 sibling, 0 replies; 7+ messages in thread
From: Juri Linkov @ 2012-01-30 22:59 UTC (permalink / raw)
To: Aaron S. Hawley; +Cc: 10654
> (define-key isearch-mode-map "\C-k" 'isearch-yank-line)
To tell the truth, this is exactly what I currently use in .emacs.
`C-k' is a very convenient binding for `isearch-yank-line',
but I hesitated to propose it for adding to isearch.el
because I expect the opposition to that.
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2022-01-27 16:42 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-30 15:16 bug#10654: 24.0.93; isearch-yank-line moved from C-y Aaron S. Hawley
2012-01-30 18:54 ` Glenn Morris
2012-01-30 20:19 ` Aaron S. Hawley
2012-02-03 17:48 ` Kevin Rodgers
2012-02-04 0:17 ` Juri Linkov
2022-01-27 16:42 ` Lars Ingebrigtsen
2012-01-30 22:59 ` Juri Linkov
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.