[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: with-output-to-temp-buffer [Re: reverting CJK input methods]
From: |
Kenichi Handa |
Subject: |
Re: with-output-to-temp-buffer [Re: reverting CJK input methods] |
Date: |
Thu, 6 May 2004 22:10:08 +0900 (JST) |
User-agent: |
SEMI/1.14.3 (Ushinoya) FLIM/1.14.2 (Yagi-Nishiguchi) APEL/10.2 Emacs/21.3 (sparc-sun-solaris2.6) MULE/5.0 (SAKAKI) |
In article <address@hidden>, Richard Stallman <address@hidden> writes:
> fails because the function temp_output_buffer_setup calls
> Ferase_buffer and it signals the error "Text is read-only".
> Should we bind inhibit-read-only to t while calling
> Ferase_buffer,
> That is the right fix.
> or modify Ferase_buffer itself so that it
> doesn't signal the above error?
> This would be incorrect.
> As a general principle: don't make a general facility less natural or
> harder to describe, in order to solve a problem that occurs with a
> specific use of that facility. Instead, fix the specific use.
> Only change the general facility if there's a reason to think
> it would be better, as a general facility, with the change.
I fully agree with that general principle. But, for the
current case, I'm not sure it is the right thing that
erase-buffer signals such an error considering that it
removes even the narrowing restriction.
I grepped Ferase_buffer in src/*.c and found that this also
causes the similar problem.
(put-text-property 1 10 'help-echo (propertize "test tip" 'read-only t))
Once we add read-only text as a tool-tip (of course it's
nonsense to do such a thing), no more tooltip pops up
because the " *tip" buffer can't be erased by Ferase_buffer.
Another case is display-message-or-buffer.
If we eval this once,
(display-message-or-buffer (propertize "abc\n\n" 'read-only t))
the further try causes "Text is read-only" error.
I fear there's many other codes that pay attention to
buffer-read-only but not to read-only text-property. In
almost all cases, I think what they want is to erase a
buffer completely including read-only text.
---
Ken'ichi HANDA
address@hidden
- Re: reverting CJK input methods, (continued)
Re: reverting CJK input methods, Juri Linkov, 2004/05/01
- Re: reverting CJK input methods, Kenichi Handa, 2004/05/01
- with-output-to-temp-buffer [Re: reverting CJK input methods], Kenichi Handa, 2004/05/06
- Re: with-output-to-temp-buffer [Re: reverting CJK input methods], Richard Stallman, 2004/05/06
- Re: with-output-to-temp-buffer [Re: reverting CJK input methods],
Kenichi Handa <=
- Re: with-output-to-temp-buffer [Re: reverting CJK input methods], Stefan Monnier, 2004/05/06
- Re: with-output-to-temp-buffer [Re: reverting CJK input methods], Kevin Rodgers, 2004/05/06
- Re: with-output-to-temp-buffer [Re: reverting CJK input methods], Stefan Monnier, 2004/05/06
- Re: with-output-to-temp-buffer [Re: reverting CJK input methods], Kevin Rodgers, 2004/05/06
Re: with-output-to-temp-buffer [Re: reverting CJK input methods], Kenichi Handa, 2004/05/06
Re: with-output-to-temp-buffer [Re: reverting CJK input methods], Richard Stallman, 2004/05/07
Re: with-output-to-temp-buffer [Re: reverting CJK input methods], Kenichi Handa, 2004/05/10
Re: with-output-to-temp-buffer [Re: reverting CJK input methods], Stefan Monnier, 2004/05/10
Re: with-output-to-temp-buffer [Re: reverting CJK input methods], Richard Stallman, 2004/05/11
Re: with-output-to-temp-buffer [Re: reverting CJK input methods], David Kastrup, 2004/05/11