all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#71598: Text property "help-echo" display "mouse-x" incorrectly
@ 2024-06-16 16:34 Siyuan Chen
  2024-06-16 19:03 ` Eli Zaretskii
  0 siblings, 1 reply; 4+ messages in thread
From: Siyuan Chen @ 2024-06-16 16:34 UTC (permalink / raw)
  To: 71598

[-- Attachment #1: Type: text/plain, Size: 697 bytes --]

The reproduce steps:

1. Open Emacs with -Q

2. Copy the following code to *scratch*

```
(with-current-buffer (get-buffer-create "*TestBuffer*")
  (let ((inhibit-read-only t))
    (insert (propertize "aaaa"
                        'mouse-face 'highlight
                        'follow-link t
                        'help-echo "mouse-2: some tips"))
    ))
```

3. Put the cursor after the last parenthesis and M-x `eval-last-sexp`

4. M-x `switch-to-buffer` "*TestBuffer*"

5. Put the mouse over "aaaa".

The Expected Behavior: shows "mouse-2: some tips".

The Actual Behavior: shows "mouse-1: some tips".

Emacs 29.3 on Windows 10.

Anyone can reproduce it? Thanks.

Best Regards,
Siyuan Chen

[-- Attachment #2: Type: text/html, Size: 1325 bytes --]

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

* bug#71598: Text property "help-echo" display "mouse-x" incorrectly
  2024-06-16 16:34 bug#71598: Text property "help-echo" display "mouse-x" incorrectly Siyuan Chen
@ 2024-06-16 19:03 ` Eli Zaretskii
  2024-06-16 23:47   ` Siyuan Chen
  0 siblings, 1 reply; 4+ messages in thread
From: Eli Zaretskii @ 2024-06-16 19:03 UTC (permalink / raw)
  To: Siyuan Chen; +Cc: 71598

tags 71598 notabug
thanks

> From: Siyuan Chen <chansey97@gmail.com>
> Date: Mon, 17 Jun 2024 00:34:35 +0800
> 
> 1. Open Emacs with -Q
> 
> 2. Copy the following code to *scratch*
> 
> ```
> (with-current-buffer (get-buffer-create "*TestBuffer*")
>   (let ((inhibit-read-only t))
>     (insert (propertize "aaaa"
>                         'mouse-face 'highlight
>                         'follow-link t
>                         'help-echo "mouse-2: some tips"))
>     ))
> ```
> 
> 3. Put the cursor after the last parenthesis and M-x `eval-last-sexp`
> 
> 4. M-x `switch-to-buffer` "*TestBuffer*"
> 
> 5. Put the mouse over "aaaa".
> 
> The Expected Behavior: shows "mouse-2: some tips".
> 
> The Actual Behavior: shows "mouse-1: some tips". 

This is not a bug, but the intended behavior.  It is triggered by the
follow-link text property and the default value of
mouse-1-click-follows-link.  If you don't like this behavior, set
mouse-1-click-follows-link to nil.





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

* bug#71598: Text property "help-echo" display "mouse-x" incorrectly
  2024-06-16 19:03 ` Eli Zaretskii
@ 2024-06-16 23:47   ` Siyuan Chen
  2024-06-22  8:50     ` Eli Zaretskii
  0 siblings, 1 reply; 4+ messages in thread
From: Siyuan Chen @ 2024-06-16 23:47 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: 71598

[-- Attachment #1: Type: text/plain, Size: 1558 bytes --]

 I reported this issue because I once wanted to search the Emacs codebase
for a string, such as "mouse-1: some tips" on mouse hover, but couldn't
find it. Later I realized that it was automatically mapped to "mouse-2".
Emacs seems to recognize some keywords (e.g. "mouse-1", "mouse-2") at the
beginning of the string on help-echo.

Anyway, now I know what happened there.

Thanks.

Best regards,
Siyuan Chen

On Mon, Jun 17, 2024 at 3:03 AM Eli Zaretskii <eliz@gnu.org> wrote:

> tags 71598 notabug
> thanks
>
> > From: Siyuan Chen <chansey97@gmail.com>
> > Date: Mon, 17 Jun 2024 00:34:35 +0800
> >
> > 1. Open Emacs with -Q
> >
> > 2. Copy the following code to *scratch*
> >
> > ```
> > (with-current-buffer (get-buffer-create "*TestBuffer*")
> >   (let ((inhibit-read-only t))
> >     (insert (propertize "aaaa"
> >                         'mouse-face 'highlight
> >                         'follow-link t
> >                         'help-echo "mouse-2: some tips"))
> >     ))
> > ```
> >
> > 3. Put the cursor after the last parenthesis and M-x `eval-last-sexp`
> >
> > 4. M-x `switch-to-buffer` "*TestBuffer*"
> >
> > 5. Put the mouse over "aaaa".
> >
> > The Expected Behavior: shows "mouse-2: some tips".
> >
> > The Actual Behavior: shows "mouse-1: some tips".
>
> This is not a bug, but the intended behavior.  It is triggered by the
> follow-link text property and the default value of
> mouse-1-click-follows-link.  If you don't like this behavior, set
> mouse-1-click-follows-link to nil.
>

[-- Attachment #2: Type: text/html, Size: 2354 bytes --]

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

* bug#71598: Text property "help-echo" display "mouse-x" incorrectly
  2024-06-16 23:47   ` Siyuan Chen
@ 2024-06-22  8:50     ` Eli Zaretskii
  0 siblings, 0 replies; 4+ messages in thread
From: Eli Zaretskii @ 2024-06-22  8:50 UTC (permalink / raw)
  To: Siyuan Chen; +Cc: 71598-done

> From: Siyuan Chen <chansey97@gmail.com>
> Date: Mon, 17 Jun 2024 07:47:40 +0800
> Cc: 71598@debbugs.gnu.org
> 
> I reported this issue because I once wanted to search the Emacs codebase for a string, such as "mouse-1:
> some tips" on mouse hover, but couldn't find it. Later I realized that it was automatically mapped to "mouse-2".
> Emacs seems to recognize some keywords (e.g. "mouse-1", "mouse-2") at the beginning of the string on
> help-echo.
> 
> Anyway, now I know what happened there.

OK, closing.





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

end of thread, other threads:[~2024-06-22  8:50 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-16 16:34 bug#71598: Text property "help-echo" display "mouse-x" incorrectly Siyuan Chen
2024-06-16 19:03 ` Eli Zaretskii
2024-06-16 23:47   ` Siyuan Chen
2024-06-22  8:50     ` 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.