From: Stefan Monnier <monnier@IRO.UMontreal.CA>
To: Benjamin Riefenstahl <b.riefenstahl@turtle-trading.net>
Cc: 22434@debbugs.gnu.org
Subject: bug#22434: 25.0.50; recentf pastes X clipboard upon opening
Date: Wed, 25 May 2016 16:59:14 -0400 [thread overview]
Message-ID: <jwva8jdvppv.fsf-monnier+bug#22434@gnu.org> (raw)
In-Reply-To: <87vb22awhz.fsf@justinian.turtle-trading.net> (Benjamin Riefenstahl's message of "Wed, 25 May 2016 19:16:40 +0200")
> Does the attached fit the bill? It works for me. I hope I got the
> formalities right.
> IMO on master we really should either fix
> mouse--down-1-maybe-follows-link like in #23288 or re-think this
> strategy of generating an event for some random unknown consumer.
Thinking about it some more, I think we have a deeper problem: it's not
just for these recentf buttons that we shouldn't remap mouse-1 to
mouse-2. It's for all widget buttons that have a mouse-1 binding to
widget-button-click (of course, I consider the `down-mouse-1' binding to
widget-button-click to be a bug as well (it should be bound to `mouse-1'
instead) but I'd rather not touch this for now).
The mouse-1 to mouse-2 remapping is to magically let mouse-1 work for
"follow-link" depending on the value of mouse-1-click-follows-link, but
here mouse-1 will always follow the link anyway, so remapping
is undesirable.
AFAIK we inherit the follow-link property from wid-edit's
(define-widget 'link 'item
"An embedded link."
:button-prefix 'widget-link-prefix
:button-suffix 'widget-link-suffix
:follow-link 'mouse-face
:help-echo "Follow the link."
:format "%[%t%]")
but I don't understand why we need this follow-link property there.
I understand that changing this part of wid-edit in emacs-25 is too
risky at this stage, so we'll probably want some stop-gap fix in the
mean time, but I'd prefer for the stop-gap not to add too much ugly hack.
How 'bout the patch below, which seems to do the trick for me?
Stefan
diff --git a/lisp/recentf.el b/lisp/recentf.el
index df7f3e2..cab4a27 100644
--- a/lisp/recentf.el
+++ b/lisp/recentf.el
@@ -1064,7 +1064,7 @@ recentf-dialog-mode-map
(define-key km "q" 'recentf-cancel-dialog)
(define-key km "n" 'next-line)
(define-key km "p" 'previous-line)
- (define-key km [follow-link] "\C-m")
+ ;; (define-key km [follow-link] "\C-m")
km)
"Keymap used in recentf dialogs.")
@@ -1186,7 +1186,10 @@ recentf-open-files-item
:button-face default
:format "%[%t\n%]"
:help-echo ,(concat "Open " (cdr menu-element))
- :action recentf-open-files-action
+ :action ,#'recentf-open-files-action
+ ;; Override the (problematic) follow-link property of the
+ ;; `link' widget (bug#22434).
+ :follow-link nil
,(cdr menu-element))))
(defun recentf-open-files-items (files)
next prev parent reply other threads:[~2016-05-25 20:59 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-22 6:20 bug#22434: 25.0.50; recentf pastes X clipboard upon opening Pascal A. Niklaus
2016-02-28 11:29 ` Yasushi SHOJI
2016-05-21 19:17 ` Paul Eggert
2016-05-21 20:32 ` Stefan Monnier
2016-05-22 17:14 ` Benjamin Riefenstahl
2016-05-22 17:30 ` Eli Zaretskii
2016-05-22 19:12 ` Benjamin Riefenstahl
2016-05-22 20:02 ` Benjamin Riefenstahl
2016-05-24 16:11 ` Eli Zaretskii
2016-05-25 17:16 ` Benjamin Riefenstahl
2016-05-25 20:59 ` Stefan Monnier [this message]
2016-05-29 14:55 ` Stefan Monnier
2016-05-29 16:52 ` Benjamin Riefenstahl
2016-05-30 0:35 ` Stefan Monnier
2016-05-30 15:41 ` Benjamin Riefenstahl
2016-05-30 16:35 ` Stefan Monnier
2016-05-30 16:48 ` Benjamin Riefenstahl
2016-05-31 0:46 ` Stefan Monnier
2016-05-31 19:17 ` Benjamin Riefenstahl
2016-05-30 0:47 ` Stefan Monnier
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='jwva8jdvppv.fsf-monnier+bug#22434@gnu.org' \
--to=monnier@iro.umontreal.ca \
--cc=22434@debbugs.gnu.org \
--cc=b.riefenstahl@turtle-trading.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.