From: Stefan Kangas <stefankangas@gmail.com>
To: "Johann Klähn" <johann@jklaehn.de>
Cc: Tassilo Horn <tsdh@gnu.org>,
emacs-devel@gnu.org, Philip Kaludercic <philipk@posteo.net>
Subject: Re: [NonGNU ELPA] New package: eldoc-diffstat
Date: Sun, 15 Dec 2024 00:38:01 +0000 [thread overview]
Message-ID: <CADwFkmnqKbh6_gpC+G8FDuKzJA6yqWiQka7kkcsomeHQJAPjwg@mail.gmail.com> (raw)
In-Reply-To: <87cyhuaqun.fsf@jklaehn.de>
Johann Klähn <johann@jklaehn.de> writes:
>> When the mode is toggled on, it could detect automatically that it's in
>> a magit buffer, and do the `eldoc-add-command` setup for users
>> automatically.
>
> I decided to unconditionally add these commands when the package is
> loaded, since this (a) only has to be run once and (b) does not have an
> effect unless eldoc is used in a magit buffer. And in the latter case
> the user will likely want these as triggers anyways.
This is minor, but we usually recommend against changing behavior from
merely loading a file (as that can happen from merely saying `C-h f`),
so I'd move this to when the mode is loaded.
>> - Caching the results for the current buffer to get instant results
>
> Do you mean eagerly compute diffstat? Or just remember it indefinitely
> after the first lookup of a commit?
I was thinking of computing it eagerly. Either or should work, but
keeping it indefinitely might lead to its own issues, for example you
might want to eventually prune the list of commits for which you saved
the diffstat, and so on.
next prev parent reply other threads:[~2024-12-15 0:38 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-09 20:31 [NonGNU ELPA] New package: eldoc-diffstat Johann Klähn
2024-12-13 20:23 ` Tassilo Horn
2024-12-14 13:24 ` Stefan Kangas
2024-12-14 21:37 ` Johann Klähn
2024-12-15 0:38 ` Stefan Kangas [this message]
2024-12-15 10:11 ` Philip Kaludercic
2024-12-14 10:11 ` Philip Kaludercic
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=CADwFkmnqKbh6_gpC+G8FDuKzJA6yqWiQka7kkcsomeHQJAPjwg@mail.gmail.com \
--to=stefankangas@gmail.com \
--cc=emacs-devel@gnu.org \
--cc=johann@jklaehn.de \
--cc=philipk@posteo.net \
--cc=tsdh@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).