all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Andreas Röhler" <andreas.roehler@easy-emacs.de>
To: 36113@debbugs.gnu.org
Subject: bug#36113: 27.0.50; grep-find cursor position
Date: Thu, 6 Jun 2019 12:26:28 +0200	[thread overview]
Message-ID: <912dcda7-78eb-e085-6f10-f8b28fcc006c@easy-emacs.de> (raw)

[-- 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

             reply	other threads:[~2019-06-06 10:26 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-06 10:26 Andreas Röhler [this message]
2019-06-06 20:32 ` bug#36113: 27.0.50; grep-find cursor position 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=912dcda7-78eb-e085-6f10-f8b28fcc006c@easy-emacs.de \
    --to=andreas.roehler@easy-emacs.de \
    --cc=36113@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.