From: "tomas@tuxteam.de" <tomas@tuxteam.de>
To: Drew Adams <drew.adams@oracle.com>
Cc: "emacs-devel@gnu.org" <emacs-devel@gnu.org>
Subject: Re: [External] : Re: Fix for `use-region-p' problem [was: Elisp test for whether `mouse-1' is pressed?]
Date: Tue, 9 Nov 2021 17:58:52 +0100 [thread overview]
Message-ID: <20211109165852.GA28026@tuxteam.de> (raw)
In-Reply-To: <SJ0PR10MB5488A66A614DB36D76DD42B0F3929@SJ0PR10MB5488.namprd10.prod.outlook.com>
[-- Attachment #1: Type: text/plain, Size: 1099 bytes --]
On Tue, Nov 09, 2021 at 04:17:01PM +0000, Drew Adams wrote:
> > Oh, I think I get it now. So I did the following experiment:
> >
> > (setq my-timer
> > (run-with-timer 0 0.05
> > (lambda()
> > (message "%s REG=%s"
> > (current-time-string)
> > (use-region-p)))))
> ...
>
> Cool. Thanks for trying, and looking into it.
>
> > Now while the above is running, when I click with mouse-1, REG
> > says "nil" /until/ I move the mouse far enough that the region
> > is at least one char wide: then REG says t. If I go back to the
> > starting point (while keeping mouse-1 down all the time), REG
> > says nil again.
>
> That's exactly right. That's the point of the fix.
>
> I know that you're talking about using that recipe
> _without_ the fix. And you're right, in what you say.
>
> But only when option `use-empty-active-region' is nil.
Oh, now I see it, too. Thanks.
In this light, I'd think your fix makes sense.
Cheers
- t
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
prev parent reply other threads:[~2021-11-09 16:58 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-07 23:26 Fix for `use-region-p' problem [was: Elisp test for whether `mouse-1' is pressed?] Drew Adams
2021-11-08 8:28 ` tomas
2021-11-08 18:32 ` [External] : " Drew Adams
2021-11-09 11:29 ` tomas
2021-11-09 16:17 ` Drew Adams
2021-11-09 16:58 ` tomas [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=20211109165852.GA28026@tuxteam.de \
--to=tomas@tuxteam.de \
--cc=drew.adams@oracle.com \
--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).