all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Stephen Berman <stephen.berman@gmx.net>
Cc: 7307@debbugs.gnu.org
Subject: bug#7307: 24.0.50; Mode line had more than just dashes removed
Date: Mon, 08 Nov 2010 13:28:17 -0500	[thread overview]
Message-ID: <jwvoc9zsmyt.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <87vd4b68xn.fsf@escher.home> (Stephen Berman's message of "Fri, 05 Nov 2010 17:18:12 +0100")

> How about something like the following patch?

Looks pretty good.  It should probably come together with a Lisp part
that removes the current mode-line-format change.

> This builds the string
> dynamically by filling decode_mode_spec_buf to the desired length,
> dispensing with an additional lots_of_<foo> string.  AFAICT this gives
> good results (though I admittedly haven't been able to find a case where
> lots_of_filler (replacing lots_of_dashes) is used; what is such a
> case?).

I guess the lots_of_filler case is when you use things like "%5-".

> I also exposed the string character variable mode_line_filler to Lisp,
> so it could be customizable, but I haven't been able to figure out how
> to update the mode line with a new character.

That's because you re-initialize mode_line_filler each time.
Instead you should initialize it once and "for all" in init_xdisp.
But indeed, that exposes another problem: being global, you won't be
able to have "----" in tty frames and "    " in GUI frames in the
same process.

> Also, I don't know the right way to set the default value: I assume it
> shouldn't be done in decode_mode_spec() as below but at the top level
> together with the DEFVAR, but then how can it be associated with the
> window whose mode line is being constructed?

Indeed.  You could use a terminal property instead of (or additionally
to) a global variable, or you could let the global variable be a cons
cell where the car is the char to use for GUI frames and the cdr is for
tty frames :-(


        Stefan





  parent reply	other threads:[~2010-11-08 18:28 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-29 23:05 bug#7307: 24.0.50; Mode line had more than just dashes removed Stephen Berman
2010-10-30  6:51 ` Eli Zaretskii
2010-10-30 13:27   ` Stephen Berman
2010-10-30 13:49     ` Eli Zaretskii
2010-10-30 15:23       ` Stephen Berman
2010-10-31  3:54     ` Stefan Monnier
2010-11-01 18:11       ` Stephen Berman
2010-11-01 19:32         ` Eli Zaretskii
2010-11-01 23:35           ` Stephen Berman
2010-11-02  5:35             ` Eli Zaretskii
2010-11-02  6:31               ` Eli Zaretskii
2010-11-02 14:32         ` Stefan Monnier
2010-11-05 16:18           ` Stephen Berman
2010-11-05 18:45             ` Andreas Schwab
2010-11-05 23:08               ` Stephen Berman
2010-11-08 18:28             ` Stefan Monnier [this message]
2010-11-21  0:37               ` Stephen Berman
2010-10-31  0:49 ` James Cloos
2010-11-01 18:11   ` Stephen Berman
2012-06-03  9:05 ` Chong Yidong

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=jwvoc9zsmyt.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=7307@debbugs.gnu.org \
    --cc=stephen.berman@gmx.net \
    /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.