From unknown Thu Jun 19 14:09:53 2025 X-Loop: help-debbugs@gnu.org Subject: bug#60080: 28.2; Double-click selection cannot be customized Resent-From: Sean Devlin Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 15 Dec 2022 00:41:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 60080 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 60080@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.167106484411707 (code B ref -1); Thu, 15 Dec 2022 00:41:02 +0000 Received: (at submit) by debbugs.gnu.org; 15 Dec 2022 00:40:44 +0000 Received: from localhost ([127.0.0.1]:42197 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p5cIl-00032l-RJ for submit@debbugs.gnu.org; Wed, 14 Dec 2022 19:40:44 -0500 Received: from lists.gnu.org ([209.51.188.17]:48714) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p5cIj-00032f-Ac for submit@debbugs.gnu.org; Wed, 14 Dec 2022 19:40:42 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p5cIj-0007qs-1h for bug-gnu-emacs@gnu.org; Wed, 14 Dec 2022 19:40:41 -0500 Received: from mail-qt1-x832.google.com ([2607:f8b0:4864:20::832]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1p5cIh-00057J-1a for bug-gnu-emacs@gnu.org; Wed, 14 Dec 2022 19:40:40 -0500 Received: by mail-qt1-x832.google.com with SMTP id fu10so4055649qtb.0 for ; Wed, 14 Dec 2022 16:40:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=toadstyle-org.20210112.gappssmtp.com; s=20210112; h=to:date:message-id:subject:mime-version:content-transfer-encoding :from:from:to:cc:subject:date:message-id:reply-to; bh=o4mLnS16lGfHQ5xNzhGLtcOPK4MBD2PFTfLUfRNtPvA=; b=A4EauM//rdRSllwUQn0aIRvFaSL8GsP+qokXDEDHkKsur03+VzXM9mjreXiYzi03RY +TJFJlinvnRQ5VJ/5iYEOr9eDlCSiAVZMatQX4TCt1RYejIY0guCYaFOIir7T/k0/wLi RLxcLo5NBpoMu9yt9ltwxq9RU/bmMQj9+mbFl/D6TfLa3gvCa7WXqULUUE4gw/kUESNU 0I5rseCl+RMfGdDzCx/3ZPwYQMYaI/DeZhX5zwIsLPeFvaGDzjf1yk8kwL3t4uD9fxDP 1d+NB9ZyrqlHA2ztQmIXNBq2cXQys6XHwLrbLpflZ4V9LIfC6qrVHQm5a9vBorKqTJiG edrw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:date:message-id:subject:mime-version:content-transfer-encoding :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=o4mLnS16lGfHQ5xNzhGLtcOPK4MBD2PFTfLUfRNtPvA=; b=5/d1vHdhLSLxaNZhfp1At27lSpNpOT6gLzhJ2Kb0caHxN9RS720qNXQcKfmwcURLkO yAQMDXD89DekGKlpzEhA9iIK44F+dCon540IUVVPJBYUU3K9P6fZ5hwXiMOrY+7r5AFK 7XA+svKfSUmrm+vL8O6jXTnZqT+jxE1c0idL8yrxBWuI7nCDqUskgfXyc8Q9UJrNX+ox ISWKtxOY9JGtWg2ELlIH4sj1YnqDrzpderjOIWRi1EwgzwLpPME3nUcp9sv35msyyi4b Cy8Qhbh9Nh/t842lTetPwIIe11+r9FQ+yzl3wJCUhDR942Gz9uMi0YnpoGitHKEr/c4z l0Ew== X-Gm-Message-State: ANoB5plDT/xGfFmYRt6yrpN/SS8VN7rnFJ3kFpGjIOskmWK9RKwJVwMB hA09dBhimpUWqfHidSSIKbrNhBtPEC18klS+ X-Google-Smtp-Source: AA0mqf6swJ13t7RlGp8O5sjKXnZ01dNdJlFbT1OhB93aH4C7GqJhVdOhvTnVMfdq1s5rld33ecBxZw== X-Received: by 2002:a05:622a:194:b0:39c:da20:d4a5 with SMTP id s20-20020a05622a019400b0039cda20d4a5mr44228814qtw.58.1671064833835; Wed, 14 Dec 2022 16:40:33 -0800 (PST) Received: from smtpclient.apple ([70.107.172.48]) by smtp.gmail.com with ESMTPSA id l11-20020ac848cb000000b003a689a5b177sm2544160qtr.8.2022.12.14.16.40.33 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 14 Dec 2022 16:40:33 -0800 (PST) From: Sean Devlin Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.300.101.1.2\)) Message-Id: <6B7419C1-47D1-43FF-8E6E-C3A4898089EF@toadstyle.org> Date: Wed, 14 Dec 2022 19:40:22 -0500 X-Mailer: Apple Mail (2.3731.300.101.1.2) Received-SPF: pass client-ip=2607:f8b0:4864:20::832; envelope-from=spd@toadstyle.org; helo=mail-qt1-x832.google.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) Hi folks, In GUI Emacs, you can double-click to select some region of text. The rules for double-click selection are documented in (info "(emacs) Word and Line Mouse"). Here are the relevant bits: Select the text around the word or character which you click on. Double-clicking on a character with symbol syntax (such as underscore, in C mode) selects the symbol surrounding that character. I'd like to customize Emacs such that when I double-click on a word, the entire enclosing symbol is selected. In other words, it should behave more like the latter case of double-clicking on a character with symbol syntax. Here is a recipe to show what I am talking about: 1. Open GUI Emacs with -Q flag. 2. In the scratch buffer, type "this-is-a-symbol". 3. With the mouse, double-click on "this". 4. Observe that only "this" is selected in the active region. 5. C-g to deactive the region. 6. Double-click on the "-" following "this". 7. Observe that the entire symbol "this-is-a-symbol" is selected. I want to select the full symbol "this-is-a-symbol" in both cases. Note that this is the default behavior in some other editors that I am aware of. I understand that I can get the behavior I want by double-clicking the "-", but "-" is a small target, and selecting the entire symbol is by far the more common use case for me. In the short term, I have a workaround where I advise the mouse-skip-word function. Thanks! In GNU Emacs 28.2 System Description: macOS 13 Configured using: 'configure --with-ns '--enable-locallisppath=/Library/Application Support/Emacs/${version}/site-lisp:/Library/Application Support/Emacs/site-lisp' --with-modules' Configured features: ACL GMP GNUTLS JSON LIBXML2 MODULES NOTIFY KQUEUE NS PDUMPER THREADS TOOLKIT_SCROLL_BARS ZLIB Important settings: value of $LANG: en_US.UTF-8 locale-coding-system: utf-8-unix Major mode: Lisp Interaction Minor modes in effect: tooltip-mode: t global-eldoc-mode: t eldoc-mode: t show-paren-mode: t electric-indent-mode: t mouse-wheel-mode: t tool-bar-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t indent-tabs-mode: t transient-mark-mode: t Load-path shadows: None found. Features: (shadow sort mail-extr emacsbug message rmc puny dired dired-loaddefs rfc822 mml mml-sec epa derived epg rfc6068 epg-config gnus-util rmail rmail-loaddefs auth-source cl-seq eieio eieio-core cl-macs eieio-loaddefs password-cache json map text-property-search seq byte-opt gv bytecomp byte-compile cconv mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils time-date subr-x cl-loaddefs cl-lib iso-transl tooltip eldoc paren electric uniquify ediff-hook vc-hooks lisp-float-type elisp-mode mwheel term/ns-win ns-win ucs-normalize mule-util term/common-win tool-bar dnd fontset image regexp-opt fringe tabulated-list replace newcomment text-mode lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow isearch easymenu timer select scroll-bar mouse jit-lock font-lock syntax font-core term/tty-colors frame minibuffer cl-generic cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese composite emoji-zwj charscript charprop case-table epa-hook jka-cmpr-hook help simple abbrev obarray cl-preloaded nadvice button loaddefs faces cus-face macroexp files window text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote threads kqueue cocoa ns multi-tty make-network-process emacs) Memory information: ((conses 16 49949 6483) (symbols 48 6552 1) (strings 32 18286 1523) (string-bytes 1 606914) (vectors 16 12898) (vector-slots 8 184857 11573) (floats 8 21 51) (intervals 56 198 0) (buffers 992 10)) From unknown Thu Jun 19 14:09:53 2025 X-Loop: help-debbugs@gnu.org Subject: bug#60080: 28.2; Double-click selection cannot be customized Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 15 Dec 2022 07:34:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 60080 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Sean Devlin Cc: 60080@debbugs.gnu.org Received: via spool by 60080-submit@debbugs.gnu.org id=B60080.167108961829668 (code B ref 60080); Thu, 15 Dec 2022 07:34:01 +0000 Received: (at 60080) by debbugs.gnu.org; 15 Dec 2022 07:33:38 +0000 Received: from localhost ([127.0.0.1]:42452 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p5ikL-0007iS-Uj for submit@debbugs.gnu.org; Thu, 15 Dec 2022 02:33:38 -0500 Received: from eggs.gnu.org ([209.51.188.92]:44812) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p5ikK-0007iH-5E for 60080@debbugs.gnu.org; Thu, 15 Dec 2022 02:33:36 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p5ikE-0001Vb-Gi; Thu, 15 Dec 2022 02:33:30 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=Wj5dmiN1AiXpY3mNH6vPpcPCizzgU3K/DkcDLjUFDUQ=; b=C2yHpZx7i/AA 1oEgsT/tuQkRX/XkzWFzbbOwUJOOGph/o7oBCAUYGGV/oxvprHy8HEwx5UakysT78AId1z9kg4aoW Vi/7jeO4HmFJCbHs4c5HkwUguFVrJV2R+IyYf1ITEmOa5ie/VN/cTUpFNL1kBNzK6vCFmoAuHxSa6 Vv/yFOHBn0gd4NCJFYs815hvLbCClzaU035ZL+3sJaDVZYGZMaCjTmHX5rw/lY+trWICI5DOdFeYC l+OcjQiVEsaVjSSjXFudaBgxgO40FMcx2kOBOWC4W0kdX5ZYuKvSTRFAIr2dH/rDm6o0Uj2dU04YK ejIgCOnm4aorAmKEDRwINw==; Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p5ik3-0007Zg-NL; Thu, 15 Dec 2022 02:33:29 -0500 Date: Thu, 15 Dec 2022 09:33:18 +0200 Message-Id: <83tu1xktoh.fsf@gnu.org> From: Eli Zaretskii In-Reply-To: <6B7419C1-47D1-43FF-8E6E-C3A4898089EF@toadstyle.org> (message from Sean Devlin on Wed, 14 Dec 2022 19:40:22 -0500) References: <6B7419C1-47D1-43FF-8E6E-C3A4898089EF@toadstyle.org> X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Sean Devlin > Date: Wed, 14 Dec 2022 19:40:22 -0500 > > I'd like to customize Emacs such that when I double-click on a word, > the entire enclosing symbol is selected. In other words, it should > behave more like the latter case of double-clicking on a character with > symbol syntax. Does the patch below do what you want? If it does, we could provide this as an optional behavior, conditioned by some new user option. diff --git a/lisp/mouse.el b/lisp/mouse.el index f72ab4f..ced7a92 100644 --- a/lisp/mouse.el +++ b/lisp/mouse.el @@ -1803,7 +1803,11 @@ mouse-skip-word If DIR is positive skip forward; if negative, skip backward." (let* ((char (following-char)) (syntax (char-to-string (char-syntax char)))) - (cond ((string= syntax "w") + (cond ((bounds-of-thing-at-point 'symbol) + (goto-char (if (< dir 0) + (car (bounds-of-thing-at-point 'symbol)) + (cdr (bounds-of-thing-at-point 'symbol))))) + ((string= syntax "w") ;; Here, we can't use skip-syntax-forward/backward because ;; they don't pay attention to word-separating-categories, ;; and thus they will skip over a true word boundary. So, From unknown Thu Jun 19 14:09:53 2025 X-Loop: help-debbugs@gnu.org Subject: bug#60080: 28.2; Double-click selection cannot be customized Resent-From: Sean Devlin Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 15 Dec 2022 19:20:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 60080 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: Eli Zaretskii Cc: 60080@debbugs.gnu.org Received: via spool by 60080-submit@debbugs.gnu.org id=B60080.1671131976935 (code B ref 60080); Thu, 15 Dec 2022 19:20:02 +0000 Received: (at 60080) by debbugs.gnu.org; 15 Dec 2022 19:19:36 +0000 Received: from localhost ([127.0.0.1]:44421 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p5tlY-0000F1-5M for submit@debbugs.gnu.org; Thu, 15 Dec 2022 14:19:36 -0500 Received: from mail-qt1-f180.google.com ([209.85.160.180]:36458) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p5tlU-0000Ev-Sx for 60080@debbugs.gnu.org; Thu, 15 Dec 2022 14:19:34 -0500 Received: by mail-qt1-f180.google.com with SMTP id fz10so389666qtb.3 for <60080@debbugs.gnu.org>; Thu, 15 Dec 2022 11:19:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=toadstyle-org.20210112.gappssmtp.com; s=20210112; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=1qAaKpwKsWUEtoiOKti5Wc3ufsrY5aQnls+XP6t2UMk=; b=vrhAjcp6aMugHq6MBv1W5tvpM3Na2ERCjWMHEnEDR87355/rUAUK9YMWMMXk7kS6J/ +dlNc4+RsEF13a04l8vnBaDqapw+RzQ6r+D3YNc66JUaelbO9MVlV2ig1WsR2Xj+X6ZD H6m5X/Omz2is5TNXrmEtqrF/3n7/3vvakNH7IYVCpmFltJ2YPmPcqcmZIKLUnmhOwqgB 7/IMAJqgJNxYA/KWf2GaQp7zSg81UoLy7oL0+HWNYvKe5RE9geQGCGduU9iBVVebNJ3M jU27K/fpq7Te1wKKlAtkIjJrWweSLpjkcCoRRrg20eqsngq3Wo7689jIjJwp1tq5fMHn XmJw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=1qAaKpwKsWUEtoiOKti5Wc3ufsrY5aQnls+XP6t2UMk=; b=KKaRlfO9LDN/mM00isuQbRasGuuO5JSbOffIDVUgSrXcb9GXbAiC9HLTsVfuvNJhXX bjiqq9fCyHenEZbywAlJ3zREgL2mWZsmhBvUw8JNnISF30C3RTyMQYuuWFedC3yN5o9a DRCpuFMbQ9fJV5LaxAraruFfHeEK9PDkDvTNZFmbZGJptDEcZuTyHQiYNTE10mHEidJn GiyTPFKmnj1H5KU+ovAHXoXb/E7uAD0RpQ5HQungJJrKcu6jbOFG9yEy65kXvYz9ye1E zIGjWCquggIzkFyar7j0yGWGhdD6CkUUfcD4jM7dmsna4Q+4wycaHISvU1jDZodmRdeN vBsQ== X-Gm-Message-State: ANoB5pl48p2dkPtpCmUCdjJq+0UgjaPD6IgzuPo/9GawqXHAUAx+1FR1 x3pSbSJbbavohjS6RbecGLaHkHb7OJU9j5Wg X-Google-Smtp-Source: AA0mqf5xAuXe6nOxRTUrzSkuvM0PFG/LXURToCYUXhSwWjBtLJaiLSrQTY3k9muIM3OA3N7sZB/C8A== X-Received: by 2002:a05:622a:1a9f:b0:3a6:a71e:c763 with SMTP id s31-20020a05622a1a9f00b003a6a71ec763mr54921278qtc.35.1671131967338; Thu, 15 Dec 2022 11:19:27 -0800 (PST) Received: from smtpclient.apple ([70.107.172.48]) by smtp.gmail.com with ESMTPSA id g1-20020ac84801000000b0038d9555b580sm3886418qtq.44.2022.12.15.11.19.26 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 15 Dec 2022 11:19:26 -0800 (PST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.300.101.1.2\)) From: Sean Devlin In-Reply-To: <83tu1xktoh.fsf@gnu.org> Date: Thu, 15 Dec 2022 14:19:16 -0500 Content-Transfer-Encoding: 7bit Message-Id: <9EEEC308-CA4C-4152-8CB9-825469C82034@toadstyle.org> References: <6B7419C1-47D1-43FF-8E6E-C3A4898089EF@toadstyle.org> <83tu1xktoh.fsf@gnu.org> X-Mailer: Apple Mail (2.3731.300.101.1.2) X-Spam-Score: -0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hi Eli, > On Dec 15, 2022, at 2:33 AM, Eli Zaretskii wrote: > >> From: Sean Devlin >> Date: Wed, 14 Dec 2022 19:40:22 -0500 >> >> I'd like to customize Emacs such that when I double-click on a word, >> the entire enclosing symbol is selected. In other words, it should >> behave more like the latter case of double-clicking on a character with >> symbol syntax. > > Does the patch below do what you want? > > If it does, we could provide this as an optional behavior, conditioned > by some new user option. Yes, this seems to do the trick. I agree that a user option would make sense. Thanks for looking at this so quickly! > > diff --git a/lisp/mouse.el b/lisp/mouse.el > index f72ab4f..ced7a92 100644 > --- a/lisp/mouse.el > +++ b/lisp/mouse.el > @@ -1803,7 +1803,11 @@ mouse-skip-word > If DIR is positive skip forward; if negative, skip backward." > (let* ((char (following-char)) > (syntax (char-to-string (char-syntax char)))) > - (cond ((string= syntax "w") > + (cond ((bounds-of-thing-at-point 'symbol) > + (goto-char (if (< dir 0) > + (car (bounds-of-thing-at-point 'symbol)) > + (cdr (bounds-of-thing-at-point 'symbol))))) > + ((string= syntax "w") > ;; Here, we can't use skip-syntax-forward/backward because > ;; they don't pay attention to word-separating-categories, > ;; and thus they will skip over a true word boundary. So, From unknown Thu Jun 19 14:09:53 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Sean Devlin Subject: bug#60080: closed (Re: bug#60080: 28.2; Double-click selection cannot be customized) Message-ID: References: <834jtvjosg.fsf@gnu.org> <6B7419C1-47D1-43FF-8E6E-C3A4898089EF@toadstyle.org> X-Gnu-PR-Message: they-closed 60080 X-Gnu-PR-Package: emacs Reply-To: 60080@debbugs.gnu.org Date: Fri, 16 Dec 2022 16:30:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1671208202-5714-1" This is a multi-part message in MIME format... ------------=_1671208202-5714-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #60080: 28.2; Double-click selection cannot be customized which was filed against the emacs package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 60080@debbugs.gnu.org. --=20 60080: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D60080 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1671208202-5714-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 60080-done) by debbugs.gnu.org; 16 Dec 2022 16:29:03 +0000 Received: from localhost ([127.0.0.1]:50300 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p6Da3-0001Tb-9V for submit@debbugs.gnu.org; Fri, 16 Dec 2022 11:29:03 -0500 Received: from eggs.gnu.org ([209.51.188.92]:47816) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p6Da0-0001TE-SP for 60080-done@debbugs.gnu.org; Fri, 16 Dec 2022 11:29:02 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p6DZt-0001bz-0q; Fri, 16 Dec 2022 11:28:55 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=urm+aUxAvjwM8JgnXZHVTg6E2gCZ12NvMOyhCrSY8Rs=; b=GG2R/Vhcs3gZ tzeMbXkhNq2hBMKvYfUKc6FO+f6IrYI5yDEUPQH9SVOqfv/Jnk2YCSGchRpKhw2stPqK/SZbU1tSO RORrIAwbOXYtvvqR8GAJ9gM8VC/EuC4sIbs0616nQg0J4g9Dvi1eZfYsBR+410VDX25bFPwJUbxJc eQFa5qmWLqjtnKTKLZh9tpy1tX0eM17zEoC5i5R+5lMbCCW1MUXqOuvb0Zu8dGUOam2eoOuHEagt6 zT2dsCQ0vQOmk5GQYKYoetI9BHRp4IWh3I2PHqajTWL8eAEVHW+znHoFykjcxQaVquVumZ3FkoWd6 lgFHhpVOKjnEAuwmcqYPTQ==; Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p6DZk-0006GO-Bk; Fri, 16 Dec 2022 11:28:48 -0500 Date: Fri, 16 Dec 2022 18:28:47 +0200 Message-Id: <834jtvjosg.fsf@gnu.org> From: Eli Zaretskii To: Sean Devlin In-Reply-To: <9EEEC308-CA4C-4152-8CB9-825469C82034@toadstyle.org> (message from Sean Devlin on Thu, 15 Dec 2022 14:19:16 -0500) Subject: Re: bug#60080: 28.2; Double-click selection cannot be customized References: <6B7419C1-47D1-43FF-8E6E-C3A4898089EF@toadstyle.org> <83tu1xktoh.fsf@gnu.org> <9EEEC308-CA4C-4152-8CB9-825469C82034@toadstyle.org> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 60080-done Cc: 60080-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Sean Devlin > Date: Thu, 15 Dec 2022 14:19:16 -0500 > Cc: 60080@debbugs.gnu.org > > >> I'd like to customize Emacs such that when I double-click on a word, > >> the entire enclosing symbol is selected. In other words, it should > >> behave more like the latter case of double-clicking on a character with > >> symbol syntax. > > > > Does the patch below do what you want? > > > > If it does, we could provide this as an optional behavior, conditioned > > by some new user option. > > Yes, this seems to do the trick. > > I agree that a user option would make sense. Thanks, so I installed the change with the new option on the master branch, and I'm therefore closing this bug. ------------=_1671208202-5714-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 15 Dec 2022 00:40:44 +0000 Received: from localhost ([127.0.0.1]:42197 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p5cIl-00032l-RJ for submit@debbugs.gnu.org; Wed, 14 Dec 2022 19:40:44 -0500 Received: from lists.gnu.org ([209.51.188.17]:48714) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1p5cIj-00032f-Ac for submit@debbugs.gnu.org; Wed, 14 Dec 2022 19:40:42 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1p5cIj-0007qs-1h for bug-gnu-emacs@gnu.org; Wed, 14 Dec 2022 19:40:41 -0500 Received: from mail-qt1-x832.google.com ([2607:f8b0:4864:20::832]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1p5cIh-00057J-1a for bug-gnu-emacs@gnu.org; Wed, 14 Dec 2022 19:40:40 -0500 Received: by mail-qt1-x832.google.com with SMTP id fu10so4055649qtb.0 for ; Wed, 14 Dec 2022 16:40:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=toadstyle-org.20210112.gappssmtp.com; s=20210112; h=to:date:message-id:subject:mime-version:content-transfer-encoding :from:from:to:cc:subject:date:message-id:reply-to; bh=o4mLnS16lGfHQ5xNzhGLtcOPK4MBD2PFTfLUfRNtPvA=; b=A4EauM//rdRSllwUQn0aIRvFaSL8GsP+qokXDEDHkKsur03+VzXM9mjreXiYzi03RY +TJFJlinvnRQ5VJ/5iYEOr9eDlCSiAVZMatQX4TCt1RYejIY0guCYaFOIir7T/k0/wLi RLxcLo5NBpoMu9yt9ltwxq9RU/bmMQj9+mbFl/D6TfLa3gvCa7WXqULUUE4gw/kUESNU 0I5rseCl+RMfGdDzCx/3ZPwYQMYaI/DeZhX5zwIsLPeFvaGDzjf1yk8kwL3t4uD9fxDP 1d+NB9ZyrqlHA2ztQmIXNBq2cXQys6XHwLrbLpflZ4V9LIfC6qrVHQm5a9vBorKqTJiG edrw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:date:message-id:subject:mime-version:content-transfer-encoding :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=o4mLnS16lGfHQ5xNzhGLtcOPK4MBD2PFTfLUfRNtPvA=; b=5/d1vHdhLSLxaNZhfp1At27lSpNpOT6gLzhJ2Kb0caHxN9RS720qNXQcKfmwcURLkO yAQMDXD89DekGKlpzEhA9iIK44F+dCon540IUVVPJBYUU3K9P6fZ5hwXiMOrY+7r5AFK 7XA+svKfSUmrm+vL8O6jXTnZqT+jxE1c0idL8yrxBWuI7nCDqUskgfXyc8Q9UJrNX+ox ISWKtxOY9JGtWg2ELlIH4sj1YnqDrzpderjOIWRi1EwgzwLpPME3nUcp9sv35msyyi4b Cy8Qhbh9Nh/t842lTetPwIIe11+r9FQ+yzl3wJCUhDR942Gz9uMi0YnpoGitHKEr/c4z l0Ew== X-Gm-Message-State: ANoB5plDT/xGfFmYRt6yrpN/SS8VN7rnFJ3kFpGjIOskmWK9RKwJVwMB hA09dBhimpUWqfHidSSIKbrNhBtPEC18klS+ X-Google-Smtp-Source: AA0mqf6swJ13t7RlGp8O5sjKXnZ01dNdJlFbT1OhB93aH4C7GqJhVdOhvTnVMfdq1s5rld33ecBxZw== X-Received: by 2002:a05:622a:194:b0:39c:da20:d4a5 with SMTP id s20-20020a05622a019400b0039cda20d4a5mr44228814qtw.58.1671064833835; Wed, 14 Dec 2022 16:40:33 -0800 (PST) Received: from smtpclient.apple ([70.107.172.48]) by smtp.gmail.com with ESMTPSA id l11-20020ac848cb000000b003a689a5b177sm2544160qtr.8.2022.12.14.16.40.33 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 14 Dec 2022 16:40:33 -0800 (PST) From: Sean Devlin Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.300.101.1.2\)) Subject: 28.2; Double-click selection cannot be customized Message-Id: <6B7419C1-47D1-43FF-8E6E-C3A4898089EF@toadstyle.org> Date: Wed, 14 Dec 2022 19:40:22 -0500 To: bug-gnu-emacs@gnu.org X-Mailer: Apple Mail (2.3731.300.101.1.2) Received-SPF: pass client-ip=2607:f8b0:4864:20::832; envelope-from=spd@toadstyle.org; helo=mail-qt1-x832.google.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) Hi folks, In GUI Emacs, you can double-click to select some region of text. The rules for double-click selection are documented in (info "(emacs) Word and Line Mouse"). Here are the relevant bits: Select the text around the word or character which you click on. Double-clicking on a character with symbol syntax (such as underscore, in C mode) selects the symbol surrounding that character. I'd like to customize Emacs such that when I double-click on a word, the entire enclosing symbol is selected. In other words, it should behave more like the latter case of double-clicking on a character with symbol syntax. Here is a recipe to show what I am talking about: 1. Open GUI Emacs with -Q flag. 2. In the scratch buffer, type "this-is-a-symbol". 3. With the mouse, double-click on "this". 4. Observe that only "this" is selected in the active region. 5. C-g to deactive the region. 6. Double-click on the "-" following "this". 7. Observe that the entire symbol "this-is-a-symbol" is selected. I want to select the full symbol "this-is-a-symbol" in both cases. Note that this is the default behavior in some other editors that I am aware of. I understand that I can get the behavior I want by double-clicking the "-", but "-" is a small target, and selecting the entire symbol is by far the more common use case for me. In the short term, I have a workaround where I advise the mouse-skip-word function. Thanks! In GNU Emacs 28.2 System Description: macOS 13 Configured using: 'configure --with-ns '--enable-locallisppath=/Library/Application Support/Emacs/${version}/site-lisp:/Library/Application Support/Emacs/site-lisp' --with-modules' Configured features: ACL GMP GNUTLS JSON LIBXML2 MODULES NOTIFY KQUEUE NS PDUMPER THREADS TOOLKIT_SCROLL_BARS ZLIB Important settings: value of $LANG: en_US.UTF-8 locale-coding-system: utf-8-unix Major mode: Lisp Interaction Minor modes in effect: tooltip-mode: t global-eldoc-mode: t eldoc-mode: t show-paren-mode: t electric-indent-mode: t mouse-wheel-mode: t tool-bar-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t indent-tabs-mode: t transient-mark-mode: t Load-path shadows: None found. Features: (shadow sort mail-extr emacsbug message rmc puny dired dired-loaddefs rfc822 mml mml-sec epa derived epg rfc6068 epg-config gnus-util rmail rmail-loaddefs auth-source cl-seq eieio eieio-core cl-macs eieio-loaddefs password-cache json map text-property-search seq byte-opt gv bytecomp byte-compile cconv mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils time-date subr-x cl-loaddefs cl-lib iso-transl tooltip eldoc paren electric uniquify ediff-hook vc-hooks lisp-float-type elisp-mode mwheel term/ns-win ns-win ucs-normalize mule-util term/common-win tool-bar dnd fontset image regexp-opt fringe tabulated-list replace newcomment text-mode lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow isearch easymenu timer select scroll-bar mouse jit-lock font-lock syntax font-core term/tty-colors frame minibuffer cl-generic cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese composite emoji-zwj charscript charprop case-table epa-hook jka-cmpr-hook help simple abbrev obarray cl-preloaded nadvice button loaddefs faces cus-face macroexp files window text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote threads kqueue cocoa ns multi-tty make-network-process emacs) Memory information: ((conses 16 49949 6483) (symbols 48 6552 1) (strings 32 18286 1523) (string-bytes 1 606914) (vectors 16 12898) (vector-slots 8 184857 11573) (floats 8 21 51) (intervals 56 198 0) (buffers 992 10)) ------------=_1671208202-5714-1--