unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Indicator in mode-line
@ 2022-11-24  0:52 Heime
  2022-11-24 14:21 ` Heime
  0 siblings, 1 reply; 4+ messages in thread
From: Heime @ 2022-11-24  0:52 UTC (permalink / raw)
  To: Heime via Users list for the GNU Emacs text editor


I want to issue some indicator to the mode-line when some condition happens (error, 
warning, notification).

I can add things to the mode-line is the following way.  
 
(setq mode-line-format (list "Indc " mode-line-format))
(force-mode-line-update)

But also require a way for the user to acknowledge the indicator
and be able to switch the indicator off - returning the mode-line 
as original.

What kind of indications would work well in getting user attention?





^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Indicator in mode-line
  2022-11-24  0:52 Indicator in mode-line Heime
@ 2022-11-24 14:21 ` Heime
  2022-11-25 20:25   ` John Haman
  2022-11-27  2:34   ` Heime
  0 siblings, 2 replies; 4+ messages in thread
From: Heime @ 2022-11-24 14:21 UTC (permalink / raw)
  To: Heime; +Cc: Heime via Users list for the GNU Emacs text editor


To update the mode-line I have been setting up global-mode-string

(setq act "Test")
(push '("" act) global-mode-string)
(force-mode-line-update) 

But executing the above has not changed the mode-line.


------- Original Message -------
On Thursday, November 24th, 2022 at 12:52 AM, Heime <heimeborgia@protonmail.com> wrote:


> I want to issue some indicator to the mode-line when some condition happens (error,
> warning, notification).
> 
> I can add things to the mode-line is the following way.
> 
> (setq mode-line-format (list "Indc " mode-line-format))
> (force-mode-line-update)
> 
> But also require a way for the user to acknowledge the indicator
> and be able to switch the indicator off - returning the mode-line
> as original.
> 
> What kind of indications would work well in getting user attention?
>



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Indicator in mode-line
  2022-11-24 14:21 ` Heime
@ 2022-11-25 20:25   ` John Haman
  2022-11-27  2:34   ` Heime
  1 sibling, 0 replies; 4+ messages in thread
From: John Haman @ 2022-11-25 20:25 UTC (permalink / raw)
  To: Heime; +Cc: Heime via Users list for the GNU Emacs text editor


It could be helpful to read the source code of packages that update the
modeline. Here is one example on ELPA: https://elpa.gnu.org/packages/notmuch-indicator.html.

--
Dr. John Haman
Maryland, USA



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Indicator in mode-line
  2022-11-24 14:21 ` Heime
  2022-11-25 20:25   ` John Haman
@ 2022-11-27  2:34   ` Heime
  1 sibling, 0 replies; 4+ messages in thread
From: Heime @ 2022-11-27  2:34 UTC (permalink / raw)
  To: Heime; +Cc: Heime via Users list for the GNU Emacs text editor

------- Original Message -------
On Thursday, November 24th, 2022 at 2:21 PM, Heime <heimeborgia@protonmail.com> wrote:


> To update the mode-line I have been setting up global-mode-string
> 
> (setq act "Test")
> (push '("" act) global-mode-string)
> (force-mode-line-update)
> 
> But executing the above has not changed the mode-line.
 
Have figured out that "Test" did actually print in the mode-line,
but because I have a small screen, it was getting printed too far
to the right side (after the mode-lighters).

 
> ------- Original Message -------
> On Thursday, November 24th, 2022 at 12:52 AM, Heime heimeborgia@protonmail.com wrote:
> 
> 
> 
> > I want to issue some indicator to the mode-line when some condition happens (error,
> > warning, notification).
> > 
> > I can add things to the mode-line is the following way.
> > 
> > (setq mode-line-format (list "Indc " mode-line-format))
> > (force-mode-line-update)
> > 
> > But also require a way for the user to acknowledge the indicator
> > and be able to switch the indicator off - returning the mode-line
> > as original.
> > 
> > What kind of indications would work well in getting user attention?



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-11-27  2:34 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-24  0:52 Indicator in mode-line Heime
2022-11-24 14:21 ` Heime
2022-11-25 20:25   ` John Haman
2022-11-27  2:34   ` Heime

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).