all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* help-echo property disappearing
@ 2023-12-15  7:29 Nicolas P. Rougier (inria)
  2023-12-15  8:36 ` Stephen Berman
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Nicolas P. Rougier (inria) @ 2023-12-15  7:29 UTC (permalink / raw)
  To: emacs-devel


I'm playing with the help-echo property and it keeps disappearing 
for no obvious reason. I would like to confirm the behavior and to 
know if this is the intended behavior. Here is a simple example:

(progn
  (goto-char (point-min))
  (insert (propertize "TEST"
                      'another-property "Test message"
                      'help-echo "Test message"))
  (goto-char (point-min))
  (kill-visual-line) (yank))

Before kill/yank, the string has both the `help-echo` and 
`another-property` set, but the yanked string has only the 
`another-property` set. This is in text-mode, using Emacs 29.1. I 
also observed that in prog-modes, I cannot set the help-echo 
property at all (with no warning).

Nicolas

-- 
Nicolas P. Rougier —— www.labri.fr/perso/nrougier
Institute of Neurodegenerative Diseases, Bordeaux



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: help-echo property disappearing
  2023-12-15  7:29 help-echo property disappearing Nicolas P. Rougier (inria)
@ 2023-12-15  8:36 ` Stephen Berman
  2023-12-15  8:48   ` Nicolas P. Rougier (inria)
  2023-12-15  8:38 ` Joost Kremers
  2023-12-15  8:51 ` Eli Zaretskii
  2 siblings, 1 reply; 8+ messages in thread
From: Stephen Berman @ 2023-12-15  8:36 UTC (permalink / raw)
  To: Nicolas P. Rougier (inria); +Cc: emacs-devel

On Fri, 15 Dec 2023 08:29:24 +0100 "Nicolas P. Rougier (inria)" <nicolas.rougier@inria.fr> wrote:

> I'm playing with the help-echo property and it keeps disappearing for no
> obvious reason. I would like to confirm the behavior and to know if this is
> the intended behavior.

It is intended by default, see the user option
`yank-excluded-properties'.

Steve Berman



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: help-echo property disappearing
  2023-12-15  7:29 help-echo property disappearing Nicolas P. Rougier (inria)
  2023-12-15  8:36 ` Stephen Berman
@ 2023-12-15  8:38 ` Joost Kremers
  2023-12-15  8:51 ` Eli Zaretskii
  2 siblings, 0 replies; 8+ messages in thread
From: Joost Kremers @ 2023-12-15  8:38 UTC (permalink / raw)
  To: Nicolas P. Rougier (inria); +Cc: emacs-devel


On Fri, Dec 15 2023, Nicolas P. Rougier (inria) wrote:
> I'm playing with the help-echo property and it keeps disappearing for no obvious
> reason. I would like to confirm the behavior and to know if this is the intended
> behavior. Here is a simple example:
>
> (progn
>  (goto-char (point-min))
>  (insert (propertize "TEST"
>                      'another-property "Test message"
>                      'help-echo "Test message"))
>  (goto-char (point-min))
>  (kill-visual-line) (yank))
>
> Before kill/yank, the string has both the `help-echo` and `another-property`
> set, but the yanked string has only the `another-property` set. This is in
> text-mode, using Emacs 29.1. I also observed that in prog-modes, I cannot set
> the help-echo property at all (with no warning).

You may want to examine the value of the variable `yank-excluded-properties`. ;-)

-- 
Joost Kremers
Life has its moments



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: help-echo property disappearing
  2023-12-15  8:36 ` Stephen Berman
@ 2023-12-15  8:48   ` Nicolas P. Rougier (inria)
  2023-12-15  9:14     ` Stephen Berman
  2023-12-16 16:46     ` Howard Melman
  0 siblings, 2 replies; 8+ messages in thread
From: Nicolas P. Rougier (inria) @ 2023-12-15  8:48 UTC (permalink / raw)
  To: Stephen Berman; +Cc: emacs-devel


Stephen Berman [2023-12-15 at 09:36] wrote:
> On Fri, 15 Dec 2023 08:29:24 +0100 "Nicolas P. Rougier (inria)"
> <nicolas.rougier@inria.fr> wrote:
> 
> > I'm playing with the help-echo property and it keeps 
> > disappearing for no
> > obvious reason. I would like to confirm the behavior and to 
> > know if this is
> > the intended behavior.
> 
> It is intended by default, see the user option
> `yank-excluded-properties'.

Many thanks, I did not know this option. Is there a similar things 
for prog modes ? For example, if I switch from text-mode to 
lisp-mode, the help-echo disappears.

Nicolas

-- 
Nicolas P. Rougier —— www.labri.fr/perso/nrougier
Institute of Neurodegenerative Diseases, Bordeaux



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: help-echo property disappearing
  2023-12-15  7:29 help-echo property disappearing Nicolas P. Rougier (inria)
  2023-12-15  8:36 ` Stephen Berman
  2023-12-15  8:38 ` Joost Kremers
@ 2023-12-15  8:51 ` Eli Zaretskii
  2 siblings, 0 replies; 8+ messages in thread
From: Eli Zaretskii @ 2023-12-15  8:51 UTC (permalink / raw)
  To: Nicolas P. Rougier (inria); +Cc: emacs-devel

> From: "Nicolas P. Rougier (inria)" <nicolas.rougier@inria.fr>
> Date: Fri, 15 Dec 2023 08:29:24 +0100
> 
> 
> I'm playing with the help-echo property and it keeps disappearing 
> for no obvious reason. I would like to confirm the behavior and to 
> know if this is the intended behavior. Here is a simple example:
> 
> (progn
>   (goto-char (point-min))
>   (insert (propertize "TEST"
>                       'another-property "Test message"
>                       'help-echo "Test message"))
>   (goto-char (point-min))
>   (kill-visual-line) (yank))
> 
> Before kill/yank, the string has both the `help-echo` and 
> `another-property` set, but the yanked string has only the 
> `another-property` set. This is in text-mode, using Emacs 29.1. I 
> also observed that in prog-modes, I cannot set the help-echo 
> property at all (with no warning).

This is the intended behavior, see yank-excluded-properties.



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: help-echo property disappearing
  2023-12-15  8:48   ` Nicolas P. Rougier (inria)
@ 2023-12-15  9:14     ` Stephen Berman
  2023-12-15 10:41       ` Nicolas P. Rougier (inria)
  2023-12-16 16:46     ` Howard Melman
  1 sibling, 1 reply; 8+ messages in thread
From: Stephen Berman @ 2023-12-15  9:14 UTC (permalink / raw)
  To: Nicolas P. Rougier (inria); +Cc: emacs-devel

On Fri, 15 Dec 2023 09:48:38 +0100 "Nicolas P. Rougier (inria)" <nicolas.rougier@inria.fr> wrote:

 Stephen Berman [2023-12-15 at 09:36] wrote:
>> On Fri, 15 Dec 2023 08:29:24 +0100 "Nicolas P. Rougier (inria)"
>> <nicolas.rougier@inria.fr> wrote:
>>  > I'm playing with the help-echo property and it keeps  > disappearing for
>> no
>> > obvious reason. I would like to confirm the behavior and to  > know if
>> this is
>> > the intended behavior.
>> It is intended by default, see the user option
>> `yank-excluded-properties'.
>
> Many thanks, I did not know this option. Is there a similar things for prog
> modes ? For example, if I switch from text-mode to lisp-mode, the help-echo
> disappears.

I think this is because lisp-mode adds help-echo to
font-lock-extra-managed-props (see `lisp-mode-variables').

Steve Berman



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: help-echo property disappearing
  2023-12-15  9:14     ` Stephen Berman
@ 2023-12-15 10:41       ` Nicolas P. Rougier (inria)
  0 siblings, 0 replies; 8+ messages in thread
From: Nicolas P. Rougier (inria) @ 2023-12-15 10:41 UTC (permalink / raw)
  To: Stephen Berman; +Cc: emacs-devel


> I think this is because lisp-mode adds help-echo to
> font-lock-extra-managed-props (see `lisp-mode-variables').

Exactly, thank you.

Nicolas

-- 
Nicolas P. Rougier —— www.labri.fr/perso/nrougier
Institute of Neurodegenerative Diseases, Bordeaux



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: help-echo property disappearing
  2023-12-15  8:48   ` Nicolas P. Rougier (inria)
  2023-12-15  9:14     ` Stephen Berman
@ 2023-12-16 16:46     ` Howard Melman
  1 sibling, 0 replies; 8+ messages in thread
From: Howard Melman @ 2023-12-16 16:46 UTC (permalink / raw)
  To: emacs-devel


>> It is intended by default, see the user option
>> `yank-excluded-properties'.
>
> Many thanks, I did not know this option.

It's described in the elisp manual in the yanking section,
which is fair enough.  Perhaps it should also be mentioned
or cross-referenced from the Text Properties section (in
Stickiness of Text Properties or perhaps at the bottom of
Properties with Special Meanings)?

-- 

Howard




^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2023-12-16 16:46 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-12-15  7:29 help-echo property disappearing Nicolas P. Rougier (inria)
2023-12-15  8:36 ` Stephen Berman
2023-12-15  8:48   ` Nicolas P. Rougier (inria)
2023-12-15  9:14     ` Stephen Berman
2023-12-15 10:41       ` Nicolas P. Rougier (inria)
2023-12-16 16:46     ` Howard Melman
2023-12-15  8:38 ` Joost Kremers
2023-12-15  8:51 ` Eli Zaretskii

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.