Re: [GNU ELPA] New package: caffeinate-mode
Stéphane Marks <[email protected]>
| Newsgroups | gmane.emacs.devel |
|---|---|
| Message-ID | <CAN+1HboXL77i2sFd+m3Q_j1tt3_TJFrkwxoFkw-_MnsAnvS1wg@mail.gmail.com> |
On Wed, Jul 22, 2026 at 2:39 PM Philip Kaludercic <[email protected]> wrote: > Stéphane Marks <[email protected]> writes: > > > On Tue, Jul 21, 2026 at 10:27 PM Lucas Christian <[email protected]> > wrote: > > > >> Stéphane Marks <[email protected]> writes: > >> > >> > Does it even need to be a mode or can it just be a package with a few > >> > commands, e.g., caffeinate, caffeinate-display, decaffeinate, > >> > defcustom for the default display sleep state and interval, and global > >> > private variables for the active sleep token and timer? > >> > >> I think the main advantage of it being a mode is that it leaves a clear > >> indicator in the mode line when it is active. > >> > > > > That's pretty easy to do without being a mode. > > Here is a skeetch of what I had in mind when it came to merging the two > minor modes: > > > It also simplifies the code, since you don't need to maintain the > invariant that the major modes are mutually exclusive. It is a > sub-minor-mode so to speak. > If this will move ahead as a mode, I'd prefer to see caffeinate- be the prefix to the commands so display-caffeinate would be caffeinate-display. Easier for discovery and it's more like a verb to perform for the display.