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

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

Re: tilde in dired default-directory but not elsewhere


From: Emanuel Berg
Subject: Re: tilde in dired default-directory but not elsewhere
Date: Wed, 09 Jul 2014 20:05:58 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux)

Michael Heerdegen <michael_heerdegen@web.de> writes:

>> Now it will be interesting to see how much work is
>> required to make it work the right way for dired and
>> sudo buffers, not to mention all the "file-less"
>> modes...
>
> What use case do you have in mind?  Can you give an
> example?

Now I only speak of the mode line. I think I found a
way. First, define it for example like this (possibly
add some more, later).

(setq    column-number-mode  nil)
(setq    line-number-mode    nil)
(defvar  show-modified       t)
(defvar  show-path           t)
(defvar  show-modes          nil)

(setq-default mode-line-format
   `(" "
     (show-modified mode-line-modified)
     " "
     (show-path (:eval (abbreviate-file-name (buffer-file-name)) ))
     " "
     (show-modes mode-line-modes)
     (line-number-mode   "[%l] ")
     (column-number-mode "{%c}")
     ))

For the modes that should show different stuff, simply
change those variables (show-path etc.) locally.
     
-- 
underground experts united


reply via email to

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