[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Buffer names are sometimes read-only objects in daemonized emacs
From: |
Johan Bockgård |
Subject: |
Re: Buffer names are sometimes read-only objects in daemonized emacs |
Date: |
Fri, 30 Jul 2010 19:46:28 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) |
Tassilo Horn <address@hidden> writes:
> And, even in a daemonized emacs, I can eval
>
> (lusty-propertize-path "*GNU Emacs*")
This is obviously a fresh string.
> So it looks like the string "*GNU Emacs*" passed to that defsubst is
> somehow read-only. Grepping the emacs sources the error seems to be
> triggered by having that string in pure storage.
Yes.
> But even this does work in a daemonized emacs, even when I put it at the
> front of my .emacs and then start it with emacs --daemon:
>
> (dolist (b (buffer-list))
> (let ((n (buffer-name (get-buffer b))))
> (put-text-property 0 (length n) 'face font-lock-string-face n)))
But this list does not contain "*GNU Emacs*", does it? ("*GNU Emacs*" is
the splash screen buffer. It is created after loading the init files.)
The daemon creates the splash screen via `normal-splash-screen' (instead
of `fancy-startup-screen'). It contains a call to `(rename-buffer "*GNU
Emacs*" t)'. Unlike `get-buffer-create', `rename-buffer' does not make a
copy of the provided string. This is how the pure string ends up in
`buffer-name', AFAICT.
(Modifying a string returned by `buffer-name' is still evil, as it does
not promise to return a fresh string.)
- How do I debug errors in post-command-hook?, Tassilo Horn, 2010/07/29
- Re: How do I debug errors in post-command-hook?, Lennart Borgman, 2010/07/29
- Re: How do I debug errors in post-command-hook?, Johan Bockgård, 2010/07/29
- Re: How do I debug errors in post-command-hook?, Tassilo Horn, 2010/07/30
- Re: How do I debug errors in post-command-hook?, Johan Bockgård, 2010/07/30
- Buffer names are sometimes read-only objects in daemonized emacs (was: How do I debug errors in post-command-hook?), Tassilo Horn, 2010/07/30
- Re: Buffer names are sometimes read-only objects in daemonized emacs,
Johan Bockgård <=
- Re: Buffer names are sometimes read-only objects in daemonized emacs, Tassilo Horn, 2010/07/30
- Re: Buffer names are sometimes read-only objects in daemonized emacs, Wojciech Meyer, 2010/07/30
- Re: Buffer names are sometimes read-only objects in daemonized emacs, Tassilo Horn, 2010/07/30
- Re: Buffer names are sometimes read-only objects in daemonized emacs, Wojciech Meyer, 2010/07/30
- Re: Buffer names are sometimes read-only objects in daemonized emacs, Stefan Monnier, 2010/07/30
- Re: Buffer names are sometimes read-only objects in daemonized emacs, Lennart Borgman, 2010/07/30
- Re: Buffer names are sometimes read-only objects in daemonized emacs, Johan Bockgård, 2010/07/30