GNU bug report logs - #41410
Patch: Add function ffap-other-tab

Previous Next

Package: emacs;

Reported by: ej32u <at> protonmail.com

Date: Tue, 19 May 2020 21:47:01 UTC

Severity: wishlist

Tags: fixed, patch

Fixed in version 28.1

Done: Noam Postavsky <npostavs <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Stefan Kangas <stefankangas <at> gmail.com>
To: Juri Linkov <juri <at> linkov.net>, 41410 <at> debbugs.gnu.org
Cc: ej32u <at> protonmail.com
Subject: bug#41410: Patch: Add function ffap-other-tab
Date: Sun, 24 May 2020 15:26:31 -0700
Juri Linkov <juri <at> 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 <at> 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




This bug report was last modified 4 years and 364 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.