emacs-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[debbugs-tracker] bug#34972: closed ([PATCH] Use a different name for th


From: GNU bug Tracking System
Subject: [debbugs-tracker] bug#34972: closed ([PATCH] Use a different name for the help buffer in query-replace)
Date: Wed, 10 Apr 2019 20:52:03 +0000

Your message dated Wed, 10 Apr 2019 23:49:45 +0300
with message-id <address@hidden>
and subject line Re: bug#34972: [PATCH] Use a different name for the help 
buffer in query-replace
has caused the debbugs.gnu.org bug report #34972,
regarding [PATCH] Use a different name for the help buffer in query-replace
to be marked as done.

(If you believe you have received this mail in error, please contact
address@hidden)


-- 
34972: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=34972
GNU Bug Tracking System
Contact address@hidden with problems
--- Begin Message --- Subject: [PATCH] Use a different name for the help buffer in query-replace Date: Sun, 24 Mar 2019 13:40:11 +0100 User-agent: mu4e 0.9.18; emacs 27.0.50
Hi,

I use this to always display the *Help* buffer in the selected window,
or to reuse existing window displaying the same buffer:

  (add-to-list 'display-buffer-alist
               '("^\\*Help\\*$" . ((display-buffer-reuse-window
                                    display-buffer-same-window))))

With this, whenever I forget the keybindings available during
query-replace and hit '?' to get help, the help buffer is displayed in
the main window which shows the replacements to be performed.  When I
try to bury the help buffer with 'q', it doesn't do what I intended - it
quits the query-replace session.  The same thing happens when I try to
switch to the main window with 'C-x o' and manually kill the buffer.

The only thing that works really, is to enter recursive edit, kill the
help buffer and exit-recursive-edit.

This happens because the help buffer generated by perform-replace is
named "*Help*" and my display-buffer rule matches it.  I work around
this by adding an additional rule to display-buffer-alist which checks
if the help buffer was created by perform-replace.  It's ugly:

  (defun my//display-buffer-help-for-query-replace-condition (bufname action)
    (and (string-match-p "\\*Help\\*" bufname)
         (catch 'res
           (mapbacktrace (lambda (_evald func _args _flags)
                           (when (eq func 'perform-replace)
                             (throw 'res t)))))))
  (add-to-list 'display-buffer-alist
               '(my//display-buffer-help-for-query-replace-condition
                 . (display-buffer-pop-up-window)))


There are a couple of ways to improve behavior of perform-replace:

- Use a different name for the query-replace help buffer (patch attached)
- Make 'C-l' or some other key bury the help buffer, if it was displayed
  in the main window
- Make '?' toggle visibility of the help buffer
- Allow switching windows in query-replace
- Display the help message in the minibuffer

Attachment: 0001-Use-a-different-name-for-the-help-buffer-in-query-re.patch
Description: Patch


--
MichaƂ Krzywkowski
PGP: A5A7 06C4 28EF 8F64 2868 13A1 7BDE C129 F0B8 09A1

Attachment: signature.asc
Description: PGP signature


--- End Message ---
--- Begin Message --- Subject: Re: bug#34972: [PATCH] Use a different name for the help buffer in query-replace Date: Wed, 10 Apr 2019 23:49:45 +0300 User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu)
> Thanks for testing, Juri.
>
> Since the patch fixes the bug, will it be applied any time soon?

Thanks for the fix, now your patch is pushed to master.


--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]