From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Tim Landscheidt Newsgroups: gmane.emacs.bugs Subject: bug#66386: 28.2; RFE: Provide global key bindings for increasing/decreasing numbers at point Date: Sat, 07 Oct 2023 14:28:24 +0000 Organization: https://www.tim-landscheidt.de/ Message-ID: <87sf6mbj7b.fsf@vagabond.tim-landscheidt.de> References: <87zg0un1i9.fsf@vagabond.tim-landscheidt.de> <8334ym1yp0.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="28488"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) Cc: 66386@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Oct 07 16:28:54 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qp8IY-0007DX-P6 for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 07 Oct 2023 16:28:54 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qp8IP-0003N2-VE; Sat, 07 Oct 2023 10:28:46 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qp8IM-0003MZ-W0 for bug-gnu-emacs@gnu.org; Sat, 07 Oct 2023 10:28:43 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qp8IM-0002IG-Kc for bug-gnu-emacs@gnu.org; Sat, 07 Oct 2023 10:28:42 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qp8Ig-00050q-1G for bug-gnu-emacs@gnu.org; Sat, 07 Oct 2023 10:29:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Tim Landscheidt Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 07 Oct 2023 14:29:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 66386 X-GNU-PR-Package: emacs Original-Received: via spool by 66386-submit@debbugs.gnu.org id=B66386.169668893019249 (code B ref 66386); Sat, 07 Oct 2023 14:29:02 +0000 Original-Received: (at 66386) by debbugs.gnu.org; 7 Oct 2023 14:28:50 +0000 Original-Received: from localhost ([127.0.0.1]:55606 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qp8IU-00050O-1Q for submit@debbugs.gnu.org; Sat, 07 Oct 2023 10:28:50 -0400 Original-Received: from gavdos.tim-landscheidt.de ([2a01:4f8:1c0c:4bd6::1]:39808) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qp8IR-00050E-8l for 66386@debbugs.gnu.org; Sat, 07 Oct 2023 10:28:48 -0400 Original-Received: from port-62-145-29-194.static.as20676.net ([62.145.29.194]:39826 helo=vagabond) by gavdos.tim-landscheidt.de with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1qp8I5-0026Jb-2C; Sat, 07 Oct 2023 14:28:25 +0000 In-Reply-To: <8334ym1yp0.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 07 Oct 2023 14:03:55 +0300") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:272007 Archived-At: Eli Zaretskii wrote: >> When entering a number with read-number or skeleton-read or >> just editing text, it can be very useful to increase/de- >> crease the number at point. For Org, Emacs ships the func- >> tions org-increase-number-at-point and >> org-decrease-number-at-point for this purpose and binds them >> to C-M-S- and C-M-S-, respectively, in >> org-mode-map. >> It would be nice if these functions or some variant could be >> bound to global key bindings that are active by default in >> all modes. > These are trivial functions that everyone who needs them can easily > code, and bind to any keys they want. For example, I'd prefer to bind > them to S- and S- instead. Is it really > justified to have these in Emacs by default, let alone usurp some > global key bindings for them? Why not keep them available only in > modes where they are really needed? For me, part of the charm of Emacs is that some concepts are "universal". For example, forward-sexp (C-M-) will move forward one "balanced expression" in an Emacs Lisp buf- fer, and it will do so in a Python buffer as well. I do not have to learn different key bindings (or look them up) be- cause a "balanced expression" is something that exists in many/most modes. I probably would have missed that the Python mode had such a function if I had not known it from Emacs Lisp mode and just intuitively used it. I would neither have written and main- tained some code to add this functionality just for Python mode. The same reasoning applies to the concept of "numbers": They exist in many/most modes, writing personal code is a dupli- cation of effort, and I had never realized that org-mode provides such functions because I have never had the need to increase/decrease numbers in Org buffers, but instead at prompts and in (other) programming languages.