From: Eli Barzilay <eli@barzilay.org>
To: Glenn Morris <rgm@gnu.org>
Cc: 4217@emacsbugs.donarmstrong.com
Subject: bug#4217: 23.1; probable mode-line bug
Date: Tue, 25 Aug 2009 13:29:06 -0400 [thread overview]
Message-ID: <19092.8034.606896.137201@winooski.ccs.neu.edu> (raw)
In-Reply-To: <fm1vmzbz3s.fsf@fencepost.gnu.org>
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!
next prev parent reply other threads:[~2009-08-25 17:29 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <7py6p7uvop.fsf@fencepost.gnu.org>
2009-08-20 22:30 ` bug#4217: 23.1; probable mode-line bug Eli Barzilay
2009-08-25 3:08 ` Glenn Morris
2009-08-25 3:47 ` Eli Barzilay
2009-08-25 17:08 ` Glenn Morris
2009-08-25 17:29 ` Eli Barzilay [this message]
2009-08-26 3:05 ` bug#4217: marked as done (23.1; probable mode-line bug) Emacs bug Tracking System
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=19092.8034.606896.137201@winooski.ccs.neu.edu \
--to=eli@barzilay.org \
--cc=4217@emacsbugs.donarmstrong.com \
--cc=rgm@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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.