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

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

bug#44611: Prefix arg for xref-goto-xref


From: Dmitry Gutov
Subject: bug#44611: Prefix arg for xref-goto-xref
Date: Wed, 17 Mar 2021 01:38:10 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.1

Hi Juri,

Sorry for the late response. I was hoping to have made some progress on resolving other issues touched in this thread before answering, but none so far.

On 16.03.2021 20:07, Juri Linkov wrote:

So since 'C-u M-g n' is already taken, an alternative is 'C-0 M-g n'.
If 'C-0' makes no sense for 'C-0 M-g n', it could be used to close the window.
Or maybe 'C-0 M-g n' still makes sense, e.g. to redisplay the current location?

I withdraw this proposal because it's easy to do this in the init file:

   (defun next-error-quit-window ()
     (when (and (eq current-prefix-arg 0)
                (not (eq next-error-last-buffer (current-buffer))))
       (let ((window (get-buffer-window next-error-last-buffer)))
         (when (window-live-p window)
           (with-selected-window window
             (quit-restore-window window))))))

   (add-hook 'next-error-hook 'next-error-quit-window)

Since next-error-hook is a defcustom, perhaps we can/should include this function as one of the advertised values in :type?

Even if we keep the list nil by default.

BTW, here are the commands that work like TAB in grep-mode.
I propose to install this patch, so at least users could bind them
in own init files:

Now pushed to master.

Looks good, of course.





reply via email to

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