From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Hongyi Zhao 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 21:14:18 +0800 Message-ID: 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" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="37750"; mail-complaints-to="usenet@ciao.gmane.io" Cc: help-gnu-emacs To: =?UTF-8?Q?Andreas_R=C3=B6hler?= Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Thu Sep 23 15:16:10 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 1mTOaA-0009Xw-2L for geh-help-gnu-emacs@m.gmane-mx.org; Thu, 23 Sep 2021 15:16:10 +0200 Original-Received: from localhost ([::1]:60696 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mTOa8-00045h-ED for geh-help-gnu-emacs@m.gmane-mx.org; Thu, 23 Sep 2021 09:16:08 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:60966) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mTOYb-00043D-Kn for help-gnu-emacs@gnu.org; Thu, 23 Sep 2021 09:14:33 -0400 Original-Received: from mail-lf1-x12e.google.com ([2a00:1450:4864:20::12e]:43576) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mTOYZ-0005qq-So for help-gnu-emacs@gnu.org; Thu, 23 Sep 2021 09:14:33 -0400 Original-Received: by mail-lf1-x12e.google.com with SMTP id e15so26441170lfr.10 for ; Thu, 23 Sep 2021 06:14:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=gEosg0YdrqZKyFTOAA2wQrahcq98FnKEILgxkJBks20=; b=gIanQYYyzCvgXo3jV8QyXsRFhQRfvs9CS7wlG9sPbUi2QohaK3a4WQJPH/8Tc+K2/2 p3iSobYd944HvyyTMUckb92uqMAKqQW2ybOz/DR5ZAO3MPw75KRgKOB88z2NBrbq/XEw MUmE1JSJPieOvkRwVAktDxce4sk3xZGVhjTfowIcVTYxN19u+JDhsyxD4ruZmhQSa/3o pjtrM6jT0cqr5kga/cSqe9uxonjvH5bTVsdn5GflWYZFwQb0sk9b0but4gDiTaP0IKJz tFLTIkYtADFkG4+Rvy+S/7EUd22kFcj2yhZBmay7lPx1VV3yXgz/u+s6aEE57+qfK119 Qwwg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=gEosg0YdrqZKyFTOAA2wQrahcq98FnKEILgxkJBks20=; b=lt2dcL1Y0iBkDc3Xyt6YX579rTYXkIOeKXfm3kEfA//y6zFVsYfBZo3MRLzqY0HabZ dxwhAnYF+W/usaGFphzjbY4bs5wfnet6L1SGaeV1gQTXVQiALf13wTuQHi2ryNA7czSo egG7nx2JnqJh/1ZJrUStrhCAX7wAc1mFL5w6ZNtLotOks4UOyNTPTQdh05CmgDT70PiI 2qRWI+qEB5ZUODg2EIhWbo/JUaUi7JWkHk5RNGnDZakApgi4cXmxb5cktp1EIKvq8Z4Q J7MM47d6uOtZGhdKATvNIN1IBSpTWCNY/l9xTvJU2t1LNG+KsKYZf9a4L8rPvAUhlt4j lCtA== X-Gm-Message-State: AOAM530naF9QaczIPP8T7WgxUo6D0WCP9laO0wXHkDtBBpJErz7Y3fH+ YAWc/8NT33mRIh6b512kOFrs1STR5fEC+a0BKGE= X-Google-Smtp-Source: ABdhPJx9iTI0RSM1NMdMdTqDu+KmXYmIVrgMUa3zgJB3fszSV6iTVj7wuWzLEIQqCjFAtUCwNZkzjThU4gMKzqoO5Lc= X-Received: by 2002:a05:6512:33c3:: with SMTP id d3mr4143167lfg.194.1632402869484; Thu, 23 Sep 2021 06:14:29 -0700 (PDT) In-Reply-To: <6b520750-5c52-8749-b510-75e54d4b7fe6@easy-emacs.de> Received-SPF: pass client-ip=2a00:1450:4864:20::12e; envelope-from=hongyi.zhao@gmail.com; helo=mail-lf1-x12e.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-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:133184 Archived-At: On Thu, Sep 23, 2021 at 7:59 PM Andreas R=C3=B6hler wrote: > > On 23.09.21 11:58, Hongyi Zhao wrote: > > On Thu, Sep 23, 2021 at 4:38 PM Andreas R=C3=B6hler > > 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