all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#36113: 27.0.50; grep-find cursor position
@ 2019-06-06 10:26 Andreas Röhler
  2019-06-06 20:32 ` Juri Linkov
  0 siblings, 1 reply; 7+ messages in thread
From: Andreas Röhler @ 2019-06-06 10:26 UTC (permalink / raw)
  To: 36113

[-- Attachment #1: Type: text/plain, Size: 355 bytes --]

Hi,

when running M-x grep-find the cursor is in minibuffer at EOL. In
order to insert the expression, cursor is needed before braces  - see png.

The patch attached shows an example how to provide this. There might
be more cases to consider.

Thanks,
Andreas

GNU Emacs 27.0.50 (build 1, i686-pc-linux-gnu, X toolkit, Xaw3d scroll 
bars) of 2019-06-04


[-- Attachment #2: grep-find-cursor.png --]
[-- Type: image/png, Size: 58564 bytes --]

[-- Attachment #3: grep-find.patch --]
[-- Type: text/x-patch, Size: 536 bytes --]

diff --git a/lisp/simple.el b/lisp/simple.el
index 6bc3bc5304..4bd29faabe 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -3330,7 +3330,8 @@ read-shell-command
       (lambda ()
         (shell-completion-vars)
 	(set (make-local-variable 'minibuffer-default-add-function)
-	     'minibuffer-default-add-shell-commands))
+	     'minibuffer-default-add-shell-commands)
+        (when (eq (char-before) ?+) (backward-char 5)))
     (apply 'read-from-minibuffer prompt initial-contents
 	   minibuffer-local-shell-command-map
 	   nil

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2020-08-22 14:27 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-06-06 10:26 bug#36113: 27.0.50; grep-find cursor position Andreas Röhler
2019-06-06 20:32 ` Juri Linkov
2019-06-07  5:37   ` Andreas Röhler
2019-06-21 10:18     ` Noam Postavsky
2019-06-21 10:33       ` Andreas Schwab
2019-06-21 11:20         ` Noam Postavsky
2020-08-22 14:27       ` Lars Ingebrigtsen

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.