unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Andrew Schwartzmeyer <andrew@schwartzmeyer.com>
To: 41633@debbugs.gnu.org
Cc: joaotavora@gmail.com
Subject: bug#41633: Prompts incorrect for multi-occur and multi-isearch when using fido-mode
Date: Sun, 31 May 2020 12:37:29 -0700	[thread overview]
Message-ID: <877C203C-84D6-4093-AC35-160A9FFCDF2D@schwartzmeyer.com> (raw)

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

When fido-mode is enabled, you need to use M-j to end the selection, not RET. This is similar to ido-mode, which was already special-cased for multi-occur and multi-isearch-buffers.

The attached patch fixes these two instances, however I’ve discovered two more bugs while testing it. For one, M-j does NOT work in multi-isearch-files, and I’m not sure why. It’s supposed to work; it works for the other two. So I didn’t update the prompt in that function (which, by the way is not special cased for ido-mode,

For two, the check for ido-mode is actually broken, but I don’t yet know how to fix it. It does (eq read-buffer-function #'ido-read-buffer), but actually nowadays (maybe this was different in the past), ido-mode doesn’t set read-buffer-function, unless you call ido-everywhere, and then it still doesn’t set it but overrides it with an advice, so that its value is #f(advice-wrapper :override nil ido-read-buffer), and this fails the eq test.

Anyway, I’d suggest applying this patch for now, and then figuring out how to fix the check for ido.

Thanks,

Andy


[-- Attachment #2: 0001-Fix-prompts-when-using-fido-mode.patch --]
[-- Type: application/octet-stream, Size: 2420 bytes --]

From 86c663ae22845a075cea9216a4a5e053e6c16c04 Mon Sep 17 00:00:00 2001
From: Andrew Schwartzmeyer <andrew@schwartzmeyer.com>
Date: Sun, 31 May 2020 11:56:01 -0700
Subject: [PATCH] Fix prompts when using fido-mode

When fido-mode is enabled, you need to use M-j to end the selection, not
RET. This is similar to ido-mode, which was already special-cased for
multi-occur and multi-isearch-buffers.
---
 lisp/misearch.el | 11 ++++++++---
 lisp/replace.el  | 11 ++++++++---
 2 files changed, 16 insertions(+), 6 deletions(-)

diff --git a/lisp/misearch.el b/lisp/misearch.el
index 958c10a1b..69ba77fea 100644
--- a/lisp/misearch.el
+++ b/lisp/misearch.el
@@ -237,9 +237,14 @@ set in `multi-isearch-buffers' or `multi-isearch-buffers-regexp'."
 	 (ido-ignore-item-temp-list bufs))
     (while (not (string-equal
 		 (setq buf (read-buffer
-			    (if (eq read-buffer-function #'ido-read-buffer)
-				"Next buffer to search (C-j to end): "
-			      "Next buffer to search (RET to end): ")
+			    (concat
+                             "Next buffer to search "
+                             (cond
+                              ((eq read-buffer-function #'ido-read-buffer)
+                               "(C-j to end): ")
+                              ((bound-and-true-p fido-mode)
+                               "(M-j to end): ")
+                              (t "(RET to end): ")))
 			    nil t))
 		 ""))
       (add-to-list 'bufs buf)
diff --git a/lisp/replace.el b/lisp/replace.el
index 69092c16f..8cd92d894 100644
--- a/lisp/replace.el
+++ b/lisp/replace.el
@@ -1585,9 +1585,14 @@ See also `multi-occur-in-matching-buffers'."
 	   (ido-ignore-item-temp-list bufs))
       (while (not (string-equal
 		   (setq buf (read-buffer
-			      (if (eq read-buffer-function #'ido-read-buffer)
-				  "Next buffer to search (C-j to end): "
-				"Next buffer to search (RET to end): ")
+			      (concat
+                               "Next buffer to search "
+                               (cond
+                                ((eq read-buffer-function #'ido-read-buffer)
+                                 "(C-j to end): ")
+                                ((bound-and-true-p fido-mode)
+                                 "(M-j to end): ")
+                                (t "(RET to end): ")))
 			      nil t))
 		   ""))
 	(cl-pushnew buf bufs)
-- 
2.26.0


             reply	other threads:[~2020-05-31 19:37 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-31 19:37 Andrew Schwartzmeyer [this message]
2020-05-31 20:57 ` bug#41633: Prompts incorrect for multi-occur and multi-isearch when using fido-mode João Távora
2020-06-01 22:49   ` Juri Linkov
2020-09-27 13:33     ` Lars Ingebrigtsen
2020-09-30 19:08       ` Juri Linkov
2020-10-01  1:03         ` Lars Ingebrigtsen
2020-10-04 19:31 ` Juri Linkov
2020-10-05  6:36   ` Lars Ingebrigtsen
2020-10-06 18:36     ` Juri Linkov

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=877C203C-84D6-4093-AC35-160A9FFCDF2D@schwartzmeyer.com \
    --to=andrew@schwartzmeyer.com \
    --cc=41633@debbugs.gnu.org \
    --cc=joaotavora@gmail.com \
    /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 public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).