[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: `tramp-theme-mode-line-buffer-identification' interference
From: |
Live System User |
Subject: |
Re: `tramp-theme-mode-line-buffer-identification' interference |
Date: |
Sun, 03 Jul 2016 08:36:09 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.0.94 (gnu/linux) |
Michael Albinus <address@hidden> writes:
Hi Michael,
> Live System User <address@hidden> writes:
>
>> Hi,
>
> Hi,
>
>> Please advise.
>
> Honestly, I have no idea what you are speaking about. Could you, please,
> tell what's the problem, and give a recipe how to reproduce it, starting
> with emacs -Q.
Unfortunately, you can't reproduce this problem with "emacs -Q"
because the customize feature doesn't save any changes when you
do that.
Steps to reproduce:
0. Create a .emacs file with only the following:
(add-to-list 'load-path "~/.emacs.d/themes")
(setq custom-theme-directory "~/.emacs.d/themes/")
(if (boundp 'custom-theme-load-path)
(add-to-list 'custom-theme-load-path (file-name-as-directory
(expand-file-name "~/.emacs.d/themes"))))
(setq custom-file ; Use a separate customize file so as to not clutter .emacs
(concat "~/.emacs.d/custom-theme-test"
(int-to-string emacs-major-version)))
(load-theme 'tramp t nil) ; tramp-theme has an eval, so load before custom-file.
(load custom-file 'noerror)
1. emacs &
2. M-x load-theme RET tramp
Loading a theme can run Lisp code. Really load? (y or n) y
Treat this theme as safe in future sessions? (y or n) y
3. C-x C-f file.txt
You will see that "file.txt" in the mode-line.
4. C-h v mode-line-buffer-identification
mode-line-buffer-identification is a variable defined in ‘bindings.el’.
Its value is shown below.
Automatically becomes buffer-local when set.
This variable may be risky if used as a file-local variable.
Documentation:
Mode line construct for identifying the buffer being displayed.
Its default value is ("%12b") with some text properties added.
Major modes that edit things other than ordinary files may change this
(e.g. Info, Dired,...)
Value:
(#("%12b" 0 4
(local-map
(keymap
(header-line keymap
(mouse-3 . mode-line-next-buffer)
(down-mouse-3 . ignore)
(mouse-1 . mode-line-previous-buffer)
(down-mouse-1 . ignore))
(mode-line keymap
(mouse-3 . mode-line-next-buffer)
(mouse-1 . mode-line-previous-buffer)))
mouse-face mode-line-highlight help-echo "Buffer name\nmouse-1: Previous
buffer\nmouse-3: Next buffer" face mode-line-buffer-id)))
Local in buffer file.txt; global value is
(:eval
(tramp-theme-mode-line-buffer-identification))
Exit Emacs and restart and try editing a file:
5. C-x C-c
6. emacs &
7. C-x C-f file.txt
You now don't see "file.txt" in the mode-line
8. C-h v mode-line-buffer-identification
mode-line-buffer-identification is a variable defined in ‘bindings.el’.
Its value is ('(:eval
(tramp-theme-mode-line-buffer-identification)))
Local in buffer file.txt; global value is
(:eval
(tramp-theme-mode-line-buffer-identification))
Automatically becomes buffer-local when set.
This variable may be risky if used as a file-local variable.
Documentation:
Mode line construct for identifying the buffer being displayed.
Its default value is ("%12b") with some text properties added.
Major modes that edit things other than ordinary files may change this
(e.g. Info, Dired,...)
Thanks.
>
>> Thanks.
>
> Best regards, Michael.