From: Davis Herring <herring@lanl.gov>
Cc: emacs-devel@gnu.org
Subject: Mouse-drags wait to call post-command-hook
Date: Wed, 25 Aug 2004 10:05:04 -0600 (MDT) [thread overview]
Message-ID: <Pine.LNX.4.44.0408250957190.31548-100000@x-mail.lanl.gov> (raw)
In-Reply-To: <412B2A03.8080309@swipnet.se>
I think this may be its own issue, so I'll isolate it (and talk more about
X selections in later email):
> > They disagree a notable amount of the time, and `x-lost-selection-hooks'
> > is never called with PRIMARY as an argument unless the keyboard is used to
> > kill text. Meanwhile CLIPBOARD appears to call the hooks every time.
>
> I still can not reproduce this. You need to supply an explicit test case, i.e.
> a step by step description of how to reproduce this.
The mouse-dependence may be related to the fact that mouse-drags do not
call `post-command-hook' until another event is received.
emacs -q -f ielm
*** Welcome to IELM *** Type (describe-mode) for help.
ELISP> (defvar pcm-counter 0
"Counter of `post-command-hook' executions.")
pcm-counter
ELISP> (defun pcm-message ()
"Count `post-command-hook' executions."
(message "PCM: %s" (setq pcm-counter (1+ pcm-counter))))
pcm-message
ELISP> (add-hook 'post-command-hook 'pcm-message)
(pcm-message)
ELISP>
Then drag-select some text in the buffer; no message is generated. But
then press C-f, and the counter increments twice. This leads me to
suspect that the drag isn't "finalized" in some way until the next
command, which would explain why the X selection behavior depends on
whether the most recent event was a mouse-drag.
Is there some reason for this behavior? If it's just a bug, perhaps
fixing it will fix (or make easier to fix) the X issues.
Davis Herring
--
This product is sold by volume, not by mass. If it seems too dense or too
sparse, it means mass-energy conversion has occurred during shipping.
prev parent reply other threads:[~2004-08-25 16:05 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-08-17 18:52 Issues with X selection handling Davis Herring
2004-08-19 18:07 ` Jan D.
2004-08-24 1:18 ` Davis Herring
2004-08-24 1:38 ` Davis Herring
2004-08-24 11:44 ` Jan D.
2004-08-25 16:05 ` Davis Herring [this message]
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Pine.LNX.4.44.0408250957190.31548-100000@x-mail.lanl.gov \
--to=herring@lanl.gov \
--cc=emacs-devel@gnu.org \
/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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).