From: Phil Sainty <psainty@orcon.net.nz>
To: Dmitry Gutov <dgutov@yandex.ru>,
Nathan Moreau <nathan.moreau@m4x.org>,
40967@debbugs.gnu.org
Subject: bug#40967: 27.0.50; vc-diff in indirect buffers
Date: Wed, 17 Jun 2020 00:08:40 +1200 [thread overview]
Message-ID: <5f6e0c6c-d699-d9ff-34f6-a8967fc84dfb@orcon.net.nz> (raw)
In-Reply-To: <4a643eda-2b72-857e-4d25-3b9bcbd1e086@yandex.ru>
On 30/04/20 6:13 am, Dmitry Gutov wrote:
> On 29.04.2020 21:01, Nathan Moreau wrote:
>> open any file-under-version-control
>> M-x clone-indirect-buffer
>> In the new buffer, run vc-diff fails with `vc-deduce-fileset:
>> Buffer [...] is not associated with a file`
>
> I'm not sure we really want to support that workflow. Or else
> a lot of commands would have to be changed the same way,
> inside and outside of VC.
>
> But opinions welcome.
FWIW, we did the same thing for `diff-buffer-with-file' quite
recently:
https://git.savannah.gnu.org/cgit/emacs.git/commit/?id=1bcf5d02da96784a04034b4c0aba8fdfa1413c4e
Personally I'd be ok with seeing piecemeal changes to commands
like these to enable certain common workflows to DTRT with
indirect buffers. I think there will likely be a subset of
commands which are of higher value than others, and so there
might not be such a vast number of things which are very useful
to change in practice. (Or maybe it's a slippery slope.)
Something like the following might be convenient:
(defun buffer-base-buffer-file-name (&optional buffer)
"Like `buffer-file-name', but also supporting indirect buffers."
(buffer-file-name
(or (buffer-base-buffer buffer) buffer (current-buffer))))
-Phil
next prev parent reply other threads:[~2020-06-16 12:08 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-29 18:01 bug#40967: 27.0.50; vc-diff in indirect buffers Nathan Moreau
2020-04-29 18:13 ` Dmitry Gutov
2020-06-16 12:08 ` Phil Sainty [this message]
2020-06-16 22:37 ` Dmitry Gutov
2020-07-01 0:19 ` Nathan Moreau
2020-07-09 21:47 ` Nathan Moreau
2020-10-01 17:56 ` Lars Ingebrigtsen
2020-10-02 0:27 ` Nathan Moreau
2020-10-03 17:33 ` Lars Ingebrigtsen
2020-10-03 18:32 ` Dmitry Gutov
2020-10-05 6:50 ` Lars Ingebrigtsen
2020-10-15 8:08 ` Richard Copley
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5f6e0c6c-d699-d9ff-34f6-a8967fc84dfb@orcon.net.nz \
--to=psainty@orcon.net.nz \
--cc=40967@debbugs.gnu.org \
--cc=dgutov@yandex.ru \
--cc=nathan.moreau@m4x.org \
/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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).