From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: "tomas@tuxteam.de" Newsgroups: gmane.emacs.devel 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 Message-ID: <20211109165852.GA28026@tuxteam.de> References: <20211108082814.GA4971@tuxteam.de> <20211109112903.GC13092@tuxteam.de> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="TB36FDmn/VVEgNH/" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="1368"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mutt/1.5.21 (2010-09-15) Cc: "emacs-devel@gnu.org" To: Drew Adams Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Nov 09 18:01:59 2021 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mkUVS-000AeX-1t for ged-emacs-devel@m.gmane-mx.org; Tue, 09 Nov 2021 18:01:58 +0100 Original-Received: from localhost ([::1]:33316 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mkUVP-0003kj-0y for ged-emacs-devel@m.gmane-mx.org; Tue, 09 Nov 2021 12:01:56 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:57646) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mkUSY-0000ZR-8C for emacs-devel@gnu.org; Tue, 09 Nov 2021 11:58:58 -0500 Original-Received: from mail.tuxteam.de ([5.199.139.25]:39997) by eggs.gnu.org with esmtps (TLS1.2:DHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.90_1) (envelope-from ) id 1mkUSV-00049c-Rb for emacs-devel@gnu.org; Tue, 09 Nov 2021 11:58:57 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tuxteam.de; s=mail; h=In-Reply-To:Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date; bh=hgVO1Q62P49349tURXYBmTD6ZtIM6QD+oQyw8GCatTE=; b=BBub3AT+lUN+/2XWimfbzhoKi7FxtZa7UZkFB3UCPUHpLzxkROZJfvTXjH2TSwsz4BGY6FmFJduD2W6qDnNgfFbP1oTOLOdzL7faSkgXJu+GRPud18hGNk16LQ/Of2TgUN3yEkVw7vtUMElZRdLp4K8domkANaAx5SCBctGtux5DuYGEe+Zrb2cwAjjRTvkbCzM0LfIpITMe4v914vo4DuAWaLb+L8hIv2nh7KUzf6a135EA1B2tOEg/AyR5Ft1DRku/iiTbLGtBBjb8PXXK2PNo78XdDsaeCNvEmHt0xihG1iJZYxrWo+KmOwZ3U8/8prT5t93U7+ys/U1csG0rIg==; Original-Received: from tomas by mail.tuxteam.de with local (Exim 4.80) (envelope-from ) id 1mkUSS-0007KJ-St; Tue, 09 Nov 2021 17:58:52 +0100 Content-Disposition: inline In-Reply-To: Received-SPF: pass client-ip=5.199.139.25; envelope-from=tomas@tuxteam.de; helo=mail.tuxteam.de X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:279112 Archived-At: --TB36FDmn/VVEgNH/ Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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: > >=20 > > (setq my-timer > > (run-with-timer 0 0.05 > > (lambda() > > (message "%s REG=3D%s" > > (current-time-string) > > (use-region-p))))) > ... >=20 > Cool. Thanks for trying, and looking into it. >=20 > > 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. >=20 > That's exactly right. That's the point of the fix. >=20 > I know that you're talking about using that recipe > _without_ the fix. And you're right, in what you say. >=20 > 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 --TB36FDmn/VVEgNH/ Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) iEYEARECAAYFAmGKqMwACgkQBcgs9XrR2kYTZQCfWDPAKvs849Wda372tC2YfarU ptQAn0G9WUtMQG4ZOXpPHXdosPHSRntG =ITJ/ -----END PGP SIGNATURE----- --TB36FDmn/VVEgNH/--