* Mode lines and stuff
@ 1997-05-27 14:34 Lars Magne Ingebrigtsen
[not found] ` <wkvi44eq2y.fsf@peorth.gweep.net>
0 siblings, 1 reply; 2+ messages in thread
From: Lars Magne Ingebrigtsen @ 1997-05-27 14:34 UTC (permalink / raw)
I thought I could be a bit naughty and use the minor mode specs to say
whether Gnus is online or not. So I did this in `gnus-agent-mode',
which is a minor mode installed in all Gnus buffers:
(defvar gnus-agent-mode-status '(gnus-agent-mode " Online"))
(defun gnus-agent-mode ()
...
(unless (assq 'gnus-agent-mode minor-mode-alist)
(push gnus-agent-mode-status minor-mode-alist))
...)
And then to toggle on and off, I use this command:
(defun gnus-agent-toggle-online (online)
"Toggle whether Gnus is online or not."
(interactive (list (not gnus-online)))
(if (setq gnus-online (not gnus-online))
(setcar (cdr gnus-agent-mode-status) " Online")
(setcar (cdr gnus-agent-mode-status) " Offline"))
(set-buffer-modified-p t))
This works. However, it works badly. Each time I run this command, a
new " Online" (or " Offline") is added to the mode line, so it grows
rather big. Not only that, whenever this command is used, *all* the
old " Online"s (or " Offline"s) flip over.
This is all rather strange. Anyone here familiar with how the mode
bar works?
--
(domestic pets only, the antidote for overdose, milk.)
larsi@ifi.uio.no * Lars Magne Ingebrigtsen
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Mode lines and stuff
[not found] ` <wkvi44eq2y.fsf@peorth.gweep.net>
@ 1997-05-30 20:16 ` Lars Magne Ingebrigtsen
0 siblings, 0 replies; 2+ messages in thread
From: Lars Magne Ingebrigtsen @ 1997-05-30 20:16 UTC (permalink / raw)
Stainless Steel Rat <ratinox@peorth.gweep.net> writes:
> Lars> This is all rather strange. Anyone here familiar with how the mode
> Lars> bar works?
>
> I suggest mucking around with the value of mode-line-buffer-identification
> instead of the modal alists. It is intended to be tweaked by modes that
> edit (or whatever) things other than ordinary files.
Yeah, but the Gnus mode lines are customizable, so altering them is
kinda difficult.
--
(domestic pets only, the antidote for overdose, milk.)
larsi@gnus.org * Lars Magne Ingebrigtsen
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~1997-05-30 20:16 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1997-05-27 14:34 Mode lines and stuff Lars Magne Ingebrigtsen
[not found] ` <wkvi44eq2y.fsf@peorth.gweep.net>
1997-05-30 20:16 ` Lars Magne Ingebrigtsen
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 NNTP newsgroup(s).