From: Juri Linkov <juri@linkov.net>
To: Campbell Barton <ideasman42@gmail.com>
Cc: emacs-devel@gnu.org
Subject: Re: Thoughts on support for vc-diff unsaved buffer contents?
Date: Sat, 23 Nov 2024 19:58:18 +0200 [thread overview]
Message-ID: <87ttbxrfo9.fsf@mail.linkov.net> (raw)
In-Reply-To: <d7f7029c-e159-4f5b-b364-d161db3e6086@gmail.com> (Campbell Barton's message of "Fri, 22 Nov 2024 20:05:07 +1100")
>>> Hi, recently I've run into a situation where it's necessary to calculate
>>> modified line ranges without first saving the buffer (where "modified" is
>>> determined by a version control diff).
>>>
>>> I'm curious if this is something that might be supported - or, is already
>>> supported (although I'm fairly sure it's not).
>> 'diff-no-select' as well as 'multi-file-diff-no-select' accept
>> unsaved buffers as their arguments.
>
> Thanks for the suggestion.
>
> The part I'm not sure about regarding `diff-no-select' &
> `diff-buffer-with-file' is how they could work with version-control
> (vc-diff or a related functions).
>
> As far as I can see the diff needs to be generated by version-control
> (git/hg/svn etc) instead of a file - since the "original" file necessarily
> exist as a file on disk.
Probably there is no such existing function that uses vc-diff
(and one of the backend commands such as vc-git-diff)
on an unsaved working revision.
prev parent reply other threads:[~2024-11-23 17:58 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-21 22:02 Thoughts on support for vc-diff unsaved buffer contents? Campbell Barton
2024-11-22 0:04 ` James Thomas
2024-11-22 6:05 ` Alfred M. Szmidt
2024-11-22 7:44 ` Juri Linkov
2024-11-22 9:05 ` Campbell Barton
2024-11-23 17:58 ` Juri Linkov [this message]
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=87ttbxrfo9.fsf@mail.linkov.net \
--to=juri@linkov.net \
--cc=emacs-devel@gnu.org \
--cc=ideasman42@gmail.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 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).