GNU bug report logs - #77326
[PATCH] Add symbol-mode

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Reported by: Gabriel Santos <gabriel.santos.smtp@HIDDEN>; Keywords: patch; dated Fri, 28 Mar 2025 04:42:02 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

Message received at 77326 <at> debbugs.gnu.org:


Received: (at 77326) by debbugs.gnu.org; 5 Apr 2025 17:15:32 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Apr 05 13:15:32 2025
Received: from localhost ([127.0.0.1]:44617 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1u177E-0007eo-DR
	for submit <at> debbugs.gnu.org; Sat, 05 Apr 2025 13:15:32 -0400
Received: from layka.disroot.org ([178.21.23.139]:33312)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.84_2) (envelope-from <gabrielsantosdesouza@HIDDEN>)
 id 1u177B-0007ST-22
 for 77326 <at> debbugs.gnu.org; Sat, 05 Apr 2025 13:15:30 -0400
Received: from mail01.disroot.lan (localhost [127.0.0.1])
 by disroot.org (Postfix) with ESMTP id A29E325D5F;
 Sat,  5 Apr 2025 19:15:27 +0200 (CEST)
X-Virus-Scanned: SPAM Filter at disroot.org
Received: from layka.disroot.org ([127.0.0.1])
 by localhost (disroot.org [127.0.0.1]) (amavis, port 10024) with ESMTP
 id EXx2TCQbnGZF; Sat,  5 Apr 2025 19:15:23 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail;
 t=1743873323; bh=VW5T1VKt9SS75/HiUpEoX/Y8C6SnSXU9ZZqwEZFz0UI=;
 h=Date:From:To:CC:Subject:In-Reply-To:References;
 b=RQqGql2ip5TsuRjqoetA8A7cFas5Veg6lKrSS3zpzCuvT9PAdTOa+TzKcSO0cAfhW
 aX1J6KMGnnzKTBeKkfghwqaa8KJZVFSsnQBkQ0TBaSkDaOD58Fh+yyeW+fWtFFUgbO
 p1iaQzfzuGlBEFV0R8GC2TBaBHeoUJ1aGNeKrP62H/cyzgDp19A2INYv3EZcWbWYFx
 dQMBv8d63KXD3rFlg3xddrK5gBOjrg0z0x81Ab0m/PWdBQ+TEVBs77jOMe5BuCs2Eu
 nM1a8P+E28+fWxwPaqby16F8oGCX+3TCiOp1Du8bg6gAQEvwt9f7wT+wwrhvh5z+Lr
 n3bAPP4B6BMCQ==
Date: Sat, 05 Apr 2025 14:15:16 -0300
From: Gabriel Santos <gabrielsantosdesouza@HIDDEN>
To: Stefan Monnier <monnier@HIDDEN>, Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#77326: [PATCH] Add symbol-mode
User-Agent: Thunderbird for Android
In-Reply-To: <jwva58uwp4n.fsf-monnier+emacs@HIDDEN>
References: <87bjtmjdq2.fsf@HIDDEN> <jwvldsewskp.fsf-monnier+emacs@HIDDEN>
 <867c3ywqxp.fsf@HIDDEN> <jwva58uwp4n.fsf-monnier+emacs@HIDDEN>
Message-ID: <C478481E-E69E-46F6-BA6A-71D041B20F95@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain;
 charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 77326
Cc: gabriel.santos.smtp@HIDDEN, 77326 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

>How is it different from `superword-mode`?

I looked into `subword-mode`, but not `superword-mode`
(because I often used the former)=2E

I tried it out and it seems to do most things here
(upcasing, lowercasing, transposing, forward, backward=2E=2E=2E)=2E

The major difference I found is that the superword commands
don't appear as separate commands
(M-f appears as "forward-word" in the lossage despite
going forward a
symbol), because it modifies the word boundaries, while I defined specific=
 symbol commands, that
couls be used separate from the mode=2E

--=20
Gabriel Santos




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#77326; Package emacs. Full text available.

Message received at 77326 <at> debbugs.gnu.org:


Received: (at 77326) by debbugs.gnu.org; 5 Apr 2025 17:12:24 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Apr 05 13:12:23 2025
Received: from localhost ([127.0.0.1]:44610 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1u174B-00062Q-J2
	for submit <at> debbugs.gnu.org; Sat, 05 Apr 2025 13:12:23 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:36324)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <eliz@HIDDEN>) id 1u1748-000628-HB
 for 77326 <at> debbugs.gnu.org; Sat, 05 Apr 2025 13:12:21 -0400
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 <eliz@HIDDEN>)
 id 1u1742-00069r-RG; Sat, 05 Apr 2025 13:12:14 -0400
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=S2jT+7DNZ/OqAIu+0lS5kKSDMcgKjGQxfjyYFdI2cfY=; b=lrd3H+ef4aAf
 i91N0GjpjyM5cIWBfdwKIdU+HWupG4K5XQ6U1HJ5pko6Hb2A/oeRFFieEk7yoN8CP+Oem3nBfMRvt
 QbgflMwdZ4x2C+FMIDtETAQC2iMB1IDwbXRECh2g9gq2sdUOuYl8ru8hrPIZ9W62QFQC78yTGK1mw
 UsW2DYFsKjeqM2TLGprjZotFA3EmGn5uPwWjrcOxVRfB6TV2uwC+m8uSt0qL5BhOgDn95PPf04RmU
 ZY1w+qUPTnP2VkqyWqv4exsrOJSiUfjVEFtAzY8+Foehmnrl2L5QrEJWw3lKvAG38zsW0ufkYmu6D
 8bofUdM3amlZ38lgEImeOA==;
Date: Sat, 05 Apr 2025 20:12:12 +0300
Message-Id: <86r026v8gj.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Stefan Monnier <monnier@HIDDEN>
In-Reply-To: <jwva58uwp4n.fsf-monnier+emacs@HIDDEN> (message from Stefan
 Monnier on Sat, 05 Apr 2025 12:27:09 -0400)
Subject: Re: bug#77326: [PATCH] Add symbol-mode
References: <87bjtmjdq2.fsf@HIDDEN> <jwvldsewskp.fsf-monnier+emacs@HIDDEN>
 <867c3ywqxp.fsf@HIDDEN> <jwva58uwp4n.fsf-monnier+emacs@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 77326
Cc: gabriel.santos.smtp@HIDDEN, gabrielsantosdesouza@HIDDEN,
 77326 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Stefan Monnier <monnier@HIDDEN>
> Cc: gabriel.santos.smtp@HIDDEN,  gabrielsantosdesouza@HIDDEN,
>   77326 <at> debbugs.gnu.org
> Date: Sat, 05 Apr 2025 12:27:09 -0400
> 
> >> FWIW, in order to avoid confusion with functions operating on Lisp
> >> symbol objects, I'd suggest to try and find another name.
> > symbol-name-mode?
> 
> How is it different from `superword-mode`?

The "symbol" part.

AFAIU, this is about programming-language symbols, no?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#77326; Package emacs. Full text available.

Message received at 77326 <at> debbugs.gnu.org:


Received: (at 77326) by debbugs.gnu.org; 5 Apr 2025 16:52:38 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Apr 05 12:52:38 2025
Received: from localhost ([127.0.0.1]:44550 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1u16l4-00053D-8s
	for submit <at> debbugs.gnu.org; Sat, 05 Apr 2025 12:52:38 -0400
Received: from layka.disroot.org ([178.21.23.139]:50908)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.84_2) (envelope-from <gabrielsantosdesouza@HIDDEN>)
 id 1u16l1-000531-NW
 for 77326 <at> debbugs.gnu.org; Sat, 05 Apr 2025 12:52:36 -0400
Received: from mail01.disroot.lan (localhost [127.0.0.1])
 by disroot.org (Postfix) with ESMTP id 23DC425D56;
 Sat,  5 Apr 2025 18:52:34 +0200 (CEST)
X-Virus-Scanned: SPAM Filter at disroot.org
Received: from layka.disroot.org ([127.0.0.1])
 by localhost (disroot.org [127.0.0.1]) (amavis, port 10024) with ESMTP
 id JQMdtU6gfUff; Sat,  5 Apr 2025 18:52:33 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail;
 t=1743871953; bh=Cuq/iSkubwLs4W/M8lNxrfWhlElHU2wSVLuRREUjYf0=;
 h=Date:From:To:CC:Subject:In-Reply-To:References;
 b=DbOLcjTVOrPsEA+Vp7divfRR8Z7/q1vUoUCvIpONpK4QfdYLahljYOTjnaivjq9jN
 nqZp5b3UAehWoU1YLD+8pcynxr0J8tZ+u1ttzC1UZJWqrnkZ+x7y6LefJktDxLHYGs
 9YGHiuCB1d7rIvFLnGqknhNraoErjRTzCt34X+weWpEFybQLQBnODQGqxmsCuWR8fK
 sxYcQicUEEsPV25T/yfbkngn4zMEcR5R4CsJOZlFT04U5V0OdxkaakYClAMNdCtODQ
 xSLpUTEnDvWpAJX3I7qkIZQUTEywziJhIFw5mWnDmWMIz6FEo3KIN3agRTS9Og8QJM
 mZGLONqDFjuuQ==
Date: Sat, 05 Apr 2025 13:52:26 -0300
From: Gabriel Santos <gabrielsantosdesouza@HIDDEN>
To: Ship Mints <shipmints@HIDDEN>, Stefan Monnier <monnier@HIDDEN>
Subject: Re: bug#77326: [PATCH] Add symbol-mode
User-Agent: Thunderbird for Android
In-Reply-To: <CAN+1HbouZ4=o+7Em-Dn6=_DqT0_q4AOwRo5aJi-bO489qUuqBw@HIDDEN>
References: <87bjtmjdq2.fsf@HIDDEN> <jwvldsewskp.fsf-monnier+emacs@HIDDEN>
 <CAN+1HbouZ4=o+7Em-Dn6=_DqT0_q4AOwRo5aJi-bO489qUuqBw@HIDDEN>
Message-ID: <2DCDAFD6-B319-420A-84DD-05681C3FA479@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain;
 charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 77326
Cc: Gabriel Santos <gabriel.santos.smtp@HIDDEN>, 77326 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

>identifier-mode

I like this one=2E

--=20
Gabriel Santos




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#77326; Package emacs. Full text available.

Message received at 77326 <at> debbugs.gnu.org:


Received: (at 77326) by debbugs.gnu.org; 5 Apr 2025 16:27:20 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Apr 05 12:27:19 2025
Received: from localhost ([127.0.0.1]:44501 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1u16MZ-0000qa-Ij
	for submit <at> debbugs.gnu.org; Sat, 05 Apr 2025 12:27:19 -0400
Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:65313)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <monnier@HIDDEN>)
 id 1u16MY-0000qL-8k
 for 77326 <at> debbugs.gnu.org; Sat, 05 Apr 2025 12:27:18 -0400
Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1])
 by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 0163E441392;
 Sat,  5 Apr 2025 12:27:12 -0400 (EDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca;
 s=mail; t=1743870430;
 bh=VaG5yADJJYQT+gpclqKNy9sJSv/woi+Ybd7Vii7kvlM=;
 h=From:To:Cc:Subject:In-Reply-To:References:Date:From;
 b=RAJKUdqKaEfnVvr5bIxhRs3IqNmIjSuEV0RjeCxM+D3vmkIV1GAf1ignIxldrj29W
 JxNgzNaT8vpWmrrk0bC6zqsSovWzq3jbY34rxDHYovFnSUA6l+b/iRm/nauZNZmZKC
 sqosIx5998ZpoS8AZQIhO/DJirQ3cvXO4B1KR3M9YBPB62LHRL/tG7jg5Lm8HfjjUU
 1Z4a3s7rSonFYchkjEQPuqokrA35ZfuhbWW9eeKhVFI6H1VpAM49YJI0KZnkLTMNcg
 ro/9yitoxUdJ+vuyMeoxLtdBPLsERjLEYRTZp1FV64WfyyiMyVoQFpKrTRKcRQI4dG
 VE90NsLswdTMg==
Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1])
 by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id E763F44136A;
 Sat,  5 Apr 2025 12:27:10 -0400 (EDT)
Received: from pastel (unknown [104.247.242.5])
 by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id B1D8B12034C;
 Sat,  5 Apr 2025 12:27:10 -0400 (EDT)
From: Stefan Monnier <monnier@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#77326: [PATCH] Add symbol-mode
In-Reply-To: <867c3ywqxp.fsf@HIDDEN>
Message-ID: <jwva58uwp4n.fsf-monnier+emacs@HIDDEN>
References: <87bjtmjdq2.fsf@HIDDEN> <jwvldsewskp.fsf-monnier+emacs@HIDDEN>
 <867c3ywqxp.fsf@HIDDEN>
Date: Sat, 05 Apr 2025 12:27:09 -0400
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
X-SPAM-INFO: Spam detection results:  0
 ALL_TRUSTED                -1 Passed through trusted hosts only via SMTP
 AWL -0.388 Adjusted score from AWL reputation of From: address
 BAYES_00                 -1.9 Bayes spam probability is 0 to 1%
 DKIM_SIGNED               0.1 Message has a DKIM or DK signature,
 not necessarily valid
 DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature
 DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's
 domain
 DKIM_VALID_EF -0.1 Message has a valid DKIM or DK signature from envelope-from
 domain
X-SPAM-LEVEL: 
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 77326
Cc: gabriel.santos.smtp@HIDDEN, gabrielsantosdesouza@HIDDEN,
 77326 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

>> FWIW, in order to avoid confusion with functions operating on Lisp
>> symbol objects, I'd suggest to try and find another name.
> symbol-name-mode?

How is it different from `superword-mode`?


        Stefan





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#77326; Package emacs. Full text available.

Message received at 77326 <at> debbugs.gnu.org:


Received: (at 77326) by debbugs.gnu.org; 5 Apr 2025 15:47:58 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Apr 05 11:47:58 2025
Received: from localhost ([127.0.0.1]:44398 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1u15kT-0007M8-RX
	for submit <at> debbugs.gnu.org; Sat, 05 Apr 2025 11:47:58 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:40466)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <eliz@HIDDEN>) id 1u15kS-0007Ls-2F
 for 77326 <at> debbugs.gnu.org; Sat, 05 Apr 2025 11:47:56 -0400
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 <eliz@HIDDEN>)
 id 1u15kM-0002JP-48; Sat, 05 Apr 2025 11:47:50 -0400
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=qzE8qWJLNj+aAQD387GmQo9HRov8EBjbS/1Un4X6g4U=; b=Qao/wC0rtJUJ
 tc/3GBMndKbtcoLgXkqN78Ky/kXYbTnmXn/UBHYPPwhNN4nme4DWzY/0hxKX//HR36+EwrNPbInjs
 b2KJQMo0+3z+q/ZvVhizevqCDnK66LhgCSM6/XvNHYnVNkYDEJIMMB0ASgRjKNKQg/6qAR6GqOo/L
 viRLOJ2KetWWYxMJC5kDI6Ih/YYIM90HJIu0JvpiBDkIauldzU+ev++SUGzazKBIaOeuq3Mk3MJ2m
 xD49Mr4refI8NhyoCkWLcHBhazWbFRADY2D3ArxJ3r52sDX23H5bAWVujhM/JHANQAPAMXwEC4Ycv
 J6ZvenWf/2vZYEo1ReOfSg==;
Date: Sat, 05 Apr 2025 18:47:46 +0300
Message-Id: <867c3ywqxp.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Stefan Monnier <monnier@HIDDEN>
In-Reply-To: <jwvldsewskp.fsf-monnier+emacs@HIDDEN> (bug-gnu-emacs@HIDDEN)
Subject: Re: bug#77326: [PATCH] Add symbol-mode
References: <87bjtmjdq2.fsf@HIDDEN> <jwvldsewskp.fsf-monnier+emacs@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 77326
Cc: gabriel.santos.smtp@HIDDEN, gabrielsantosdesouza@HIDDEN,
 77326 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> Cc: Gabriel Santos <gabrielsantosdesouza@HIDDEN>, 77326 <at> debbugs.gnu.org
> Date: Sat, 05 Apr 2025 11:14:19 -0400
> From:  Stefan Monnier via "Bug reports for GNU Emacs,
>  the Swiss army knife of text editors" <bug-gnu-emacs@HIDDEN>
> 
> > This patch provides a new package for interacting with symbols, based on
> > the current word commands and the built-in package "subword".
> 
> FWIW, in order to avoid confusion with functions operating on Lisp
> symbol objects, I'd suggest to try and find another name.

symbol-name-mode?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#77326; Package emacs. Full text available.

Message received at 77326 <at> debbugs.gnu.org:


Received: (at 77326) by debbugs.gnu.org; 5 Apr 2025 15:18:22 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Apr 05 11:18:22 2025
Received: from localhost ([127.0.0.1]:44326 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1u15Hq-0002vd-E4
	for submit <at> debbugs.gnu.org; Sat, 05 Apr 2025 11:18:22 -0400
Received: from mail-ua1-x92d.google.com ([2607:f8b0:4864:20::92d]:57758)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.84_2) (envelope-from <shipmints@HIDDEN>)
 id 1u15Ho-0002vK-PX
 for 77326 <at> debbugs.gnu.org; Sat, 05 Apr 2025 11:18:21 -0400
Received: by mail-ua1-x92d.google.com with SMTP id
 a1e0cc1a2514c-86d5e42c924so2609771241.3
 for <77326 <at> debbugs.gnu.org>; Sat, 05 Apr 2025 08:18:20 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1743866295; x=1744471095; darn=debbugs.gnu.org;
 h=cc:to:subject:message-id:date:from:in-reply-to:references
 :mime-version:from:to:cc:subject:date:message-id:reply-to;
 bh=McPSu1lvJmX8zZVHtk8kQbG7veeuLFXkzUZdadhMZP8=;
 b=TbXgLlXezuixpZkeGhVYw4gtso/OtXVPD6jj/ltZnUmpRydEPcLMm2pjiAsh79cn76
 pQgGNsqqj8gPOnXD02Y+KR0EVM08GEgspatiN/7VaVnFmTMDUJ744+3MqQbnGEb7LXhg
 XsLx888aektWZ5jKe0CaLm/XjLHhsfcoAN3pXClGK68ZdbZDm8R1XTg4jHJAwkBMrFsp
 3Ws1dMzCFBVKd/DoVSP43d+LU5MqP0sQWp62qjZJ1pdgTghHTZAcd7JVykKKT9Vvx+Rk
 YE9n2qC/daSstsdoQ8Q/oDjrWISPPfrMy1+aEQ3+WJOYFT7QaGcW+G5AilpsIvtR7+l6
 /+/g==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1743866295; x=1744471095;
 h=cc:to:subject:message-id:date:from:in-reply-to:references
 :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id
 :reply-to;
 bh=McPSu1lvJmX8zZVHtk8kQbG7veeuLFXkzUZdadhMZP8=;
 b=aaNDBTT/DOM7wab+dbXVV6WaMiZ7nJCYgJlJJwAGWtreuPjP/n+15p/vRAE/upYQpQ
 7c6Rf1jubg4bx2E0XYXlAR5fP7FQpZlq0URK3MdKqssWyEvnW01Xo+cQ2j7ekbuH2+v2
 pyAfhAqzqgOnJ4EdO/qWLIkKAbzOzkqdV/opj66I3RHPJjkSM93jw3VzEMH11P7mwqcY
 ZzqJNtu1eIc7xMy81G/dVL/1LXOGn3OaLN4l36plLEVEwhhxEi+XaG7vdz5OlSjUbOQE
 lNPV69ZWzMxvmw4D/kLjH4FZAOKCU+KatbBIQpRj4K3iXTc0H2gqoz4Hy7qak3BQ9qnp
 M1vQ==
X-Forwarded-Encrypted: i=1;
 AJvYcCW0oEvkcBQyOLYOr3kvcMkki0tT9YoH4R0M91ENt+8Ie/OYPor/U0JSSD0AT89IdPaAeKOMrA==@debbugs.gnu.org
X-Gm-Message-State: AOJu0YzHnqBBnjEMGMxQNIhqqaza3CcUIupddW2isCbwbWbbo4z6/GV8
 NzfnodiqrcDpPGGv3SOiaU7xvH1QPeViyXWWYI15tNzFjXQt7oJvQJfzVPkN3q/wgUi455YeirY
 snoVwRfq6p9OL8I5OcqIXqYrKaKI=
X-Gm-Gg: ASbGncvfYUUh2yAWdvwyOtwCjAhemOx55m2WotoNaOpfRk8a0AcqowG7mVA51i7gTBr
 MOjueWWYftD3+f5HrDSnV6llQJX4dszVo7SBNJxlaHDz4PelstRXv7e9WFOuXfoXlwVlZq8JHCf
 Z9B6z3eAzYOOkYC+JBMI+fWaDv/Q==
X-Google-Smtp-Source: AGHT+IHa3ufuAS0QvSQBr57scunSPI7woKzLPzneulz60EOkewhP2onumDCaWQhnWJCKrRxijlPaQ6ZSnO1+2UZiQA0=
X-Received: by 2002:a05:6102:3f11:b0:4c1:b3a5:9fa with SMTP id
 ada2fe7eead31-4c856a2201bmr5309081137.16.1743866294889; Sat, 05 Apr 2025
 08:18:14 -0700 (PDT)
MIME-Version: 1.0
References: <87bjtmjdq2.fsf@HIDDEN> <jwvldsewskp.fsf-monnier+emacs@HIDDEN>
In-Reply-To: <jwvldsewskp.fsf-monnier+emacs@HIDDEN>
From: Ship Mints <shipmints@HIDDEN>
Date: Sat, 5 Apr 2025 11:18:03 -0400
X-Gm-Features: ATxdqUGQsrtSM03kvoVbsf_uU5-ZdOuu6pLX9LiUb2HTMd33HsP-cFXf9DcylCM
Message-ID: <CAN+1HbouZ4=o+7Em-Dn6=_DqT0_q4AOwRo5aJi-bO489qUuqBw@HIDDEN>
Subject: Re: bug#77326: [PATCH] Add symbol-mode
To: Stefan Monnier <monnier@HIDDEN>
Content-Type: multipart/alternative; boundary="0000000000000af4e8063209835f"
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 77326
Cc: Gabriel Santos <gabriel.santos.smtp@HIDDEN>,
 Gabriel Santos <gabrielsantosdesouza@HIDDEN>, 77326 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

--0000000000000af4e8063209835f
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

On Sat, Apr 5, 2025 at 11:15=E2=80=AFAM Stefan Monnier via Bug reports for =
GNU
Emacs, the Swiss army knife of text editors <bug-gnu-emacs@HIDDEN> wrote:

> > This patch provides a new package for interacting with symbols, based o=
n
> > the current word commands and the built-in package "subword".
>
> FWIW, in order to avoid confusion with functions operating on Lisp
> symbol objects, I'd suggest to try and find another name.
>
> I don't have a good suggestion to make, tho, because I haven't looked
> closely enough to understand how it relates to `superword-mode`.
>

identifier-mode?

--0000000000000af4e8063209835f
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div dir=3D"ltr"><div class=3D"gmail_default" style=3D"fon=
t-family:monospace"><span style=3D"font-family:Arial,Helvetica,sans-serif">=
On Sat, Apr 5, 2025 at 11:15=E2=80=AFAM Stefan Monnier via Bug reports for =
GNU Emacs, the Swiss army knife of text editors &lt;<a href=3D"mailto:bug-g=
nu-emacs@HIDDEN">bug-gnu-emacs@HIDDEN</a>&gt; wrote:</span></div></div><d=
iv class=3D"gmail_quote gmail_quote_container"><blockquote class=3D"gmail_q=
uote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,2=
04);padding-left:1ex">&gt; This patch provides a new package for interactin=
g with symbols, based on<br>
&gt; the current word commands and the built-in package &quot;subword&quot;=
.<br>
<br>
FWIW, in order to avoid confusion with functions operating on Lisp<br>
symbol objects, I&#39;d suggest to try and find another name.<br>
<br>
I don&#39;t have a good suggestion to make, tho, because I haven&#39;t look=
ed<br>
closely enough to understand how it relates to `superword-mode`.<br></block=
quote><div><br></div><div class=3D"gmail_default" style=3D"font-family:mono=
space">identifier-mode?</div></div></div>

--0000000000000af4e8063209835f--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#77326; Package emacs. Full text available.

Message received at 77326 <at> debbugs.gnu.org:


Received: (at 77326) by debbugs.gnu.org; 5 Apr 2025 15:14:30 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Apr 05 11:14:30 2025
Received: from localhost ([127.0.0.1]:44319 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1u15E6-0002iI-6e
	for submit <at> debbugs.gnu.org; Sat, 05 Apr 2025 11:14:30 -0400
Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:11094)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <monnier@HIDDEN>)
 id 1u15E3-0002i3-DC
 for 77326 <at> debbugs.gnu.org; Sat, 05 Apr 2025 11:14:27 -0400
Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1])
 by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 00BBE807AD;
 Sat,  5 Apr 2025 11:14:22 -0400 (EDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca;
 s=mail; t=1743866061;
 bh=uo6oReEyaU8K2o0AEup5HA7WLpJgJ5+Cp699BXy2vQI=;
 h=From:To:Cc:Subject:In-Reply-To:References:Date:From;
 b=OQsUnHVnmTONWdY48LxqHSdxGghaCKNGH5DnZ2qz0zaCMbL/QvVzJ+IPDeHduVO6A
 ImJ56xm7SNab68O1hs6dKBXSTc/bQ3UVvmfq6hyjEjg3jktd9fz61vN+SGrjX0ZC/2
 1yKTz8j4TfMWjo3ctZPvRoEqnXgWNCTofVPKNVeXOgJaspvyh7qYUwMmdoEUaM/76T
 VAxlWw5dg7hdr2RhgTdXFK8ubQK4/M+gLNfcQcw34nIm+aX2i1aBXyMg11SNfKWpCA
 9MD2QNp4dAxCeSY7DoH3sMtIE0OsN0Ef9mUud9M4iZtfEKY7sxJ6iyUw7SuoS7wHPU
 pvze+IS6lx4ig==
Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1])
 by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 07EA6806BF;
 Sat,  5 Apr 2025 11:14:21 -0400 (EDT)
Received: from pastel (unknown [104.247.242.5])
 by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id C686D120418;
 Sat,  5 Apr 2025 11:14:20 -0400 (EDT)
From: Stefan Monnier <monnier@HIDDEN>
To: Gabriel Santos <gabriel.santos.smtp@HIDDEN>
Subject: Re: bug#77326: [PATCH] Add symbol-mode
In-Reply-To: <87bjtmjdq2.fsf@HIDDEN>
Message-ID: <jwvldsewskp.fsf-monnier+emacs@HIDDEN>
References: <87bjtmjdq2.fsf@HIDDEN>
Date: Sat, 05 Apr 2025 11:14:19 -0400
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
X-SPAM-INFO: Spam detection results:  0
 ALL_TRUSTED                -1 Passed through trusted hosts only via SMTP
 AWL -0.357 Adjusted score from AWL reputation of From: address
 BAYES_00                 -1.9 Bayes spam probability is 0 to 1%
 DKIM_SIGNED               0.1 Message has a DKIM or DK signature,
 not necessarily valid
 DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature
 DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's
 domain
 DKIM_VALID_EF -0.1 Message has a valid DKIM or DK signature from envelope-from
 domain
X-SPAM-LEVEL: 
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 77326
Cc: Gabriel Santos <gabrielsantosdesouza@HIDDEN>, 77326 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> This patch provides a new package for interacting with symbols, based on
> the current word commands and the built-in package "subword".

FWIW, in order to avoid confusion with functions operating on Lisp
symbol objects, I'd suggest to try and find another name.

I don't have a good suggestion to make, tho, because I haven't looked
closely enough to understand how it relates to `superword-mode`.


        Stefan





Information forwarded to bug-gnu-emacs@HIDDEN:
bug#77326; Package emacs. Full text available.

Message received at 77326 <at> debbugs.gnu.org:


Received: (at 77326) by debbugs.gnu.org; 5 Apr 2025 15:07:34 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Apr 05 11:07:34 2025
Received: from localhost ([127.0.0.1]:44285 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1u157N-0002Jq-Be
	for submit <at> debbugs.gnu.org; Sat, 05 Apr 2025 11:07:33 -0400
Received: from mail-ua1-x934.google.com ([2607:f8b0:4864:20::934]:61817)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.84_2) (envelope-from <shipmints@HIDDEN>)
 id 1u157I-0002JY-Tl
 for 77326 <at> debbugs.gnu.org; Sat, 05 Apr 2025 11:07:29 -0400
Received: by mail-ua1-x934.google.com with SMTP id
 a1e0cc1a2514c-873a2ba6f7cso262103241.3
 for <77326 <at> debbugs.gnu.org>; Sat, 05 Apr 2025 08:07:28 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1743865643; x=1744470443; darn=debbugs.gnu.org;
 h=cc:to:subject:message-id:date:from:in-reply-to:references
 :mime-version:from:to:cc:subject:date:message-id:reply-to;
 bh=L6IWnvONBK/lDmrnBocKeBeJlDd4SF8KOpq3j/NLbjM=;
 b=bNK7jKTuOHZkfO9axb+fafRcdnzEPTU6KWegLKyQ4tyOALKF1omumfHm80uDkr55iy
 tiO6CSpD6iNw5FtJvWPJiBCtz5W99h/0LeDDa2UmaeYEQEbUBpWH/Kcd+t7DNS+v7CUG
 Cnudie2X8TXZCCoqzajvcZ9YlWEjE/bbSWOUsuP0/JAefdXylZtiOD1sXjIXaUynyxqm
 lDm5pCcZHsJYKtTEEGrIpcaUWDVAzmaMOBp0k9r6zr6bYyCAn/STmmOrDvXl5ris3C2l
 zRjSOFJizVJAGLmpQPtjuTHIabQ1Sjz/xy/7yeefXjk8s97ikYLpQ5TGFj8X+yZTefnM
 WPsA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1743865643; x=1744470443;
 h=cc:to:subject:message-id:date:from:in-reply-to:references
 :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id
 :reply-to;
 bh=L6IWnvONBK/lDmrnBocKeBeJlDd4SF8KOpq3j/NLbjM=;
 b=nR2IkeM0T+oFmW32PS01HnCntxMACGpeaS+Ck3txaAhDHYPZjNen/c74DqHAM5qFMz
 YhUtJkp0/PVa8MgzCNqQuGrfgjoJl2sNXN4Hk5kw28k+yYa1e5WR0I6Rxxi/3vy7F3+c
 g5wfQu7Pcz9F6fe9R26bdPrCtWNSsWx4+VZ4uMh3PFAwSy0xro8stWnYsGmXpcmsckjh
 wh7+fbL6Dv6R/wMvbb+kwZ0XhOoIJyXGwCkc15f2uk2k0mDX5Ow8AZOTRfmsWOZPUHlq
 5B2fDTK00xCwcutvmOPsVFEgAEWbtmtnzce2GT3sA6lax00xOsl+j4yvKizXJD1My9bs
 VQWA==
X-Forwarded-Encrypted: i=1;
 AJvYcCVYM7kEk1XpzE9mjHOnOjnLHgXLPGE3QcYA7pnr7lYG3TMKbY1EuAZSCYtX+tnlRQavgI7XBg==@debbugs.gnu.org
X-Gm-Message-State: AOJu0YxF0o978J8FcL2B9kgv1KBmMXFoGrlRTK+r7BZNe8WW3QntN3pO
 kWDGUPWV956aCQQOuVzNk6CIhSVr1ajEAF9z7Vwq7Ju6WQlAYyDTbAsDmPIn6E7/+llcwVr3n6P
 7O6nGoqs0n6FEjKKXk2q/hzLvsLA=
X-Gm-Gg: ASbGncu2zirqtJdqotivJrp3vafOSYlD+R7cr6jEF2xj3zAmY4PL3zIC4bfgsKOAT5e
 Zgx6fg9C82HWAf/MuLUjk9SIHUE1FE0w1wrJDj2Mt5ndeQjRcLTeBSqnDgXDtAEfe7THbxRuKt6
 wtOSmduZTqlH02Yw8ilFGBzzYTFg==
X-Google-Smtp-Source: AGHT+IHMGDKHULgZ/Y9bl15H+LKhYpUegDelbQNM6fPQ4CttlpkQ17R3a+uk9IffpWiwsZV6Tb2WrVOUfw2GKJq3H6M=
X-Received: by 2002:a05:6122:c8e:b0:51f:4151:4834 with SMTP id
 71dfb90a1353d-52765d3c9c5mr4777181e0c.7.1743865642810; Sat, 05 Apr 2025
 08:07:22 -0700 (PDT)
MIME-Version: 1.0
References: <87bjtmjdq2.fsf@HIDDEN> <861pu7xa2e.fsf@HIDDEN>
 <CAN+1Hbq1iXXXpoan7nEALyWE1sy920ZkL+GuOpnSpXa8rKMw1g@HIDDEN>
 <A098D43B-04F0-4C4D-9BAD-529C0C2A02F2@HIDDEN>
 <CAN+1Hbr2Ppu5u2J0y0kpeGyb58M96pVHBKMUcYkTp_qnQb05zQ@HIDDEN>
In-Reply-To: <CAN+1Hbr2Ppu5u2J0y0kpeGyb58M96pVHBKMUcYkTp_qnQb05zQ@HIDDEN>
From: Ship Mints <shipmints@HIDDEN>
Date: Sat, 5 Apr 2025 11:07:11 -0400
X-Gm-Features: ATxdqUHuuPkqbSTGNUQa7y0HxtWA_rKX14Fr8yuAQag5bp_dv3zJq7exYmrfWTA
Message-ID: <CAN+1HboD1hQD3pK8DiikWSCVQufCgw8pNw2eG3-bJ4LV9zOtpA@HIDDEN>
Subject: Re: bug#77326: [PATCH] Add symbol-mode
To: Gabriel Santos <gabrielsantosdesouza@HIDDEN>
Content-Type: multipart/alternative; boundary="0000000000002d07430632095cd4"
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 77326
Cc: Gabriel Santos <gabriel.santos.smtp@HIDDEN>, 77326 <at> debbugs.gnu.org,
 Stefan Monnier <monnier@HIDDEN>, Eli Zaretskii <eliz@HIDDEN>,
 Andrea Corallo <acorallo@HIDDEN>, Stefan Kangas <stefankangas@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

--0000000000002d07430632095cd4
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

On Sat, Apr 5, 2025 at 10:20=E2=80=AFAM Ship Mints <shipmints@HIDDEN> wr=
ote:

> On Sat, Apr 5, 2025 at 10:10=E2=80=AFAM Gabriel Santos <
> gabrielsantosdesouza@HIDDEN> wrote:
>
>> >One nice feature this patch could have is to cycle among symbol naming
>> >conventions: CamelCase, snakeCase, hyphen-case, underscore_case (any
>> >others?) and that would make it convenient when a variable name with th=
e
>> >same components are used across modalities; e.g. in config files, json,
>> >xml, protobufs, C/C++ vs. python, and in emacs-lisp-mode and Emacs C
>> code,
>> >cycling among to Fsymbol_name or Ssymbol_name?
>>
>> There are multiple packages like this[1, 2, 3, 4, 5, 6].
>>
>> Despite that, I think I could give it a try, I just have to
>> avoid looking into them because of copyright.
>>
>> So a comnand that changes between different symbol naming conventions,
>> Like how the capitalization commands work?
>>
>> Point is "|":
>>
>> >M-x cycle-convention-symbol
>> >|this-is-a-symbol
>> >thisIsASymbol|
>>
>
> It would be most convenient if point could be anywhere in or around a
> symbol when cycling.
>
>
>> >cycle among symbol naming conventions:
>>
>> So subsequent calls would switch to another convention? I think this
>> would be ok if the point didn't move.
>>
>
> I'd think the default cycling options would be mode specific as I
> mentioned.  In Python mode, for example, kebabs aren't tasty as
> identifiers, unless they're in a quoted string or comment so some context
> would be helpful.  The code would not have to know what constitutes a val=
id
> identifier, though, so if in Python I want to convert my/tasty-kebab to
> my/tasty_kebab, it would fail as a Python identifier unless we also offer
> some kind of character or syntax-table driven kind of trickery?  Not an
> expert with the syntax tables so I'm just guessing.
>
>
>> >M-x mark-sexp
>> >this-is-a-symbol
>> >M-x cycle-convention-symbol
>> >thisIsASymbol
>> >M-x cycle-convention-symbol
>> >this_is_a_symbol
>> >M-x cycle-convention-symbol
>> >ThisIsASymbol
>>
>> Besides cycling, maybe choosing a convention with
>> completion?
>>
>> >CamelCase, snakeCase, hyphen-case, underscore_case
>>
>> This could be another issue. The names I know these as
>> are, respectively:
>>
>> - PascalCase
>> - camelCase
>> - kebab-case (yes, really)
>> - snake_case
>
>
A very quick perusal of code within easy reach suggests these styles in
varying degrees across languages and configuration files:

PascalCase
camelCase
snake_case
kebab-case
dot.case
[conf.case]
[conf_case]
slash/case (also /slash/case, slash/case/ and /slash/case/ variants)
CONSTANT_CASE

And a few upcase/downcase variants of which CONSTANT_CASE is an obvious
variant of snake.

I also see various symbol embraces that could be useful to cycle; e.g.,
name, $(name), ${name}, $name.

I'm sure there are a bunch more but this seems like a good taxonomy to
start with.  What else do people use that are worth implementing?

Names that embed case-runs need to be handled: is DOMError DOME-rror or
DOM-error or domerror?  I can imagine offering simple cycling to convert
repeated case streak as DOMError -> DomError (knowing where the case change
is) -> Domerror -> domerror, etc.  (I have a convention on my teams that
this is illegal for names we control; it's "DomError" never "DOMError".)

Binding the cycling command to a single key would make cycling feel natural
and generally "free."  I'd likely bind this to C-\\ since I don't use
multiple input methods or <f9> merely moving a finger up from the home
row.  It would also be great to invoke the function on a region, cycling
all the symbols it found.

--0000000000002d07430632095cd4
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div dir=3D"ltr"><div class=3D"gmail_default" style=3D"fon=
t-family:monospace"><span style=3D"font-family:Arial,Helvetica,sans-serif">=
On Sat, Apr 5, 2025 at 10:20=E2=80=AFAM Ship Mints &lt;<a href=3D"mailto:sh=
ipmints@HIDDEN">shipmints@HIDDEN</a>&gt; wrote:</span></div></div><di=
v class=3D"gmail_quote gmail_quote_container"><blockquote class=3D"gmail_qu=
ote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,20=
4);padding-left:1ex"><div dir=3D"ltr"><div dir=3D"ltr"><div style=3D"font-f=
amily:monospace"><span style=3D"font-family:Arial,Helvetica,sans-serif">On =
Sat, Apr 5, 2025 at 10:10=E2=80=AFAM Gabriel Santos &lt;<a href=3D"mailto:g=
abrielsantosdesouza@HIDDEN" target=3D"_blank">gabrielsantosdesouza@dis=
root.org</a>&gt; wrote:</span></div></div><div class=3D"gmail_quote"><block=
quote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1=
px solid rgb(204,204,204);padding-left:1ex">&gt;One nice feature this patch=
 could have is to cycle among symbol naming<br>
&gt;conventions: CamelCase, snakeCase, hyphen-case, underscore_case (any<br=
>
&gt;others?) and that would make it convenient when a variable name with th=
e<br>
&gt;same components are used across modalities; e.g. in config files, json,=
<br>
&gt;xml, protobufs, C/C++ vs. python, and in emacs-lisp-mode and Emacs C co=
de,<br>
&gt;cycling among to Fsymbol_name or Ssymbol_name?<br>
<br>
There are multiple packages like this[1, 2, 3, 4, 5, 6].<br>
<br>
Despite that, I think I could give it a try, I just have to<br>
avoid looking into them because of copyright.<br>
<br>
So a comnand that changes between different symbol naming conventions,<br>
Like how the capitalization commands work?<br>
<br>
Point is &quot;|&quot;:<br>
<br>
&gt;M-x cycle-convention-symbol<br>
&gt;|this-is-a-symbol<br>
&gt;thisIsASymbol|<br></blockquote><div><br></div><div style=3D"font-family=
:monospace">It would be most convenient if point could be anywhere in or ar=
ound a symbol when cycling.</div><div>=C2=A0</div><blockquote class=3D"gmai=
l_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,20=
4,204);padding-left:1ex">
&gt;cycle among symbol naming conventions:<br>
<br>
So subsequent calls would switch to another convention? I think this<br>
would be ok if the point didn&#39;t move.<br></blockquote><div><br></div><d=
iv><div style=3D"font-family:monospace">I&#39;d think the default cycling o=
ptions would be mode specific as I mentioned.=C2=A0 In Python mode, for exa=
mple, kebabs aren&#39;t tasty as identifiers, unless they&#39;re in a quote=
d string or comment so some=C2=A0context would be helpful.=C2=A0 The code w=
ould not have to know what constitutes a valid identifier, though, so if in=
 Python I want to convert my/tasty-kebab to my/tasty_kebab, it would fail a=
s a Python identifier unless we also offer some kind of character or syntax=
-table driven kind of trickery?=C2=A0 Not an expert with the syntax tables =
so I&#39;m just guessing.</div></div><div>=C2=A0</div><blockquote class=3D"=
gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(20=
4,204,204);padding-left:1ex">
&gt;M-x mark-sexp<br>
&gt;this-is-a-symbol<br>
&gt;M-x cycle-convention-symbol<br>
&gt;thisIsASymbol<br>
&gt;M-x cycle-convention-symbol<br>
&gt;this_is_a_symbol<br>
&gt;M-x cycle-convention-symbol<br>
&gt;ThisIsASymbol<br>
<br>
Besides cycling, maybe choosing a convention with<br>
completion?<br>
<br>
&gt;CamelCase, snakeCase, hyphen-case, underscore_case<br>
<br>
This could be another issue. The names I know these as<br>
are, respectively:<br>
<br>
- PascalCase<br>
- camelCase<br>
- kebab-case (yes, really)<br>
- snake_case</blockquote></div></div></blockquote><div><br></div><div class=
=3D"gmail_default" style=3D"font-family:monospace">A very quick perusal of =
code within easy reach suggests these styles in varying degrees across lang=
uages and configuration files:</div><div class=3D"gmail_default" style=3D"f=
ont-family:monospace"><br></div><div class=3D"gmail_default" style=3D"font-=
family:monospace">PascalCase<br>camelCase<br>snake_case<br>kebab-case<br>do=
t.case</div><div class=3D"gmail_default" style=3D"font-family:monospace">[c=
onf.case]</div><div class=3D"gmail_default" style=3D"font-family:monospace"=
>[conf_case]<br>slash/case (also /slash/case, slash/case/ and /slash/case/ =
variants)<br>CONSTANT_CASE<br><br>And a few upcase/downcase variants of whi=
ch CONSTANT_CASE is an obvious variant of snake.</div><div class=3D"gmail_d=
efault" style=3D"font-family:monospace"><br></div><div class=3D"gmail_defau=
lt" style=3D"font-family:monospace">I also see various symbol embraces that=
 could be useful to cycle; e.g., name, $(name), ${name}, $name.<br><br>I&#3=
9;m sure there are a bunch more but this seems like a good=C2=A0taxonomy to=
 start with.=C2=A0 What else do people use that are=C2=A0worth=C2=A0impleme=
nting?<br><br>Names that embed case-runs need to be handled: is DOMError DO=
ME-rror or DOM-error or domerror?=C2=A0 I can imagine offering simple cycli=
ng to convert repeated case streak as DOMError -&gt; DomError (knowing wher=
e the case change is) -&gt; Domerror -&gt; domerror, etc.=C2=A0 (I have a c=
onvention on my teams that this is illegal for names we control; it&#39;s &=
quot;DomError&quot; never &quot;DOMError&quot;.)</div><div class=3D"gmail_d=
efault" style=3D"font-family:monospace"><br></div><div class=3D"gmail_defau=
lt" style=3D"font-family:monospace">Binding the cycling command to a single=
 key would make cycling feel natural and generally &quot;free.&quot;=C2=A0 =
I&#39;d likely bind this to C-\\ since I don&#39;t use multiple input=C2=A0=
methods or &lt;f9&gt; merely moving a finger up from the home row.=C2=A0 It=
 would also be great to invoke the function on a region, cycling all the sy=
mbols it found.</div></div></div>

--0000000000002d07430632095cd4--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#77326; Package emacs. Full text available.

Message received at 77326 <at> debbugs.gnu.org:


Received: (at 77326) by debbugs.gnu.org; 5 Apr 2025 14:20:32 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Apr 05 10:20:31 2025
Received: from localhost ([127.0.0.1]:44227 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1u14Nr-0008WP-9Q
	for submit <at> debbugs.gnu.org; Sat, 05 Apr 2025 10:20:31 -0400
Received: from mail-ua1-x930.google.com ([2607:f8b0:4864:20::930]:53348)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.84_2) (envelope-from <shipmints@HIDDEN>)
 id 1u14No-0008W7-Im
 for 77326 <at> debbugs.gnu.org; Sat, 05 Apr 2025 10:20:29 -0400
Received: by mail-ua1-x930.google.com with SMTP id
 a1e0cc1a2514c-86fbc8717fcso1314157241.2
 for <77326 <at> debbugs.gnu.org>; Sat, 05 Apr 2025 07:20:28 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1743862823; x=1744467623; darn=debbugs.gnu.org;
 h=cc:to:subject:message-id:date:from:in-reply-to:references
 :mime-version:from:to:cc:subject:date:message-id:reply-to;
 bh=oOEyy3sV0Wtr0saFAhI+MnPJRWWISFi0PDY7qGKBJzA=;
 b=h2hPH+fgNzomP8z2xVsTTp+rm9nRFGhSaEMVBH2uFrimfWpmegd9mOz0jfi4QvxyGj
 ToYxLeSUXYOu4GBZx27v7kdcX4iCAwqi1dQbSa2K7L2k+dMVXraaMRXkyiRCAWmDmMtl
 6nyaWwR3L8fAGVVRGyV3KoM2rvH/BXX4oqKZwx4nzGcN66UEsy1olZp349PgYGQViUhW
 N+2EFrRYwL07Vk0whNTH5FNBLxudhDs7hFNIRb/WPK6p43OnaVPAizcg+ZLNz27eL33a
 99Slu/U+dUMQn+WzSPL3T9QXc1zxY+rsAUWiuYERTTTVWsnJtQKTixgeaaya7vfDs/8c
 rL1g==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1743862823; x=1744467623;
 h=cc:to:subject:message-id:date:from:in-reply-to:references
 :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id
 :reply-to;
 bh=oOEyy3sV0Wtr0saFAhI+MnPJRWWISFi0PDY7qGKBJzA=;
 b=OW7ee004yBwLMUpy0gXGjC4T1h+lkyF9pED08lOU+j0uqW2yOLXkEFCxS/m9o5OPhv
 J8JI+z2uKA6L43PDJJMYYcFkTUskQ2Lc1vSiTyeeKHuY4KsvmPVjFCyKUaa9Kk6RXLQ3
 FLBQ2/rpKxnrgWz0PkqaXA8lYqQdoA/3OT8L5iYtFEDLQXP122oo4oOe6SiUp5EEaZsZ
 3LYPwV5bRYQiBYmeFP62FtUHfT4hUNPAbI4S4n9kCNWrZl3IkTYHftVKJXSDeok7QQsG
 HrJrvkG5qN6zYwVRzyfTVtITD9mdXGQistoWTvbyYnKBEplNQxZ1UuQfS8RKc1AH8rd9
 zAWw==
X-Forwarded-Encrypted: i=1;
 AJvYcCXNqKo12LvDIvVfeUdgDIuMWeMwh7uRmvODA9JISsqwZDSEbf2JW0nJ+34luA761bAB1nDEGw==@debbugs.gnu.org
X-Gm-Message-State: AOJu0Yy6Ys8/8PM35ki/4I0hcn5J5oQvbTyWopIrl8OB063wMfBbufHS
 t/a6tULzmc1CnSuiBPc2LElJ31/Uu6NH+/q70Qp8D8RfCgBQ59GwGYyq1CVLRx7/tUL/Tx1EaZa
 MDxI638A2NHRiCflhZYX2Z8PIgts=
X-Gm-Gg: ASbGnctEfGf5KIASzmj5uXoPCk1tmX6iA0+E2ZevD6HUDQTq9Kfa5oFV9OXeRF3w41W
 4kBA88n4CUF3L6TlleL3VndIIHuxlNaz5wVuoz1fcdt3j+y/WYoWjj7espHEuQktWSXfEwMP112
 D+T6WGp6A6V5RLboYR3wxArpmuYw==
X-Google-Smtp-Source: AGHT+IFtJS2PcQBPPCZAx6twUYzh4BNzmYeBzCr7Co0zHyo0EdAYVCAhTfyhVkT+TA1px3Brp6x8GGfaExeK0huxvu0=
X-Received: by 2002:a05:6102:f8c:b0:4c3:64be:5983 with SMTP id
 ada2fe7eead31-4c8554c8517mr5413295137.25.1743862822559; Sat, 05 Apr 2025
 07:20:22 -0700 (PDT)
MIME-Version: 1.0
References: <87bjtmjdq2.fsf@HIDDEN> <861pu7xa2e.fsf@HIDDEN>
 <CAN+1Hbq1iXXXpoan7nEALyWE1sy920ZkL+GuOpnSpXa8rKMw1g@HIDDEN>
 <A098D43B-04F0-4C4D-9BAD-529C0C2A02F2@HIDDEN>
In-Reply-To: <A098D43B-04F0-4C4D-9BAD-529C0C2A02F2@HIDDEN>
From: Ship Mints <shipmints@HIDDEN>
Date: Sat, 5 Apr 2025 10:20:10 -0400
X-Gm-Features: ATxdqUH7_6RCogxH8eoAcTltf5Y_vI72VHf159L6UkSoRyJW9iZDFn9waNC_IYk
Message-ID: <CAN+1Hbr2Ppu5u2J0y0kpeGyb58M96pVHBKMUcYkTp_qnQb05zQ@HIDDEN>
Subject: Re: bug#77326: [PATCH] Add symbol-mode
To: Gabriel Santos <gabrielsantosdesouza@HIDDEN>
Content-Type: multipart/alternative; boundary="00000000000013680d063208b4f7"
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 77326
Cc: Gabriel Santos <gabriel.santos.smtp@HIDDEN>, 77326 <at> debbugs.gnu.org,
 Stefan Monnier <monnier@HIDDEN>, Eli Zaretskii <eliz@HIDDEN>,
 Andrea Corallo <acorallo@HIDDEN>, Stefan Kangas <stefankangas@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

--00000000000013680d063208b4f7
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

On Sat, Apr 5, 2025 at 10:10=E2=80=AFAM Gabriel Santos <
gabrielsantosdesouza@HIDDEN> wrote:

> >One nice feature this patch could have is to cycle among symbol naming
> >conventions: CamelCase, snakeCase, hyphen-case, underscore_case (any
> >others?) and that would make it convenient when a variable name with the
> >same components are used across modalities; e.g. in config files, json,
> >xml, protobufs, C/C++ vs. python, and in emacs-lisp-mode and Emacs C cod=
e,
> >cycling among to Fsymbol_name or Ssymbol_name?
>
> There are multiple packages like this[1, 2, 3, 4, 5, 6].
>
> Despite that, I think I could give it a try, I just have to
> avoid looking into them because of copyright.
>
> So a comnand that changes between different symbol naming conventions,
> Like how the capitalization commands work?
>
> Point is "|":
>
> >M-x cycle-convention-symbol
> >|this-is-a-symbol
> >thisIsASymbol|
>

It would be most convenient if point could be anywhere in or around a
symbol when cycling.


> >cycle among symbol naming conventions:
>
> So subsequent calls would switch to another convention? I think this
> would be ok if the point didn't move.
>

I'd think the default cycling options would be mode specific as I
mentioned.  In Python mode, for example, kebabs aren't tasty as
identifiers, unless they're in a quoted string or comment so some context
would be helpful.  The code would not have to know what constitutes a valid
identifier, though, so if in Python I want to convert my/tasty-kebab to
my/tasty_kebab, it would fail as a Python identifier unless we also offer
some kind of character or syntax-table driven kind of trickery?  Not an
expert with the syntax tables so I'm just guessing.


> >M-x mark-sexp
> >this-is-a-symbol
> >M-x cycle-convention-symbol
> >thisIsASymbol
> >M-x cycle-convention-symbol
> >this_is_a_symbol
> >M-x cycle-convention-symbol
> >ThisIsASymbol
>
> Besides cycling, maybe choosing a convention with
> completion?
>
> >CamelCase, snakeCase, hyphen-case, underscore_case
>
> This could be another issue. The names I know these as
> are, respectively:
>
> - PascalCase
> - camelCase
> - kebab-case (yes, really)
> - snake_case
>

Right, the snake bit me, it's PC, cC, k-C, s_c. Pop culture names.

>There are multiple packages like this[1, 2, 3, 4, 5, 6].
>
> Another interesting option would be to contact the author
> of one of these packages for inclusion in this file.
>

It seems "easy" enough to just do it without the hassle and as part of
core Emacs?  Especially if the implementations below aren't optimal and
perhaps if tree sitter was leveraged this could be easier. I don't think
the below use any of that infrastructure.


> [1] <https://github.com/HKey/caseformat>
> [2] <https://hg.sr.ht/~zck/caser.el>
> [3] <https://github.com/TakesxiSximada/change-case.el>
> [4] <https://github.com/jcs-elpa/cycle-case-style>
> [5] <https://codeberg.org/acdw/titlecase.el>
> [6] <https://github.com/akicho8/string-inflection>
>

--00000000000013680d063208b4f7
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div dir=3D"ltr"><div class=3D"gmail_default" style=3D"fon=
t-family:monospace"><span style=3D"font-family:Arial,Helvetica,sans-serif">=
On Sat, Apr 5, 2025 at 10:10=E2=80=AFAM Gabriel Santos &lt;<a href=3D"mailt=
o:gabrielsantosdesouza@HIDDEN">gabrielsantosdesouza@HIDDEN</a>&gt=
; wrote:</span></div></div><div class=3D"gmail_quote gmail_quote_container"=
><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border=
-left:1px solid rgb(204,204,204);padding-left:1ex">&gt;One nice feature thi=
s patch could have is to cycle among symbol naming<br>
&gt;conventions: CamelCase, snakeCase, hyphen-case, underscore_case (any<br=
>
&gt;others?) and that would make it convenient when a variable name with th=
e<br>
&gt;same components are used across modalities; e.g. in config files, json,=
<br>
&gt;xml, protobufs, C/C++ vs. python, and in emacs-lisp-mode and Emacs C co=
de,<br>
&gt;cycling among to Fsymbol_name or Ssymbol_name?<br>
<br>
There are multiple packages like this[1, 2, 3, 4, 5, 6].<br>
<br>
Despite that, I think I could give it a try, I just have to<br>
avoid looking into them because of copyright.<br>
<br>
So a comnand that changes between different symbol naming conventions,<br>
Like how the capitalization commands work?<br>
<br>
Point is &quot;|&quot;:<br>
<br>
&gt;M-x cycle-convention-symbol<br>
&gt;|this-is-a-symbol<br>
&gt;thisIsASymbol|<br></blockquote><div><br></div><div class=3D"gmail_defau=
lt" style=3D"font-family:monospace">It would be most convenient if point co=
uld be anywhere in or around a symbol when cycling.</div><div>=C2=A0</div><=
blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-l=
eft:1px solid rgb(204,204,204);padding-left:1ex">
&gt;cycle among symbol naming conventions:<br>
<br>
So subsequent calls would switch to another convention? I think this<br>
would be ok if the point didn&#39;t move.<br></blockquote><div><br></div><d=
iv><div class=3D"gmail_default" style=3D"font-family:monospace">I&#39;d thi=
nk the default cycling options would be mode specific as I mentioned.=C2=A0=
 In Python mode, for example, kebabs aren&#39;t tasty as identifiers, unles=
s they&#39;re in a quoted string or comment so some=C2=A0context would be h=
elpful.=C2=A0 The code would not have to know what constitutes a valid iden=
tifier, though, so if in Python I want to convert my/tasty-kebab to my/tast=
y_kebab, it would fail as a Python identifier unless we also offer some kin=
d of character or syntax-table driven kind of trickery?=C2=A0 Not an expert=
 with the syntax tables so I&#39;m just guessing.</div></div><div>=C2=A0</d=
iv><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;bord=
er-left:1px solid rgb(204,204,204);padding-left:1ex">
&gt;M-x mark-sexp<br>
&gt;this-is-a-symbol<br>
&gt;M-x cycle-convention-symbol<br>
&gt;thisIsASymbol<br>
&gt;M-x cycle-convention-symbol<br>
&gt;this_is_a_symbol<br>
&gt;M-x cycle-convention-symbol<br>
&gt;ThisIsASymbol<br>
<br>
Besides cycling, maybe choosing a convention with<br>
completion?<br>
<br>
&gt;CamelCase, snakeCase, hyphen-case, underscore_case<br>
<br>
This could be another issue. The names I know these as<br>
are, respectively:<br>
<br>
- PascalCase<br>
- camelCase<br>
- kebab-case (yes, really)<br>
- snake_case<br></blockquote><div><br></div><div><div class=3D"gmail_defaul=
t" style=3D"font-family:monospace">Right, the snake bit me, it&#39;s PC, cC=
, k-C, s_c. Pop culture names.</div></div><div><br></div><blockquote class=
=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rg=
b(204,204,204);padding-left:1ex">
&gt;There are multiple packages like this[1, 2, 3, 4, 5, 6].<br>
<br>
Another interesting option would be to contact the author<br>
of one of these packages for inclusion in this file.<br></blockquote><div><=
br></div><div><div class=3D"gmail_default" style=3D"font-family:monospace">=
It seems &quot;easy&quot; enough to just do it without the hassle and as pa=
rt of core=C2=A0Emacs?=C2=A0 Especially if the implementations below aren&#=
39;t optimal and perhaps if tree sitter was leveraged this could be easier.=
 I don&#39;t think the below use any of that infrastructure.</div></div><di=
v>=C2=A0</div><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px=
 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
[1] &lt;<a href=3D"https://github.com/HKey/caseformat" rel=3D"noreferrer" t=
arget=3D"_blank">https://github.com/HKey/caseformat</a>&gt;<br>
[2] &lt;<a href=3D"https://hg.sr.ht/~zck/caser.el" rel=3D"noreferrer" targe=
t=3D"_blank">https://hg.sr.ht/~zck/caser.el</a>&gt;<br>
[3] &lt;<a href=3D"https://github.com/TakesxiSximada/change-case.el" rel=3D=
"noreferrer" target=3D"_blank">https://github.com/TakesxiSximada/change-cas=
e.el</a>&gt;<br>
[4] &lt;<a href=3D"https://github.com/jcs-elpa/cycle-case-style" rel=3D"nor=
eferrer" target=3D"_blank">https://github.com/jcs-elpa/cycle-case-style</a>=
&gt;<br>
[5] &lt;<a href=3D"https://codeberg.org/acdw/titlecase.el" rel=3D"noreferre=
r" target=3D"_blank">https://codeberg.org/acdw/titlecase.el</a>&gt;<br>
[6] &lt;<a href=3D"https://github.com/akicho8/string-inflection" rel=3D"nor=
eferrer" target=3D"_blank">https://github.com/akicho8/string-inflection</a>=
&gt;<br>
</blockquote></div></div>

--00000000000013680d063208b4f7--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#77326; Package emacs. Full text available.

Message received at 77326 <at> debbugs.gnu.org:


Received: (at 77326) by debbugs.gnu.org; 5 Apr 2025 14:10:59 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Apr 05 10:10:58 2025
Received: from localhost ([127.0.0.1]:44213 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1u14Ec-00083o-FG
	for submit <at> debbugs.gnu.org; Sat, 05 Apr 2025 10:10:58 -0400
Received: from layka.disroot.org ([178.21.23.139]:47178)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.84_2) (envelope-from <gabrielsantosdesouza@HIDDEN>)
 id 1u14EZ-00083Y-So
 for 77326 <at> debbugs.gnu.org; Sat, 05 Apr 2025 10:10:56 -0400
Received: from mail01.disroot.lan (localhost [127.0.0.1])
 by disroot.org (Postfix) with ESMTP id 2543C2600E;
 Sat,  5 Apr 2025 16:10:54 +0200 (CEST)
X-Virus-Scanned: SPAM Filter at disroot.org
Received: from layka.disroot.org ([127.0.0.1])
 by localhost (disroot.org [127.0.0.1]) (amavis, port 10024) with ESMTP
 id W7iJO7UAZbyS; Sat,  5 Apr 2025 16:10:53 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail;
 t=1743862253; bh=Z3QaBvn5LqMVJzEqui2bWRiBIBi3KXqNYwlIMWohLxk=;
 h=Date:From:To:CC:Subject:In-Reply-To:References;
 b=Ba0JEDFBAE8EGSAmihusbgpLbDQxTA7o+k7QYkxRvVRUrE0u5lKKXjVUYhoMWwV11
 A8HaGuLTF1q6hiir5CSuJAKK/cvzw7mi70O8pxMlrlr74DLXLRMWVNzIAaDYPzts17
 DrmFo8NL113Rf0/M3Vj5hUF2/dVsCbx1LUGG22chpcZbgY1RjyUL0mt9LOMoJQdWoL
 GLpTe/ojFSUp/hNo+3oDW7DkAAcPqeIV1cBVU769z+DCiihyG5YYOwM7jdEgBC2WJF
 lkBKrcexVNJ2WFaXghtu2TQedVv4XQjMI5lPxRS5vWZQrnP97IRJFf1vIQWIzvJLbH
 BZuNlZpSC/Nkg==
Date: Sat, 05 Apr 2025 11:10:48 -0300
From: Gabriel Santos <gabrielsantosdesouza@HIDDEN>
To: Ship Mints <shipmints@HIDDEN>, Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#77326: [PATCH] Add symbol-mode
User-Agent: Thunderbird for Android
In-Reply-To: <CAN+1Hbq1iXXXpoan7nEALyWE1sy920ZkL+GuOpnSpXa8rKMw1g@HIDDEN>
References: <87bjtmjdq2.fsf@HIDDEN> <861pu7xa2e.fsf@HIDDEN>
 <CAN+1Hbq1iXXXpoan7nEALyWE1sy920ZkL+GuOpnSpXa8rKMw1g@HIDDEN>
Message-ID: <A098D43B-04F0-4C4D-9BAD-529C0C2A02F2@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain;
 charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 77326
Cc: Andrea Corallo <acorallo@HIDDEN>,
 Gabriel Santos <gabriel.santos.smtp@HIDDEN>,
 Stefan Monnier <monnier@HIDDEN>, 77326 <at> debbugs.gnu.org,
 Stefan Kangas <stefankangas@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

>One nice feature this patch could have is to cycle among symbol naming
>conventions: CamelCase, snakeCase, hyphen-case, underscore_case (any
>others?) and that would make it convenient when a variable name with the
>same components are used across modalities; e=2Eg=2E in config files, jso=
n,
>xml, protobufs, C/C++ vs=2E python, and in emacs-lisp-mode and Emacs C co=
de,
>cycling among to Fsymbol_name or Ssymbol_name?

There are multiple packages like this[1, 2, 3, 4, 5, 6]=2E

Despite that, I think I could give it a try, I just have to
avoid looking into them because of copyright=2E

So a comnand that changes between different symbol naming conventions,
Like how the capitalization commands work?

Point is "|":

>M-x cycle-convention-symbol
>|this-is-a-symbol
>thisIsASymbol|

>cycle among symbol naming conventions:

So subsequent calls would switch to another convention? I think this
would be ok if the point didn't move=2E

>M-x mark-sexp
>this-is-a-symbol
>M-x cycle-convention-symbol
>thisIsASymbol
>M-x cycle-convention-symbol
>this_is_a_symbol
>M-x cycle-convention-symbol
>ThisIsASymbol

Besides cycling, maybe choosing a convention with
completion?

>CamelCase, snakeCase, hyphen-case, underscore_case

This could be another issue=2E The names I know these as
are, respectively:

- PascalCase
- camelCase
- kebab-case (yes, really)
- snake_case

>There are multiple packages like this[1, 2, 3, 4, 5, 6]=2E

Another interesting option would be to contact the author
of one of these packages for inclusion in this file=2E

[1] <https://github=2Ecom/HKey/caseformat>
[2] <https://hg=2Esr=2Eht/~zck/caser=2Eel>
[3] <https://github=2Ecom/TakesxiSximada/change-case=2Eel>
[4] <https://github=2Ecom/jcs-elpa/cycle-case-style>
[5] <https://codeberg=2Eorg/acdw/titlecase=2Eel>
[6] <https://github=2Ecom/akicho8/string-inflection>

--=20
Gabriel Santos




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#77326; Package emacs. Full text available.

Message received at 77326 <at> debbugs.gnu.org:


Received: (at 77326) by debbugs.gnu.org; 5 Apr 2025 12:28:54 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Apr 05 08:28:53 2025
Received: from localhost ([127.0.0.1]:41872 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1u12dp-00020e-AW
	for submit <at> debbugs.gnu.org; Sat, 05 Apr 2025 08:28:53 -0400
Received: from mail-vk1-xa31.google.com ([2607:f8b0:4864:20::a31]:55388)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.84_2) (envelope-from <shipmints@HIDDEN>)
 id 1u12dk-00020M-TT
 for 77326 <at> debbugs.gnu.org; Sat, 05 Apr 2025 08:28:50 -0400
Received: by mail-vk1-xa31.google.com with SMTP id
 71dfb90a1353d-52413efd0d3so1258775e0c.2
 for <77326 <at> debbugs.gnu.org>; Sat, 05 Apr 2025 05:28:48 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1743856123; x=1744460923; darn=debbugs.gnu.org;
 h=cc:to:subject:message-id:date:from:in-reply-to:references
 :mime-version:from:to:cc:subject:date:message-id:reply-to;
 bh=bI3xOTQsw7FHROB+nsJpwGgMeXI6KMbDKfMmxwD7chA=;
 b=euIHJc1Qe4RNLRozJ499H97NWif8M5rcqgWmhs9tGqpypWGV6+1bY5J4H0WibCqFJq
 vhM4mcor4K6S+9vb3xTF63Z/u1LKuFz3qPzDWDZypa+EfD9fvmdxJkS3NeJ/YTOlzYqI
 /d41PJE2hSnJ3MA6U/RVJ/1AuGywP7YRjjTiVvpxguTuv8AntZeg/3r1yCdbe3+7c5Df
 +N+Y63h/wB/ZGq6V5P/Astjgw1N5+ZC4nDHmBIlsG7JXBDvJ3lZSvwriyvoViJ9iRa+B
 6aMwDdSxTkZYiFqRD6fDwYoUcVUrIilTO05jzTzKg+F2KsXF/ptdq02vf6LR5bo95H6R
 G+vw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1743856123; x=1744460923;
 h=cc:to:subject:message-id:date:from:in-reply-to:references
 :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id
 :reply-to;
 bh=bI3xOTQsw7FHROB+nsJpwGgMeXI6KMbDKfMmxwD7chA=;
 b=b32oou9DftoMotkl20Lmowx2++ukbO8oBQNJfLxgjRKqtmT0arI/U1qbMswcuTM2f/
 8uvQn1WhhLwYw8ikPbhQWBQpUIedrDiR7A7vzBaJaJlud9d9d+AiIM5baQTm52Mlqkhg
 iGZNAOtryPTBPC7kyoRjIfILt0UPOMLzMnriW+20X5FJKlYFtxDGXEw6cOnd8XbCLr2n
 TmN0KYTN2MYPPljj6Ku/eCXhuek14okd2/7qdHyESXDpot64RfKG914xzDVNgV1jJwM/
 pn73WY7Wmv4mHcAaX1qWM/H6tlpGnxOy+JsWb5EDifAJBVZTSSTSOODrZfvXvyeoCIk5
 H3HQ==
X-Forwarded-Encrypted: i=1;
 AJvYcCXh028gZbmBg8EZskilgkpLEFWQKHlqX2jowN9Q7uYRTgM1QzPr1cabh+BGeztYL7h1EA14qg==@debbugs.gnu.org
X-Gm-Message-State: AOJu0YyycW5fR7a9PEiJXfw2q9LRFQEkmrbqS44dd3pfZQyYUSL5Ti4Y
 /PP2CFpv0tBOXl56/qZgq8RomysADDeH9DyJ8mU17cYgaNTWXQzjjHHCU8DF6SqHctniQou9yY7
 KcO/4Dq+zd/9ItKWqVjxgN4ddkX4=
X-Gm-Gg: ASbGncvZK+NpesnIPqvCnOXVet7JVTd63XoMsZY4pYAgjyVf4WwknarxxmaUw5iRWaB
 IzKnQdYOP3tkkThqL3R8dYFEKYATMr+2puFC2WnavwqQsf4qPmfhIYPTBxTE6LNqGLElyl895eH
 sfwQAnfYhwIMGx5OQy9rPnvK349aRmrjUgC9QY
X-Google-Smtp-Source: AGHT+IFygLVgVKENQw58YsFlFqkPWVk4DKZjxgwYIJJDCaoo/ZCcE0jg7qq0438TXUkVlty6tL9CgHsVaQZ29z4ZyGg=
X-Received: by 2002:a05:6102:54aa:b0:4c3:7f7:92f4 with SMTP id
 ada2fe7eead31-4c85539d9c7mr4702717137.6.1743856123056; Sat, 05 Apr 2025
 05:28:43 -0700 (PDT)
MIME-Version: 1.0
References: <87bjtmjdq2.fsf@HIDDEN> <861pu7xa2e.fsf@HIDDEN>
In-Reply-To: <861pu7xa2e.fsf@HIDDEN>
From: Ship Mints <shipmints@HIDDEN>
Date: Sat, 5 Apr 2025 08:28:32 -0400
X-Gm-Features: ATxdqUFgE7X8hO_59wj_m_kwSzBWls73_X0hTOGQ0Jct6Tox1OQxwKHxFOhJPCA
Message-ID: <CAN+1Hbq1iXXXpoan7nEALyWE1sy920ZkL+GuOpnSpXa8rKMw1g@HIDDEN>
Subject: Re: bug#77326: [PATCH] Add symbol-mode
To: Eli Zaretskii <eliz@HIDDEN>
Content-Type: multipart/alternative; boundary="000000000000c11bac063207248b"
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 77326
Cc: Gabriel Santos <gabriel.santos.smtp@HIDDEN>,
 gabrielsantosdesouza@HIDDEN, 77326 <at> debbugs.gnu.org,
 Stefan Monnier <monnier@HIDDEN>, Andrea Corallo <acorallo@HIDDEN>,
 Stefan Kangas <stefankangas@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

--000000000000c11bac063207248b
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

On Sat, Apr 5, 2025 at 4:55=E2=80=AFAM Eli Zaretskii <eliz@HIDDEN> wrote:

> > Cc: Gabriel Santos <gabrielsantosdesouza@HIDDEN>
> > From: Gabriel Santos <gabriel.santos.smtp@HIDDEN>
> > Date: Thu, 27 Mar 2025 19:44:21 -0300
> >
> > Greetings,
> >
> > This patch provides a new package for interacting with symbols, based o=
n
> > the current word commands and the built-in package "subword".
> >
> > A minor mode that replaces the word commands is also provided, also
> > inspired by the subword package, but additionally on the usage of
> > defvar-keymap I made in a PR I opened for the puni package[1].
> >
> > - Points of discussion
> >
> > Would the mention of this mode be a good addition to the documentation?
> >
> > I don't know how to contribute to the docs, but I would look into doing
> > so if you think it's a good idea
> >
> > [1] <https://github.com/AmaiKinono/puni/pull/75>
> >
> > P.S.: This is being sent from a different e-mail from the patch because
> > my e-mail provider, viz. Disroot, is having issues with spam, and that
> > was blocking my messages, so I decided to create a Gmail account to go
> > around that.
>
> Thanks.
>
> Any comments to the patch, or objections to adding this mode to Emacs?
>

One nice feature this patch could have is to cycle among symbol naming
conventions: CamelCase, snakeCase, hyphen-case, underscore_case (any
others?) and that would make it convenient when a variable name with the
same components are used across modalities; e.g. in config files, json,
xml, protobufs, C/C++ vs. python, and in emacs-lisp-mode and Emacs C code,
cycling among to Fsymbol_name or Ssymbol_name?

--000000000000c11bac063207248b
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div dir=3D"ltr"><div class=3D"gmail_default" style=3D"fon=
t-family:monospace"><span style=3D"font-family:Arial,Helvetica,sans-serif">=
On Sat, Apr 5, 2025 at 4:55=E2=80=AFAM Eli Zaretskii &lt;<a href=3D"mailto:=
eliz@HIDDEN">eliz@HIDDEN</a>&gt; wrote:</span></div></div><div class=3D"g=
mail_quote gmail_quote_container"><blockquote class=3D"gmail_quote" style=
=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding=
-left:1ex">&gt; Cc: Gabriel Santos &lt;<a href=3D"mailto:gabrielsantosdesou=
za@HIDDEN" target=3D"_blank">gabrielsantosdesouza@HIDDEN</a>&gt;<=
br>
&gt; From: Gabriel Santos &lt;<a href=3D"mailto:gabriel.santos.smtp@HIDDEN=
om" target=3D"_blank">gabriel.santos.smtp@HIDDEN</a>&gt;<br>
&gt; Date: Thu, 27 Mar 2025 19:44:21 -0300<br>
&gt; <br>
&gt; Greetings,<br>
&gt; <br>
&gt; This patch provides a new package for interacting with symbols, based =
on<br>
&gt; the current word commands and the built-in package &quot;subword&quot;=
.<br>
&gt; <br>
&gt; A minor mode that replaces the word commands is also provided, also<br=
>
&gt; inspired by the subword package, but additionally on the usage of<br>
&gt; defvar-keymap I made in a PR I opened for the puni package[1].<br>
&gt; <br>
&gt; - Points of discussion<br>
&gt; <br>
&gt; Would the mention of this mode be a good addition to the documentation=
?<br>
&gt; <br>
&gt; I don&#39;t know how to contribute to the docs, but I would look into =
doing<br>
&gt; so if you think it&#39;s a good idea<br>
&gt; <br>
&gt; [1] &lt;<a href=3D"https://github.com/AmaiKinono/puni/pull/75" rel=3D"=
noreferrer" target=3D"_blank">https://github.com/AmaiKinono/puni/pull/75</a=
>&gt;<br>
&gt; <br>
&gt; P.S.: This is being sent from a different e-mail from the patch becaus=
e<br>
&gt; my e-mail provider, viz. Disroot, is having issues with spam, and that=
<br>
&gt; was blocking my messages, so I decided to create a Gmail account to go=
<br>
&gt; around that.<br>
<br>
Thanks.<br>
<br>
Any comments to the patch, or objections to adding this mode to Emacs?<br><=
/blockquote><div><br></div><div class=3D"gmail_default" style=3D"font-famil=
y:monospace">One nice feature this patch could have is to cycle among symbo=
l naming conventions: CamelCase, snakeCase, hyphen-case, underscore_case (a=
ny others?) and that would make it convenient when a variable name with the=
 same components are used across modalities; e.g. in config files, json, xm=
l, protobufs, C/C++ vs. python, and in emacs-lisp-mode and Emacs C code, cy=
cling among to Fsymbol_name or Ssymbol_name?</div></div></div>

--000000000000c11bac063207248b--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#77326; Package emacs. Full text available.

Message received at 77326 <at> debbugs.gnu.org:


Received: (at 77326) by debbugs.gnu.org; 5 Apr 2025 08:54:56 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Apr 05 04:54:56 2025
Received: from localhost ([127.0.0.1]:41483 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1u0zIl-0005pz-Jn
	for submit <at> debbugs.gnu.org; Sat, 05 Apr 2025 04:54:55 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:47690)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <eliz@HIDDEN>) id 1u0zIh-0005pi-Vn
 for 77326 <at> debbugs.gnu.org; Sat, 05 Apr 2025 04:54:52 -0400
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 <eliz@HIDDEN>)
 id 1u0zIZ-0005hH-6b; Sat, 05 Apr 2025 04:54:44 -0400
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=SvDcTtNir5Ljm6GXJb5VSTUcUCyVT5UjMY+IrmhY9q0=; b=aotIGBmfnC+H
 LeXQgsaPRflKK7+/Z3wBhjrDbqHosn4s+tkPoYEvDIyXmrT5kdKrGDvfrxAB140+5OT2EWEp36jp8
 yaWqC5gNXgkHsfUaNjzmge1844+75bNzUBNF6WkAhJizOtzoEPHtwLiL2Up9ABnmWctjDPssqaFxT
 Q+1LqoQnPoHAq2e4EoMbKVvFwConVxZYGUMwf/h/bbC7Z2P/7srIlQ8+mDqd/T8xDXwZLN5cna1qR
 oBSCBYwf/4+4lMzb6n1spUAHvxAJAHN7XnAWVhxsL3O57wp7WHai4zoV2BSSWw0kResmRu03/xomo
 CTofrePHf0Zx7J6AnXWhaA==;
Date: Sat, 05 Apr 2025 11:54:33 +0300
Message-Id: <861pu7xa2e.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Stefan Monnier <monnier@HIDDEN>,
 Stefan Kangas <stefankangas@HIDDEN>, Andrea Corallo <acorallo@HIDDEN>
In-Reply-To: <87bjtmjdq2.fsf@HIDDEN> (message from Gabriel Santos on Thu,
 27 Mar 2025 19:44:21 -0300)
Subject: Re: bug#77326: [PATCH] Add symbol-mode
References: <87bjtmjdq2.fsf@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 77326
Cc: Gabriel Santos <gabriel.santos.smtp@HIDDEN>,
 gabrielsantosdesouza@HIDDEN, 77326 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> Cc: Gabriel Santos <gabrielsantosdesouza@HIDDEN>
> From: Gabriel Santos <gabriel.santos.smtp@HIDDEN>
> Date: Thu, 27 Mar 2025 19:44:21 -0300
> 
> Greetings,
> 
> This patch provides a new package for interacting with symbols, based on
> the current word commands and the built-in package "subword".
> 
> A minor mode that replaces the word commands is also provided, also
> inspired by the subword package, but additionally on the usage of
> defvar-keymap I made in a PR I opened for the puni package[1].
> 
> - Points of discussion
> 
> Would the mention of this mode be a good addition to the documentation?
> 
> I don't know how to contribute to the docs, but I would look into doing
> so if you think it's a good idea
> 
> [1] <https://github.com/AmaiKinono/puni/pull/75>
> 
> P.S.: This is being sent from a different e-mail from the patch because
> my e-mail provider, viz. Disroot, is having issues with spam, and that
> was blocking my messages, so I decided to create a Gmail account to go
> around that.

Thanks.

Any comments to the patch, or objections to adding this mode to Emacs?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#77326; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 28 Mar 2025 04:41:19 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Mar 28 00:41:19 2025
Received: from localhost ([127.0.0.1]:52280 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ty1Wv-0002Ja-Oj
	for submit <at> debbugs.gnu.org; Fri, 28 Mar 2025 00:41:19 -0400
Received: from lists.gnu.org ([2001:470:142::17]:38570)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <gabriel.santos.smtp@HIDDEN>)
 id 1txvxl-0004q7-6k
 for submit <at> debbugs.gnu.org; Thu, 27 Mar 2025 18:44:38 -0400
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 <gabriel.santos.smtp@HIDDEN>)
 id 1txvxe-00059Q-Uw
 for bug-gnu-emacs@HIDDEN; Thu, 27 Mar 2025 18:44:30 -0400
Received: from mail-pl1-x643.google.com ([2607:f8b0:4864:20::643])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.90_1) (envelope-from <gabriel.santos.smtp@HIDDEN>)
 id 1txvxc-0002w8-18
 for bug-gnu-emacs@HIDDEN; Thu, 27 Mar 2025 18:44:30 -0400
Received: by mail-pl1-x643.google.com with SMTP id
 d9443c01a7336-2243803b776so49228015ad.0
 for <bug-gnu-emacs@HIDDEN>; Thu, 27 Mar 2025 15:44:26 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=gmail.com; s=20230601; t=1743115465; x=1743720265; darn=gnu.org;
 h=mime-version:message-id:date:subject:cc:to:from:from:to:cc:subject
 :date:message-id:reply-to;
 bh=5DrRmM2Eym9wGv7+cZuZpPtHM5Xf4ndooFi4iIuxlXE=;
 b=JavmiDvn9AxjS+OTeuKxjKTJoTJhWmbm2QcYWxbUfyv4N3UIm7uNjKkLPDYZscaVMi
 IiZUh1GCSDqfCqhIZntN2WT5sdvcDml/m4OyTJiS3X5meWYI6deKNKLpG0y+lfsz69gK
 DtuS08fC+nfPw0NzDsUE9F6Qnhw/16AUH/cYyguhX1UxVM9NZc9fASE1HQGKlMxOUClj
 g6oGLxwGnGPCmlKcgFQipyEcojh14f30bTlxV39tNLA6fCT+/NS4GjRZBMBHFAH5OIQC
 oSRcvs+GHish72iGymwri6Fhjsuya9ZL9DTtxPS0AGJFNnElfUNs3kVQwyz+GY5EcJqL
 5KeA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20230601; t=1743115465; x=1743720265;
 h=mime-version:message-id:date:subject:cc:to:from:x-gm-message-state
 :from:to:cc:subject:date:message-id:reply-to;
 bh=5DrRmM2Eym9wGv7+cZuZpPtHM5Xf4ndooFi4iIuxlXE=;
 b=DcS7XMEswr8UgB9FFpf9Wxe/VVvhMgh2iXmrfJooyPfXsySbo1V143E8DmRXEovJNE
 UDFqjh706aOFnXcdgB1Z55DX07tyjxdOf5UyjSxz+0omO1Y2No0kQmqeU8qd2Qc0TkHI
 /AKznF3r9TYmDuF1RUkxstG39lx9gWjPQe3czapEQO0cWxTBX/E9I7s/gLL2gvOXpZNK
 KlELlpo5BnDePUw8dRMZo76PCMKdtKDwTeSYSGFNGtiAmu5bEKdaIcZfjay3N064W1L/
 a8qyLKPdkdfKEWpJFeQmbeeqsUxzvRwabVsnIl0u7ZNOcFzW8rvGQj+DH9+Mt84pufd8
 uaCw==
X-Gm-Message-State: AOJu0YzKFEI4Yt4/RLhK45AfR8mXxAmM2HlcTlYrAnPiJL2RSCSbWn5l
 LfO9phG4Zhz+A9OSDSGUo6O7Lh9ib81MWGMIQFNbWWFcoKYGlC+E
X-Gm-Gg: ASbGnctrBkHMGxx352PfDDUwGP0G238wsGvo4PwcoJbzEPH5YI9qP2cb3fMPm2qemfE
 EGnNOSjzGKKVUFGWFE3YGJeU9vtTij6DbOjHGwbn+WdubaV1c/ZgssSy8NEyDxosraxTVgJzOMI
 bya6XYvap3m6qCWjyzKLynw8U8lk+8iGVBh/GyAItfBV0NVS2PlBhT43m6Z30v0EV0+oSHcP8vo
 CbO9dr+/eE3rxeI46gknRlZuRreys+uLuhhWaUlD3FwJIK5uTDo3ROFbqXWUF3NsOpLhgwP2bPV
 sVLISS5S81/pUwdAco+f8Xn+KFxEfpUyhLfYyLzL5/ZLsmagygASVXWBJSqTcSsrMWZxwtm3mmr
 znuQTgu5bF/+y+ySShw==
X-Google-Smtp-Source: AGHT+IHZwNlAslKjXaCICqwZBPmrNJOdx/IRDlOMNxiX7j4lTjZ/Lfa8qyLhfw6EM0UC+d9IVzqVpg==
X-Received: by 2002:a05:6a00:3a05:b0:736:4830:68a6 with SMTP id
 d2e1a72fcca58-73960e0c16cmr8035739b3a.4.1743115464848; 
 Thu, 27 Mar 2025 15:44:24 -0700 (PDT)
Received: from guix-pc (177-70-164-151.infotec.psi.br. [177.70.164.151])
 by smtp.gmail.com with ESMTPSA id
 d2e1a72fcca58-73970def558sm410477b3a.15.2025.03.27.15.44.23
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Thu, 27 Mar 2025 15:44:24 -0700 (PDT)
From: Gabriel Santos <gabriel.santos.smtp@HIDDEN>
To: bug-gnu-emacs@HIDDEN
Subject: [PATCH] Add symbol-mode
Date: Thu, 27 Mar 2025 19:44:21 -0300
Message-ID: <87bjtmjdq2.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="=-=-="
Received-SPF: pass client-ip=2607:f8b0:4864:20::643;
 envelope-from=gabriel.santos.smtp@HIDDEN; helo=mail-pl1-x643.google.com
X-Spam_score_int: 0
X-Spam_score: -0.1
X-Spam_bar: /
X-Spam_report: (-0.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, FREEMAIL_FROM=0.001,
 PDS_OTHER_BAD_TLD=1.999, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001,
 SPF_PASS=-0.001 autolearn=no autolearn_force=no
X-Spam_action: no action
X-Spam-Score: 1.0 (+)
X-Debbugs-Envelope-To: submit
X-Mailman-Approved-At: Fri, 28 Mar 2025 00:41:03 -0400
Cc: Gabriel Santos <gabrielsantosdesouza@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.0 (/)

--=-=-=
Content-Type: text/plain


Greetings,

This patch provides a new package for interacting with symbols, based on
the current word commands and the built-in package "subword".

A minor mode that replaces the word commands is also provided, also
inspired by the subword package, but additionally on the usage of
defvar-keymap I made in a PR I opened for the puni package[1].

- Points of discussion

Would the mention of this mode be a good addition to the documentation?

I don't know how to contribute to the docs, but I would look into doing
so if you think it's a good idea

[1] <https://github.com/AmaiKinono/puni/pull/75>

P.S.: This is being sent from a different e-mail from the patch because
my e-mail provider, viz. Disroot, is having issues with spam, and that
was blocking my messages, so I decided to create a Gmail account to go
around that.

Regards,

-- 
Gabriel Santos


--=-=-=
Content-Type: text/x-patch; charset=utf-8
Content-Disposition: attachment; filename=0001-Add-symbol-mode.patch
Content-Transfer-Encoding: quoted-printable
Content-Description: [PATCH] Add symbol-mode

From ea08a5251878e5de1b379becfcef401a4393fa49 Mon Sep 17 00:00:00 2001
From: Gabriel Santos <gabrielsantosdesouza@HIDDEN>
Date: Mon, 24 Mar 2025 20:18:06 -0300
Subject: [PATCH] Add symbol-mode

* lisp/progmodes/symbol.el: New file.
* test/lisp/progmodes/symbol-tests.el: New test file.
* etc/NEWS: Announce symbol-mode.
---
 etc/NEWS                            |   9 ++
 lisp/progmodes/symbol.el            | 222 ++++++++++++++++++++++++++++
 test/lisp/progmodes/symbol-tests.el |  84 +++++++++++
 3 files changed, 315 insertions(+)
 create mode 100644 lisp/progmodes/symbol.el
 create mode 100644 test/lisp/progmodes/symbol-tests.el

diff --git a/etc/NEWS b/etc/NEWS
index d90836b8c6d..8c70bf2e648 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -1651,6 +1651,15 @@ A major mode based on the tree-sitter library for ed=
iting "go.work"
 files.  If tree-sitter is properly set-up by the user, it can be
 enabled for files named "go.work".
=20
+---
+** New minor mode 'symbol-mode'.
+This minor mode replaces word related commands such as 'upcase-word'
+with commands better suited for symbols.  A symbol is any combination
+of characters not separated by a space.  This is primarily useful for
+programming modes, where one can think of variables such as
+"this_is_a_word" as an actual word in the codebase, as it is used to
+refer to a value.
+
 
 * Incompatible Lisp Changes in Emacs 31.1
=20
diff --git a/lisp/progmodes/symbol.el b/lisp/progmodes/symbol.el
new file mode 100644
index 00000000000..26ce9d70878
--- /dev/null
+++ b/lisp/progmodes/symbol.el
@@ -0,0 +1,222 @@
+;;; symbol.el --- Keymap for interacting with symbols instead of words -*-=
 lexical-binding: t -*-
+
+;; Copyright (C) 2025 Free Software Foundation, Inc.
+
+;; Author: Gabriel Santos <gabrielsantosdesouza@HIDDEN>
+
+;; This file is part of GNU Emacs.
+
+;; GNU Emacs is free software: you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
+
+;; GNU Emacs is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;; GNU General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with GNU Emacs.  If not, see <https://www.gnu.org/licenses/>.
+
+;;; Commentary:
+
+;; This package provides the `symbol' minor mode which replaces the
+;; regular commands for word movement and interaction, such as
+;; `backward-word' and `capitalize-word' with ones specialized for
+;; symbols (namely `backward-symbol' and `capitalize-symbol').
+
+;; A symbol is any sequence of characters, including words, that can
+;; compose a single "word" in a programming sense.  Thus, most
+;; combinations of words and signs should be valid.
+
+;; To make this clearer, the following are all symbols:
+;; - symbol
+;; - this-is-a-symbol
+;; - this_is_also_a_symbol
+;; - my/symbol
+;; - 1010-symbol
+;; - alsoSomeSymbol
+;; - =E5=AD=99/=E6=AD=A6
+
+;; To enable `symbol-mode' automatically for a specific mode, use
+;; hooks:
+;;
+;; (add-hook 'lisp-mode-hook 'symbol-mode)
+;;
+;; Or, for the use-package inclined:
+;;
+;; (use-package symbol
+;;   :hook
+;;   (lisp-mode . symbol-mode))
+
+;;; Code:
+
+(defun backward-symbol (arg)
+  "Move point to the previous position that is the start of a symbol.
+For the definition of a symbol, see `symbol-mode'.
+With prefix argument ARG, do it ARG times if positive, or move
+forwards ARG times if negative."
+  (interactive "^p")
+  (forward-symbol (- arg)))
+
+(defun kill-symbol (arg)
+  "Kill characters forward until encountering the end of a symbol.
+For the definition of a symbol, see `symbol-mode'.
+With prefix argument ARG, do it ARG times if positive, or do it
+backwards ARG times if negative."
+  (interactive "p")
+  (kill-region (point) (progn (forward-symbol arg) (point))))
+
+(defun backward-kill-symbol (arg)
+  "Kill characters backwards until encountering the start of a symbol.
+For the definition of a symbol, see `symbol-mode'.
+With prefix argument ARG, do it ARG times if positive, or do it
+forwards ARG times if negative."
+  (interactive "p")
+  (kill-symbol (- arg)))
+
+(defun mark-symbol (&optional arg allow-extend)
+  "Set mark ARG symbols from point or move mark one symbol.
+For the definition of a symbol, see `symbol-mode'.
+When called from Elisp with ALLOW-EXTEND omitted or nil, mark is
+set ARG symbols from point.
+
+With ARG and ALLOW-EXTEND both non-nil (interactively with prefix
+argument), the place to which mark goes is the same place
+\\[forward-symbol] would move to with the same argument; if the mark is
+active, it moves ARG symbols from its current position, otherwise if is
+set ARG symbols from point.
+When invoked interactively without a prefix argument and no active
+region, mark moves one symbol forward.
+When invoked interactively without a prefix argument, and region is
+active, mark moves one symbol away of point (i.e., forward if mark is
+at or after point, back if mark is before point), thus extending the
+region by one symbol.  Since the direction of region depends on the
+relative position of mark and point, you can change the direction
+by \\[exchange-point-and-mark]."
+  (interactive "P\np")
+  (cond ((and allow-extend
+              (or (and (eq last-command this-command) (mark t))
+                  (region-active-p)))
+         (setq arg (if arg (prefix-numeric-value arg)
+                     (if (< (mark) (point)) -1 1)))
+         (set-mark
+          (save-excursion
+            (goto-char (mark))
+            (forward-symbol arg)
+            (point))))
+        (t
+         (push-mark
+          (save-excursion
+            (forward-symbol (prefix-numeric-value arg))
+            (point))
+          nil t))))
+
+(defun right-symbol (&optional n)
+  "Move point N symbols to the right (to the left if N is negative).
+for the definition of a symbol, see `symbol-mode'.
+
+Depending on the bidirectional context, this may move either backward
+or forward in the buffer.  This is in contrast with \\[forward-symbol]
+and \\[backward-symbol], which see."
+  (interactive "^p")
+  (if (eq (current-bidi-paragraph-direction) 'left-to-right)
+      (forward-symbol n)
+    (backward-symbol n)))
+
+(defun left-symbol (&optional n)
+  "Move point N symbols to the left (to the right if N is negative).
+for the definition of a symbol, see `symbol-mode'.
+
+Depending on the bidirectional context, this may move either backward
+or forward in the buffer.  This is in contrast with \\[forward-symbol]
+and \\[backward-symbol], which see."
+  (interactive "^p")
+  (if (eq (current-bidi-paragraph-direction) 'left-to-right)
+      (backward-symbol n)
+    (forward-symbol n)))
+
+(defun transpose-symbols (arg)
+  "Interchange symbols around point, leaving point at the end of them.
+for the definition of a symbol, see `symbol-mode'.
+With prefix argument ARG, the symbol before or around point is taken and
+dragged forward past ARG or other symbols (backwards if ARG is negative).
+If ARG is unspecified, the symbols around or after point and around or
+after mark are interchanged."
+  (interactive "*p")
+  (transpose-subr 'forward-symbol arg))
+
+(defun downcase-symbol (arg)
+  "Convert to lower case from point to the end of a symbol, moving over.
+For the definition of a symbol, see `symbol-mode'.
+With a positive prefix argument ARG, downcase that many symbols forward.
+Note that calling this function in the middle of a symbol doesn't
+affect it.  If ARG is negative, previous symbols, including the current
+one are converted, but the point won't move."
+  (interactive "p")
+  (let ((start (point)))
+    (if (minusp arg)
+        (progn
+          (forward-symbol arg)
+          (downcase-region start (point))
+          (goto-char start))
+      (downcase-region (point) (forward-symbol arg)))))
+
+
+(defun upcase-symbol (arg)
+  "Convert to upper case from point to the end of a symbol, moving over.
+For the definition of a symbol, see `symbol-mode'.
+With a positive prefix argument ARG, upcase that many symbols forward.
+Note that calling this function in the middle of a symbol doesn't
+affect it.  If ARG is negative, previous symbols, including the current
+one are converted, but the point won't move."
+  (interactive "p")
+  (let ((start (point)))
+    (if (minusp arg)
+        (progn
+          (forward-symbol arg)
+          (upcase-region start (point))
+          (goto-char start))
+      (upcase-region (point) (forward-symbol arg)))))
+
+(defun capitalize-symbol (arg)
+  "Capitalize from point to the end of symbol, moving over.
+For the definition of a symbol, see `symbol-mode'.
+With a positive prefix arugment ARG, capitalize that many symbols forward.
+Note that calling this function in the middle of a symbol doesn't
+affect it.  If ARG is negative, previous symbols, including the current
+one are converted, but the point won't move."
+  (interactive "p")
+  (let ((start (point)))
+    (if (minusp arg)
+        (progn
+          (forward-symbol arg)
+          (capitalize-region start (point))
+          (goto-char start))
+      (capitalize-region (point) (forward-symbol arg)))))
+
+(defvar-keymap symbol-mode-map
+  :doc "Keymap used for `symbol-mode'."
+  "<remap> <forward-word>" #'forward-symbol
+  "<remap> <backward-word>" #'backward-symbol
+  "<remap> <kill-word>" #'kill-symbol
+  "<remap> <mark-word>" #'mark-symbol
+  "<remap> <backward-kill-word>" #'backward-kill-symbol
+  "<remap> <left-word>" #'left-symbol
+  "<remap> <right-word>" #'right-symbol
+  "<remap> <transpose-words>" #'transpose-symbols
+  "<remap> <downcase-word>" #'downcase-symbol
+  "<remap> <upcase-word>" #'upcase-symbol
+  "<remap> <capitalize-word>" #'capitalize-symbol)
+
+;;;###autoload
+(define-minor-mode symbol-mode
+  "Replace word-related commands with symbols-related ones.
+A symbol is a word-like construct composed of a combination of words and
+signs, with no separating space."
+  :lighter " =CE=BB")
+
+(provide 'symbol)
+
+;;; symbol.el ends here
diff --git a/test/lisp/progmodes/symbol-tests.el b/test/lisp/progmodes/symb=
ol-tests.el
new file mode 100644
index 00000000000..da334fdb792
--- /dev/null
+++ b/test/lisp/progmodes/symbol-tests.el
@@ -0,0 +1,84 @@
+;;; symbol-tests.el --- Testing the symbol-related commands -*- lexical-bi=
nt -*-
+
+;; Copyright (C) 2025 Free Software Foundation, Inc.
+
+;; Author: Gabriel Santos <gabrielsantosdesouza@HIDDEN>
+
+;; This file is part of GNU Emacs.
+
+;; GNU Emacs is free software: you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
+
+;; GNU Emacs is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;; GNU General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with GNU Emacs.  If not, see <https://www.gnu.org/licenses/>.
+
+;;; Commentary:
+
+;; This file is used for testing the functionality of the
+;; `symbol' package.  It's pretty close to the regular word commands,
+;; but it's always nice ot have tests.
+
+;;; Code:
+
+(require 'ert)
+(require 'symbol)
+
+(defconst symbol-tests-strings
+  '("foo^" "foo-bar^" "foo_bar^" "foo/bar^" "=E5=AD=99/=E6=AD=A6^"))
+
+(ert-deftest symbol-tests ()
+  "Test the `symbol-mode' rules."
+  (with-temp-buffer
+    (dolist (str symbol-tests-strings)
+      (erase-buffer)
+      (insert str)
+      (goto-char (point-min))
+      (while (search-forward "^" nil t)
+        (replace-match ""))
+      (goto-char (point-min))
+      (while (not (eobp))
+        (forward-symbol 1)
+        (insert "^"))
+      (should (equal (buffer-string) str)))))
+
+(ert-deftest symbol-tests2 ()
+  "Test that motion in `symbol-mode' stops at the right places."
+
+  (let* ((line "foo foo-bar foo_bar foo/bar 365-symbol")
+         (fwrd "*  *       *       *       *          *")
+         (bkwd "*   *       *       *       *         *"))
+
+    (with-temp-buffer
+      (symbol-mode 1)
+      (insert line)
+
+      ;; Test forward motion.
+
+      (goto-char (point-min))
+      (let ((stops (make-string (length fwrd) ?\ )))
+        (while (progn
+                 (aset stops (1- (point)) ?\*)
+                 (not (eobp)))
+          (forward-symbol 1))
+        (should (equal stops fwrd)))
+
+      ;; Test backwards motion.
+
+      (goto-char (point-max))
+      (let ((stops (make-string (length bkwd) ?\ )))
+        (while (progn
+                 (aset stops (1- (point)) ?\*)
+                 (not (bobp)))
+          (backward-symbol 1))
+        (should (equal stops bkwd))))))
+
+
+(provide 'symbol-tests)
+;;; symbol-tests.el ends here
--=20
2.49.0


--=-=-=--




Acknowledgement sent to Gabriel Santos <gabriel.santos.smtp@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#77326; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Sat, 5 Apr 2025 17:15:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.