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

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

bug#41410: Patch: Add function ffap-other-tab


From: Stefan Kangas
Subject: bug#41410: Patch: Add function ffap-other-tab
Date: Sun, 24 May 2020 15:26:31 -0700

Juri Linkov <juri@linkov.net> writes:

>>> Attached is a patch to add a function to open files at point in another
>>> tab. It is basically the same as the function ffap-other-window.
>>>
>>> +(defun ffap-other-tab (filename)
>>> +  "Like `ffap', but put buffer in another tab.
>>> +Only intended for interactive use."
>>> +  (interactive (list (ffap-prompter nil " other tab")))
>>> +  (pcase (save-window-excursion (find-file-at-point filename))
>>> +    ((or (and (pred bufferp) b) `(,(and (pred bufferp) b) . ,_))
>>> +     (switch-to-buffer-other-tab b))))
>>> +
>>>  (defun ffap--toggle-read-only (buffer-or-list)
>>>    (dolist (buffer (if (listp buffer-or-list)
>>>                   buffer-or-list
>>> @@ -2013,6 +2023,7 @@ ffap-bindings
>>>
>>>       (global-set-key [remap find-file-other-window] 'ffap-other-window)
>>>       (global-set-key [remap find-file-other-frame] 'ffap-other-frame)
>>> +     (global-set-key [remap find-file-other-tab] 'ffap-other-tab)
>>>       (global-set-key [remap find-file-read-only-other-window] 
>>> 'ffap-read-only-other-window)
>>>       (global-set-key [remap find-file-read-only-other-frame] 
>>> 'ffap-read-only-other-frame)
>>
>> Thanks, this is a useful addition.  Please push it to master.
>
> Maybe someone could check if this requires papers and
> could push it to master when I'm away from computer.

OK.

I could find no previous commit by ej32u@protonmail.com, and this patch
is only 11 lines.  I therefore believe we could safely install it as
Copyright-paperwork-exempt.  Unless anyone disagrees with that analysis,
I'll push this to master in the next couple of days.

Best regards,
Stefan Kangas





reply via email to

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