* comint-prompt-read-only causes problems in Gnus message mode
@ 2004-11-21 15:20 Harald Maier
2004-11-21 16:24 ` Luc Teirlinck
0 siblings, 1 reply; 5+ messages in thread
From: Harald Maier @ 2004-11-21 15:20 UTC (permalink / raw)
Hello all,
I have set the new option `comint-prompt-read-only' and I like it very
much. When I copy the prompt from the shell buffer and yank it to
other buffers mostly I don't have problems. Except in the Gnu
'Message' mode. Here you are *not able* to delete the inserted prompt.
'Message' mode always complains 'Text is read only'. In other modes
the inserted prompt too has the property 'read-only' but there it's
possible to delete the text (e.g. text-mode or the normal mail mode).
The only way to get rid of the inserted comint prompt is to save the
buffer and reopen it from the 'nndraft:drafts' group.
Harald
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: comint-prompt-read-only causes problems in Gnus message mode
2004-11-21 15:20 comint-prompt-read-only causes problems in Gnus message mode Harald Maier
@ 2004-11-21 16:24 ` Luc Teirlinck
2004-11-21 17:38 ` Harald Maier
0 siblings, 1 reply; 5+ messages in thread
From: Luc Teirlinck @ 2004-11-21 16:24 UTC (permalink / raw)
Cc: emacs-devel
Harald Maier wrote:
In other modes the inserted prompt too has the property 'read-only'
Did you check this? (You can do `C-u C-x =' to check the text
properties of a character.)
but there it's possible to delete the text (e.g. text-mode or the
normal mail mode).
By default `read-only' is in yank-excluded-properties. In that
setting, the copied text should not have the `read-only' property. If
you remove `read-only' from yank-excluded-properties the copied text
should be _truly_ read-only. Playing around a little bit, this seems
to be exactly what happens in practice, as it should. So the
_combination_ of the two quotes above looks surprising.
Except in the Gnu 'Message' mode. Here you are *not able* to delete
the inserted prompt. 'Message' mode always complains 'Text is read
only'.
I do not use message mode myself and am completely unfamiliar with it.
So it is difficult for me to fix this bug, which, at first sight, does
not seem to be specific to the comint prompt. At first sight, it
would look like message mode does not respect
`yank-excluded-properties'. It should. I hope somebody familiar with
message mode can look into this.
Sincerely,
Luc.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: comint-prompt-read-only causes problems in Gnus message mode
2004-11-21 16:24 ` Luc Teirlinck
@ 2004-11-21 17:38 ` Harald Maier
2004-11-21 18:04 ` Luc Teirlinck
0 siblings, 1 reply; 5+ messages in thread
From: Harald Maier @ 2004-11-21 17:38 UTC (permalink / raw)
Cc: emacs-devel
Luc Teirlinck <teirllm@dms.auburn.edu> writes:
> Harald Maier wrote:
>
> In other modes the inserted prompt too has the property 'read-only'
>
> Did you check this? (You can do `C-u C-x =' to check the text
> properties of a character.)
>
> but there it's possible to delete the text (e.g. text-mode or the
> normal mail mode).
>
> By default `read-only' is in yank-excluded-properties. In that
> setting, the copied text should not have the `read-only' property. If
> you remove `read-only' from yank-excluded-properties the copied text
> should be _truly_ read-only. Playing around a little bit, this seems
> to be exactly what happens in practice, as it should. So the
> _combination_ of the two quotes above looks surprising.
If I copy a promt form the '*shell*' buffer with
'comint-prompt-read-only' equal 't' into the '*scratch* buffer then I
get the following with 'C-u C-x =':
,----
| character: $ (044, 36, 0x24, U+0024)
| charset: ascii (ASCII (ISO646 IRV))
| code point: 36
| syntax: w which means: word
| category: a:ASCII l:Latin
| buffer code: 0x24
| file code: 0x24 (encoded by coding system iso-latin-1)
| display: by this font (glyph code)
| -Misc-Fixed-Medium-R-Normal--13-120-75-75-C-70-ISO8859-1 (0x24)
|
| There are text properties here:
| font-lock-face [comint-highlight-prompt]
| inhibit-line-move-field-capture t
| rear-nonsticky t
| fontified t
| front-sticky (read-only)
`----
I don't know if this is correct but it seems read-only is still there.
The .emacs looks like follows:
,----[ .emacs ]
| (global-font-lock-mode t)
| (require 'comint)
|
| (setq comint-prompt-read-only t)
`----
The variable yank-excluded-properties's value is
,----
| (read-only invisible intangible field mouse-face help-echo local-map
| keymap yank-handler)
`----
Harald
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: comint-prompt-read-only causes problems in Gnus message mode
2004-11-21 17:38 ` Harald Maier
@ 2004-11-21 18:04 ` Luc Teirlinck
2004-11-23 16:29 ` Richard Stallman
0 siblings, 1 reply; 5+ messages in thread
From: Luc Teirlinck @ 2004-11-21 18:04 UTC (permalink / raw)
Cc: emacs-devel
Harald Maier wrote:
| There are text properties here:
| font-lock-face [comint-highlight-prompt]
| inhibit-line-move-field-capture t
| rear-nonsticky t
| fontified t
| front-sticky (read-only)
`----
I don't know if this is correct but it seems read-only is still there.
No. The value of the _front-sticky_ property is still (read-only),
which only will start to matter if you make the text read-only again.
That is, the text no longer has the read-only property, but if you
make it read-only, then characters added in front of it after you made
it read-only will also be read-only.
The above fact seems like a shortcoming of yank-excluded-properties,
or of its default value.
Maybe rear-nonsticky and front-sticky should be in
yank-excluded-properties themselves. The text is likely to be yanked
into another context and in that context, the old stickiness may no
longer be desirable.
Sincerely,
Luc.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2004-11-23 16:29 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-11-21 15:20 comint-prompt-read-only causes problems in Gnus message mode Harald Maier
2004-11-21 16:24 ` Luc Teirlinck
2004-11-21 17:38 ` Harald Maier
2004-11-21 18:04 ` Luc Teirlinck
2004-11-23 16:29 ` Richard Stallman
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.