From: James Thomas <jimjoe@gmx.net>
To: emacs-devel@gnu.org
Subject: Re: Thoughts on support for vc-diff unsaved buffer contents?
Date: Fri, 22 Nov 2024 05:34:02 +0530 [thread overview]
Message-ID: <86o728i171.fsf@gmx.net> (raw)
In-Reply-To: <68c0ce3e-8316-43db-8f3c-ead0ad028326@gmail.com> (Campbell Barton's message of "Fri, 22 Nov 2024 09:02:30 +1100")
Campbell Barton wrote:
> 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).
>
> ...
>
> so when saving: clang-format.el calculates the lines that differ from
> the working copy them formats them before saving.
>
> Currently it's necessary for clang-format.el to call git & diff
> directly, which makes the functionality limited to git. I was hoping
> this could be supported in a generic way that uses generic `vc` API's.
Isn't it enough to pipe vc-find-revision-no-save of vc-working-revision to
diff? (IIUYC)
--
next prev parent reply other threads:[~2024-11-22 0:04 UTC|newest]
Thread overview: 5+ 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 [this message]
2024-11-22 6:05 ` Alfred M. Szmidt
2024-11-22 7:44 ` Juri Linkov
2024-11-22 9:05 ` Campbell Barton
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=86o728i171.fsf@gmx.net \
--to=jimjoe@gmx.net \
--cc=emacs-devel@gnu.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).