all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Juri Linkov <juri@linkov.net>
To: 41410@debbugs.gnu.org
Cc: ej32u@protonmail.com
Subject: bug#41410: Patch: Add function ffap-other-tab
Date: Mon, 25 May 2020 01:05:22 +0300	[thread overview]
Message-ID: <87d06tugyl.fsf@mail.linkov.net> (raw)
In-Reply-To: <87d06z8slz.fsf@mail.linkov.net> (Juri Linkov's message of "Wed,  20 May 2020 01:31:04 +0300")

>> 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.






  reply	other threads:[~2020-05-24 22:05 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-19 21:43 bug#41410: Patch: Add function ffap-other-tab ej32u--- via Bug reports for GNU Emacs, the Swiss army knife of text editors
2020-05-19 22:31 ` Juri Linkov
2020-05-24 22:05   ` Juri Linkov [this message]
2020-05-24 22:26     ` Stefan Kangas
2020-05-25  0:46       ` Noam Postavsky

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

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

  git send-email \
    --in-reply-to=87d06tugyl.fsf@mail.linkov.net \
    --to=juri@linkov.net \
    --cc=41410@debbugs.gnu.org \
    --cc=ej32u@protonmail.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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.