unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Joost Kremers <joostkremers@fastmail.fm>
To: Uwe Brauer <oub@mat.ucm.es>
Cc: help-gnu-emacs@gnu.org
Subject: Re: modeline: move battery indicator as provided by (display-battery-mode)
Date: Tue, 27 Apr 2021 13:36:05 +0200	[thread overview]
Message-ID: <87lf94aren.fsf@fastmail.fm> (raw)
In-Reply-To: <87fszc7zyr.fsf@mat.ucm.es>


On Tue, Apr 27 2021, Uwe Brauer wrote:
>> (setq mode-line-format
>>       '("%e" mode-line-front-space mode-line-mule-info mode-line-client mode-line-modified mode-line-remote
>> 	mode-line-frame-identification
>> 	mode-line-buffer-identification "   "
>> 	mode-line-position
>> 	(vc-mode vc-mode) mode-line-misc-info "  "
>> 	mode-line-modes mode-line-end-spaces))
>
> Thanks, I am not entirely sure I understand your setting but I just
> copied in my init file and restarted emacs.
>
> However when I open say a LaTeX file, the battery display is sill at the
> end of the modeline, and therefore not visible.

`mode-line-format` automatically becomes buffer-local when set, so using `setq`
won't set the global value. Try `setq-default`.

The battery info is contained in `mode-line-misc-info`, you can move it around
if the above setting doesn't work for you. Note, though, that
`mode-line-misc-info` may contain more information than just the battery status,
which will get moved around as well. Moving just the battery display would be a
bit more involved.

-- 
Joost Kremers
Life has its moments



  reply	other threads:[~2021-04-27 11:36 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-27  8:37 modeline: move battery indicator as provided by (display-battery-mode) Uwe Brauer
2021-04-27 10:45 ` Philip Kaludercic
2021-04-27 11:02   ` Uwe Brauer
2021-04-27 11:36     ` Joost Kremers [this message]
2021-04-27 11:42       ` Uwe Brauer

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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87lf94aren.fsf@fastmail.fm \
    --to=joostkremers@fastmail.fm \
    --cc=help-gnu-emacs@gnu.org \
    --cc=oub@mat.ucm.es \
    /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.
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).