From: "João Távora" <joaotavora@gmail.com>
To: Stefan Monnier <monnier@IRO.UMontreal.CA>
Cc: larsi@gnus.org, "Eli Zaretskii" <eliz@gnu.org>,
"Clément Pit-Claudel" <cpitclaudel@gmail.com>,
"Ted Zlatanov" <tzz@lifelogs.com>,
emacs-devel@gnu.org
Subject: Re: git history tracking across renames (and emacs support)
Date: Fri, 13 Jul 2018 00:33:37 +0100 [thread overview]
Message-ID: <87a7qwxc4u.fsf@gmail.com> (raw)
In-Reply-To: <jwvva9kcsoj.fsf-monnier+emacs@gnu.org> (Stefan Monnier's message of "Thu, 12 Jul 2018 12:59:08 -0400")
Stefan Monnier <monnier@IRO.UMontreal.CA> writes:
>>>> I wish there was a way to make these buffers without buffer-file-name and
>>>> still have vc collect the entries from them. Also, after committing, the
>>>> entries would actually be removed.
>>> How 'bout making C-x 4 a add entries directly to the *vc-log* buffer
>>> when there's one and there's no ChangeLog?
>> I though about that too, but how exactly you deal with multi-file
>> commits?
>
> Hmm... I'm missing something because I fail to see in what way this
> needs to be treated differently than the single-file case: `C-x 4 a`
> only adds a single entry, and you just call it on every relevant part
> of the code.
Yes, but imagine that you do that for a bunch of files, and then decide
only to commit a subset of those files. I guess I could discipline
myself to only add entries for whatever I'm about to commit (sometimes I
add entries for everything I've changed).
>>> Maybe another take on it is to use a "hidden" ChangeLog file, saved
>>> somewhere in ~/.emacs.d, indexed by the project location and with some
>>> way to recover some earlier commit message you worked on and had
>>> to abandon?
>> A single ChangeLog for all my C-x 4 a needs? Doesn't sound bad, too.
>> All that would be needed, I think, is to make log-edit-insert-changelog
>> fix the paths and refill the "paragraphs" when collecting entries.
>
> I'd think that the file names would already be project-relative when
> inserting them with `C-x 4 a`: log-edit-insert-changelog shouldn't have
> to mess with the message at all.
>
> More specifically, the suggestion is split into 2 parts:
> - a feature for vc-log that lets you save a commit message in a file (in
> ~/.emacs.d, but indexed by the project). When erasing a *vc-log*
> buffer, I'd probably want the previous message to be automatically be
> stashed into that file. This would be commit-message-format-agnostic,
> hence not directly related to change-log-mode.
> - a new feature of add-log.el which lets you use a vc-log buffer (using
> the slightly different format expected there) instead of the
> ChangeLog file.
Apart from my comment above, I could probably learn to work with that.
But I had something potentially simpler in mind. It's very similar to
the current operation. In this version the file-backed ChangeLog stays
put, but there's only one for every project, this should ease some of
the pain:
1. change-log-default-name is set to something very near the top of the
file hierarchy, say ~/.emacs.d/UeberChangeLog
2. C-x 4 a is used as usual, but because of point 1, a much longer file
path gets inserted in the file, like
* ../Source/Emacs/emacs-master/lisp/jsonrpc.el (jsonrpc--lambda): what
thingy
This is working fine currently.
3. After vc-next-action in project dir, C-c C-a inserts the entries
This doesn't at all work currently if the ChangeLog is higher up in
the hierarchy than the vc-log buffer's default-directly.
The paths would need fixing to make them relative to project's
root. The paragraphs would need refilling. The entry above would
become
* lisp/jsonrpc.el (jsonrpc--lambda): what thingy
4. Optionally, C-c C-a would set local variables in the vc-log buffer
that are markers in ~/.emacs.d/UeberChangeLog. When the user presses
C-c C-c the region is deleted (or somehow disabled) in that file.
>> It leaves me with the multiple-commit-per-day-per-file problem. I think
>> the entries copied to the vc-log buffer by `log-edit-insert-changelog'
>> could be deleted from that file when you C-c C-c (log-edit-done).
>
> I often re-use some old commit message, so I think I'd rather rely on
> a better UI to choose which message to use than on actual deletion of
> messages we think are unlikely to be useful.
>
> IOW I think the "multiple-commit-per-day-per-file problem" needs to be
> solved by looking more carefully at what happens (e.g. the operation
> to fetch a previous commit message would likely first give you the most
> recently added message, which should usually be the right choice, no?).
>
> I suspect in your case, the issue with "the
> multiple-commit-per-day-per-file problem" is simply that add-log.el
> doesn't know where one entry stops and the other starts (and you can
> "solve" it by explicitly adding a "<DATE> <NAME> <EMAIL>" line to
> separate them), but in the model suggested above, each entry would be
> naturally separated, so I think the problem wouldn't show up at all.
I didn't understand this part. Maybe I need to see it in action.
Generally there's no way of knowing what delimits "the changes I want to
commit now" from other changes without using the actual commit action as
a boundary.
João
next prev parent reply other threads:[~2018-07-12 23:33 UTC|newest]
Thread overview: 232+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-15 7:39 bug#28842: gnus-sync is missing Andreas Schwab
2017-12-09 19:58 ` Ted Zlatanov
2017-12-10 11:37 ` Andreas Schwab
2017-12-10 13:15 ` Ted Zlatanov
2017-12-10 13:41 ` Andreas Schwab
2017-12-11 14:57 ` Ted Zlatanov
2017-12-11 15:40 ` Andreas Schwab
2017-12-11 15:49 ` Ted Zlatanov
2017-12-11 15:51 ` Andreas Schwab
2017-12-11 22:37 ` Richard Stallman
2017-12-12 17:15 ` Ted Zlatanov
2017-12-12 22:08 ` Richard Stallman
2017-12-12 23:41 ` Ted Zlatanov
2017-12-15 21:26 ` The name gnus-cloud.el Richard Stallman
2017-12-16 22:34 ` Ted Zlatanov
2017-12-17 22:22 ` Richard Stallman
2017-12-17 22:31 ` Lars Ingebrigtsen
2017-12-17 22:57 ` Eric Abrahamsen
2017-12-18 21:15 ` Richard Stallman
2017-12-17 23:20 ` Stephen Berman
2017-12-18 21:17 ` Richard Stallman
2017-12-17 23:06 ` Stefan Monnier
2017-12-18 0:33 ` Ted Zlatanov
2017-12-18 3:31 ` Eli Zaretskii
2017-12-18 21:16 ` Richard Stallman
2017-12-19 3:37 ` Eli Zaretskii
2017-12-21 16:50 ` Richard Stallman
2017-12-21 17:13 ` Eli Zaretskii
2017-12-22 18:47 ` Richard Stallman
2017-12-22 18:57 ` Eli Zaretskii
2017-12-22 19:20 ` Eli Zaretskii
2017-12-23 14:58 ` Richard Stallman
2017-12-23 15:04 ` Eli Zaretskii
2017-12-24 20:34 ` Richard Stallman
2017-12-25 16:06 ` Eli Zaretskii
2017-12-25 22:27 ` Paul Eggert
2017-12-26 19:40 ` Richard Stallman
2018-07-10 13:16 ` Ted Zlatanov
2017-12-24 20:34 ` Richard Stallman
2017-12-25 16:09 ` Eli Zaretskii
2017-12-31 16:27 ` Steinar Bang
2017-12-31 16:54 ` Eli Zaretskii
2017-12-31 18:12 ` Óscar Fuentes
2017-12-31 18:26 ` Eli Zaretskii
2018-01-01 0:48 ` Steinar Bang
2018-01-01 4:40 ` Eli Zaretskii
2017-12-31 18:27 ` Andreas Schwab
2018-01-01 1:05 ` Steinar Bang
2018-01-01 4:42 ` Eli Zaretskii
2018-01-01 10:07 ` git history tracking across renames (and emacs support) (Was: The name gnus-cloud.el) Steinar Bang
2018-01-01 10:59 ` git history tracking across renames (and emacs support) Andreas Schwab
2018-01-01 21:40 ` Steinar Bang
2018-01-01 11:00 ` Andreas Schwab
2018-01-01 21:37 ` Steinar Bang
2018-01-01 11:06 ` Andreas Schwab
2018-01-01 21:36 ` Steinar Bang
2018-01-01 21:59 ` Andreas Schwab
2018-01-01 22:42 ` Steinar Bang
2018-01-01 22:04 ` Óscar Fuentes
2018-01-01 22:45 ` Noam Postavsky
2018-01-02 0:02 ` Óscar Fuentes
2018-01-02 1:15 ` git history tracking across renames (and emacs support) (Was: The name gnus-cloud.el) Richard Stallman
2018-01-02 8:06 ` Paul Eggert
2018-01-02 8:49 ` git history tracking across renames (and emacs support) Lars Ingebrigtsen
2018-07-10 13:14 ` Ted Zlatanov
2018-07-10 15:05 ` Marcin Borkowski
2018-07-10 15:36 ` Eli Zaretskii
2018-07-10 20:54 ` Ted Zlatanov
2018-07-10 23:04 ` Basil L. Contovounesios
2018-07-11 3:32 ` Eli Zaretskii
2018-07-11 3:53 ` Stefan Monnier
2018-07-11 4:44 ` Marcin Borkowski
2018-07-11 8:22 ` Eli Zaretskii
2018-07-11 13:54 ` git history tracking across renames (and emacs support), Re: git history tracking across renames (and emacs support), Re: git history tracking across renames (and emacs support), " Ted Zlatanov
2018-07-11 15:42 ` Eli Zaretskii
2018-07-11 16:09 ` Clément Pit-Claudel
2018-07-11 17:13 ` Eric Abrahamsen
2018-07-11 22:50 ` Richard Stallman
2018-07-11 23:04 ` Noam Postavsky
2018-07-12 23:35 ` Richard Stallman
2018-07-13 20:13 ` Jonas Bernoulli
2018-07-14 7:05 ` Eli Zaretskii
2018-07-11 17:31 ` Ted Zlatanov
2018-07-11 18:13 ` Eli Zaretskii
2018-07-11 20:14 ` Paul Eggert
2018-07-11 22:36 ` João Távora
2018-07-12 2:42 ` Eli Zaretskii
2018-07-12 9:04 ` João Távora
2018-07-12 13:48 ` Eli Zaretskii
2018-07-12 16:26 ` João Távora
2018-07-12 16:38 ` Eli Zaretskii
2018-07-12 16:47 ` João Távora
2018-07-12 16:59 ` Eli Zaretskii
2018-07-12 16:40 ` Stefan Monnier
2018-07-12 16:56 ` João Távora
2018-07-12 17:01 ` Eli Zaretskii
2018-07-12 19:37 ` Ted Zlatanov
2018-07-13 6:16 ` Eli Zaretskii
2018-07-12 17:17 ` Stefan Monnier
2018-07-12 23:12 ` João Távora
2018-07-13 18:47 ` Stefan Monnier
2018-07-14 17:36 ` [PATCH] New option to make C-x 4 a use file-less ChangeLog buffers (was Re: git history tracking across renames (and emacs support)) João Távora
2018-07-15 5:33 ` [PATCH] New option to make C-x 4 a use file-less ChangeLog buffers Basil L. Contovounesios
2018-07-15 10:41 ` João Távora
2018-07-15 14:11 ` Basil L. Contovounesios
2018-07-16 2:15 ` [PATCH] New option to make C-x 4 a use file-less ChangeLog buffers (was Re: git history tracking across renames (and emacs support)) Stefan Monnier
2018-07-16 10:10 ` João Távora
2018-07-16 12:33 ` Stefan Monnier
2018-07-16 14:02 ` João Távora
2018-07-16 15:44 ` Stefan Monnier
2018-07-16 18:00 ` João Távora
2018-07-16 18:22 ` Stefan Monnier
2018-07-16 18:50 ` João Távora
2018-07-16 21:09 ` Stefan Monnier
2018-07-21 10:45 ` Eli Zaretskii
2018-07-16 15:50 ` Eli Zaretskii
2018-07-16 23:02 ` João Távora
2018-07-21 10:42 ` Eli Zaretskii
2018-07-21 13:02 ` João Távora
2018-07-21 13:30 ` Eli Zaretskii
2018-07-21 15:08 ` João Távora
2018-07-21 16:13 ` Eli Zaretskii
2018-10-08 1:10 ` Ted Zlatanov
2018-10-08 1:31 ` João Távora
2018-07-12 13:36 ` git history tracking across renames (and emacs support) Stefan Monnier
2018-07-12 15:53 ` Basil L. Contovounesios
2018-07-12 16:00 ` Stefan Monnier
2018-07-12 16:48 ` Robert Pluim
2018-07-12 17:03 ` Stefan Monnier
2018-07-12 20:01 ` Robert Pluim
2018-07-12 20:06 ` Stefan Monnier
2018-07-12 20:28 ` Robert Pluim
2018-07-13 3:46 ` Stefan Monnier
2018-07-13 8:18 ` Robert Pluim
2018-07-13 12:16 ` Stefan Monnier
2018-07-13 13:07 ` Robert Pluim
2018-07-13 15:29 ` Clément Pit-Claudel
2018-07-13 15:49 ` Stefan Monnier
2018-07-12 16:40 ` João Távora
2018-07-12 16:59 ` Stefan Monnier
2018-07-12 23:33 ` João Távora [this message]
2018-07-13 18:55 ` Stefan Monnier
2018-07-13 19:45 ` João Távora
2018-07-13 20:33 ` Stefan Monnier
2018-07-11 17:08 ` Radon Rosborough
2018-07-11 17:56 ` Paul Eggert
2018-07-11 18:10 ` Eli Zaretskii
2018-07-11 22:51 ` Richard Stallman
2018-07-12 14:10 ` Eli Zaretskii
2018-07-11 22:51 ` Richard Stallman
2018-07-12 19:46 ` Ted Zlatanov
2018-07-12 23:03 ` Paul Eggert
2018-07-12 23:39 ` Richard Stallman
2018-07-11 18:25 ` Eli Zaretskii
2018-07-12 17:03 ` Radon Rosborough
2018-07-12 17:37 ` Eli Zaretskii
2018-07-13 4:33 ` Radon Rosborough
2018-07-13 8:14 ` Eli Zaretskii
2018-07-13 14:15 ` Paul Eggert
2018-07-13 14:39 ` Eli Zaretskii
2018-07-13 16:39 ` Stefan Monnier
2018-07-13 23:11 ` Richard Stallman
2018-07-14 6:58 ` Commit header lines (was: git history tracking across renames (and emacs support)) Eli Zaretskii
2018-07-14 16:09 ` Paul Eggert
2018-07-14 16:23 ` Eli Zaretskii
2018-07-14 21:57 ` Paul Eggert
2018-07-12 19:42 ` git history tracking across renames (and emacs support) Ted Zlatanov
2018-07-13 6:16 ` Eli Zaretskii
2018-01-02 16:15 ` git history tracking across renames (and emacs support) (Was: The name gnus-cloud.el) Eli Zaretskii
2018-01-03 2:50 ` Paul Eggert
2018-01-03 3:24 ` git history tracking across renames (and emacs support) Stefan Monnier
2018-01-03 15:36 ` Eli Zaretskii
2018-01-03 18:20 ` Stefan Monnier
2018-01-03 18:56 ` Eli Zaretskii
2018-01-03 20:17 ` Stefan Monnier
2018-01-03 20:43 ` Eli Zaretskii
2018-01-03 22:02 ` Stefan Monnier
2018-01-04 3:33 ` Eli Zaretskii
2018-01-04 5:00 ` Stefan Monnier
2018-01-04 6:39 ` Eli Zaretskii
2018-01-04 8:03 ` Paul Eggert
2018-01-04 14:25 ` Stefan Monnier
2018-01-04 16:13 ` Eli Zaretskii
2018-01-04 13:15 ` Dmitry Gutov
2018-01-05 3:51 ` Stefan Monnier
2018-01-03 18:29 ` Alan Mackenzie
2018-01-03 22:45 ` Stefan Monnier
2018-01-04 12:02 ` Alan Mackenzie
2018-01-04 18:05 ` Stefan Monnier
2018-01-03 15:32 ` git history tracking across renames (and emacs support) (Was: The name gnus-cloud.el) Eli Zaretskii
2018-01-03 20:11 ` git history tracking across renames (and emacs support) Stefan Monnier
2018-01-03 16:42 ` Stephen Leake
2018-01-04 11:46 ` Richard Stallman
2018-01-03 3:08 ` git history tracking across renames (and emacs support) (Was: The name gnus-cloud.el) Richard Stallman
2018-01-03 3:28 ` git history tracking across renames (and emacs support) Stefan Monnier
2018-01-08 2:16 ` git history tracking across renames (and emacs support) (Was: The name gnus-cloud.el) Richard Stallman
2018-01-08 4:22 ` Paul Eggert
2018-01-08 18:30 ` Eli Zaretskii
2018-01-08 18:41 ` Paul Eggert
2018-01-08 19:13 ` Eli Zaretskii
2018-01-08 19:29 ` Paul Eggert
2018-01-08 21:08 ` Eli Zaretskii
2018-01-09 2:55 ` Richard Stallman
2018-01-09 7:27 ` Paul Eggert
2018-01-10 3:03 ` Richard Stallman
2018-01-10 8:22 ` Paul Eggert
2018-01-10 15:32 ` Eli Zaretskii
2018-01-11 22:08 ` git history tracking across renames (and emacs support) Stefan Monnier
2018-01-12 8:21 ` Eli Zaretskii
2018-01-13 2:33 ` Paul Eggert
2018-01-13 5:13 ` Stefan Monnier
2018-01-13 8:31 ` Eli Zaretskii
2018-01-13 10:31 ` Tim Landscheidt
2018-01-13 17:42 ` Stefan Monnier
2018-01-13 19:22 ` Eli Zaretskii
2018-01-13 21:43 ` Stefan Monnier
2018-01-13 19:35 ` Paul Eggert
2018-01-13 19:42 ` Eli Zaretskii
2018-01-13 20:22 ` Paul Eggert
2018-01-14 3:31 ` Eli Zaretskii
2018-01-13 8:26 ` Eli Zaretskii
2018-01-16 2:16 ` git history tracking across renames (and emacs support) (Was: The name gnus-cloud.el) Richard Stallman
2018-01-09 2:54 ` Richard Stallman
2018-01-02 22:04 ` git history tracking across renames (and emacs support) Steinar Bang
2018-01-02 5:20 ` Stefan Monnier
2018-01-02 17:34 ` The name gnus-cloud.el Karl Fogel
2018-01-02 20:42 ` Chad Brown
2017-12-18 21:15 ` Richard Stallman
2017-12-19 6:09 ` John Wiegley
2017-12-19 7:42 ` Eli Zaretskii
2017-12-21 16:51 ` Richard Stallman
2017-12-19 9:09 ` joakim
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=87a7qwxc4u.fsf@gmail.com \
--to=joaotavora@gmail.com \
--cc=cpitclaudel@gmail.com \
--cc=eliz@gnu.org \
--cc=emacs-devel@gnu.org \
--cc=larsi@gnus.org \
--cc=monnier@IRO.UMontreal.CA \
--cc=tzz@lifelogs.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.