From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: =?UTF-8?Q?Andreas_R=c3=b6hler?= Newsgroups: gmane.emacs.help Subject: Re: Emacs: adding 1 to every number made of 2 digits inside a marked region. Date: Thu, 23 Sep 2021 15:51:41 +0200 Message-ID: <731d3686-848a-be2a-0688-88014ba9363f@easy-emacs.de> References: <0e97aad3-ca78-8a5a-2ecf-2e4f5205477d@easy-emacs.de> <6b520750-5c52-8749-b510-75e54d4b7fe6@easy-emacs.de> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="27116"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux i686; rv:78.0) Gecko/20100101 Thunderbird/78.14.0 Cc: help-gnu-emacs To: Hongyi Zhao Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Thu Sep 23 15:52:46 2021 Return-path: Envelope-to: geh-help-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 1mTP9a-0006oH-9j for geh-help-gnu-emacs@m.gmane-mx.org; Thu, 23 Sep 2021 15:52:46 +0200 Original-Received: from localhost ([::1]:57012 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mTP9Z-0006la-8T for geh-help-gnu-emacs@m.gmane-mx.org; Thu, 23 Sep 2021 09:52:45 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:42576) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mTP8d-0006Zg-Sp for help-gnu-emacs@gnu.org; Thu, 23 Sep 2021 09:51:47 -0400 Original-Received: from mout.kundenserver.de ([212.227.126.134]:49753) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mTP8a-0000KV-UK for help-gnu-emacs@gnu.org; Thu, 23 Sep 2021 09:51:47 -0400 Original-Received: from [192.168.178.63] ([94.134.177.121]) by mrelayeu.kundenserver.de (mreue011 [212.227.15.167]) with ESMTPSA (Nemesis) id 1Mg6Na-1n48Om25ZW-00heIz; Thu, 23 Sep 2021 15:51:42 +0200 In-Reply-To: Content-Language: en-US X-Provags-ID: V03:K1:8XcRi39eQTli1bxTq2ixpq22kT1sTR3Z0Zx7T/21BxXKlN9/Z9k fGDHXeLKV+Jbk2U9VnKcB6NFxaUGJOZ3O/GnPPAs+gqFDzdYMTuvnVhPRaA4SdxYsnyZ/Ft 1cS7m14yFAuc6ZHmx5CkTmkn9H73FFl2az1BGHKSMzdz9bjiznY/5KLwr4RYMg3hnalnHXs NRD9CiYZ6b4UpDxL+lNKw== X-UI-Out-Filterresults: notjunk:1;V03:K0:HHMVnIGn/Rc=:U/C6v46vhudEsyC9hys62l HU3Ydr+x6N3SrTaEx2q7cvAseupwh3HHSPuGdiPzi7hr2rD/0O0KOxN6sxhBM72vuHmI6mQGT owM3i1RpFpyo1Evb9yR2CSTTMXsluaE4AbrV0WdzPntP5H6+SXNU+ohVgOOIo8Nv4wDzAnbzL Z13Uoi1HIVjFUE84oIC4VnNt+166qtL8rJyPe+xxENGXSsrx3fFaM46ZeMy7X5rK7RrPeYpDc KvMwOEvInsqNRzQEi8n94A0s8O6WNB8jxGzScPkguTAYw62e/ExKBU7VUXQYhM+kGhByC+P8e MRqi5ozvSP6ycGwAnvbxdER0PRvgmBd8ogElUnG5G30frl7TI+Zr/MGfsjtChylExi1/2fdLO Apl9iYJ+3gJA+DsYRb4Yija0ewRepHoyxR+u5LTiAmLn4zQRef2N2oAr7ZZ4wKBspKNFyiZve I+ZfJTXhe4Zkg7GeFwz76H64UDrhBTyq0rCnPsHyZpz8QON8M+vupPuFOInDtUl53j2zP0inx 5hv4d5hHUGCemTFlooOv43ARVHsJQBa4Gmp/ZV3gkUkDS3Ho0rdjruLLDeiFkg055e1b3i+Sm RJXuPUN7+7TizVCeYstR+9bYaN5PCZW8Fdq176cO6/yrNV0ZgE5UtCGbTAXnbJcFpq0uRIfb/ wpekyPvt2KALBOEsfZEbkMiz46VNV6MLjv95fHKgqhFqhOIu+42vJI3tySAa1oIHKKS3ck3ks SLt5IuwsUxn7MFHrsSNBK3mVNqVPhwVat6267ry7IBnyiX8UR67SXPW0/iA= Received-SPF: none client-ip=212.227.126.134; envelope-from=andreas.roehler@easy-emacs.de; helo=mout.kundenserver.de X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, NICE_REPLY_A=-0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:133186 Archived-At: On 23.09.21 15:14, Hongyi Zhao wrote: > On Thu, Sep 23, 2021 at 7:59 PM Andreas Röhler > wrote: >> On 23.09.21 11:58, Hongyi Zhao wrote: >>> On Thu, Sep 23, 2021 at 4:38 PM Andreas Röhler >>> wrote: >>>> https://github.com/andreas-roehler/numbers-at-point >>>> >>>> comes with >>>> >>>> ar-raise-in-region-maybe >>>> >>>> which should do the trick. >>> It really does the trick with the following configuration: >>> >>> (use-package thingatpt-utils-core >>> :straight (:host github :type git :repo "andreas-roehler/numbers-at-point") >>> :config >>> (load "numbers-at-point.el" nil t t)) >>> >>> But how to increase/decrease in steps that are not equal to 1? >>> >>> HZ >> >> It takes a numerical argument for higher steps the common way: >> >> M-[STEP] ar-raise-in-region-maybe RET > It should be used as follows: First select/mark the data region and > place the point at the end of it, then perform the following > operation: > > M-[STEP] M-x ar-raise-in-region-maybe RET, > > e.g., use 2 as the step, > > M-2 M-x ar-raise-in-region-maybe RET > > Best regards, HZ Hmm, in fact current behavior doesn't care if at the beginning or the end of a region.