GNU bug report logs -
#15839
24.3.50; `isearch-allow-scroll': be able to scroll point off screen temporarily
Previous Next
Reported by: Drew Adams <drew.adams <at> oracle.com>
Date: Fri, 8 Nov 2013 23:18:01 UTC
Severity: wishlist
Tags: fixed
Found in version 24.3.50
Fixed in version 27.1
Done: Juri Linkov <juri <at> linkov.net>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
>> Isn't this binding of shift-left and shift-right from Org mode?
>
> No, I simply have personal global bindings for these:
>
> (global-set-key [(shift left)] #'backward-char)
> (global-set-key [(shift right)] #'forward-char)
Your keybindings are related to cursor motion,
so it makes sense to allow them to work in isearch-mode.
One way to do this:
(define-key isearch-mode-map [(shift left)]
(lambda (&optional n)
(interactive "^p")
(setq isearch-pre-move-point (point))
(call-interactively 'backward-char)))
(define-key isearch-mode-map [(shift right)]
(lambda (&optional n)
(interactive "^p")
(setq isearch-pre-move-point (point))
(call-interactively 'forward-char)))
Or do you want to be able to put properties to allow a command, e.g.:
(put 'backward-char 'isearch-move 'enabled)
(put 'forward-char 'isearch-move 'enabled)
with such patch
diff --git a/lisp/isearch.el b/lisp/isearch.el
index dcd119a517..6b0d9f03af 100644
--- a/lisp/isearch.el
+++ b/lisp/isearch.el
@@ -2871,7 +2871,11 @@ isearch-pre-command-hook
(stringp (nth 1 (interactive-form this-command)))
(string-match-p "^^" (nth 1 (interactive-form this-command))))))
(and (eq isearch-yank-on-move 'shift)
- this-command-keys-shift-translated))
+ (or (and this-command-keys-shift-translated
+ (symbolp this-command)
+ (not (eq (get this-command 'isearch-move) 'disabled)))
+ (and (symbolp this-command)
+ (eq (get this-command 'isearch-move) 'enabled)))))
(setq this-command-keys-shift-translated nil)
(setq isearch-pre-move-point (point)))
;; Append control characters to the search string
I'm still not sure if this needed to be generalized more, and how far.
For example, I think that shift-left and shift-right
from org-mode should exit Isearch as well as windmove shift-keys
should exit Isearch and move focus to another window.
This bug report was last modified 6 years and 160 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.