GNU bug report logs - #4217
23.1; probable mode-line bug

Previous Next

Package: emacs;

Reported by: Eli Barzilay <eli <at> barzilay.org>

Date: Thu, 20 Aug 2009 22:40:05 UTC

Severity: minor

Done: Glenn Morris <rgm <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Eli Barzilay <eli <at> barzilay.org>
To: Glenn Morris <rgm <at> gnu.org>
Cc: 4217 <at> debbugs.gnu.org
Subject: bug#4217: 23.1; probable mode-line bug
Date: Tue, 25 Aug 2009 13:29:06 -0400
On Aug 25, Glenn Morris wrote:
> Eli Barzilay wrote:
> 
> > I thought that having them at the front makes more sense -- due to the
> > following "-%-".
> 
> I assumed the actual problem you wanted to report was that in:
> 
> emacs -Q -f which-func-mode --eval '(setq global-mode-string "foo")' lisp/startup.el
> 
> there are 4 "-" characters between which-func's '[...]' and the
> global-mode-string.

Yes, that's the result of the bad placement of dashes.


> Since mode-line-modes already ends in "--", moving the dashes to the
> front of which-func will just shift the 4 "-" around rather than
> reducing them to 2.

I missed this, mostly because I just looked at the code that *looked*
like it has a problem.  Anyway, in this case the obvious solution is
to remove the last two dashes from `mode-line-modes'.  This means that
the relevant code:

	 (propertize "  " 'help-echo help-echo)
	 'mode-line-modes
	 `(which-func-mode ("" which-func-format ,dashes))
	 `(global-mode-string (,dashes global-mode-string))
	 (propertize "-%-" 'help-echo help-echo)

works fine in all cases.


> Although the "--" at the end of the global-mode-string entry are not
> necessary (being followed by -%-), I think it makes sense to have
> all the entries be the same, so that entries can be
> removed/added/reordered easily.

Yes, having all entries be the same is definitely the answer -- but
this should apply to everything except for the first or the last in
the chain (depending on using the dashes before/after), and
moving the dashes to the front and making `mode-line-modes' not end
with dashes seems to me as a better choice.

-- 
          ((lambda (x) (x x)) (lambda (x) (x x)))          Eli Barzilay:
                    http://barzilay.org/                   Maze is Life!



This bug report was last modified 16 years ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.