help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Update `minibuffer-line' on buffer switches


From: Alexander Shukaev
Subject: Update `minibuffer-line' on buffer switches
Date: Sat, 27 Jun 2015 16:22:06 +0200

Hello,

Recently Stefan has introduced the `minibuffer-line' package.  I find it
very handy, especially for displaying the full path to either the
`default-directory' or `buffer-file-name'.  Previously, I used
`frame-title-format' for this like so:

(setq-default frame-title-format
              '((:eval
                 (list (user-login-name)
                       "@"
                       (system-name)
                       ":"
                       (abbreviate-file-name (or (buffer-file-name)
                                                 (file-name-as-directory
                                                  default-directory)))))))

and it behaved very well since when one switches buffers, the title is
automatically updated.  The same is true for `mode-line-format'.  Both
variables come from the C source code.  I'm not sure how automatic updating
is implemented for those, but obviously, to make this work with
`minibuffer-line', I'd have to attach `minibuffer-line--update' to some
hook which runs when buffers are switched.  Is there such a hook?  Are
there alternative implementations for this?  Thanks.

Kind regards,
Alexander


reply via email to

[Prev in Thread] Current Thread [Next in Thread]