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 08:56:17 +0800 Message-ID: References: <878rzol51e.fsf@zoho.eu> <874kacjezi.fsf@zoho.eu> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="34193"; mail-complaints-to="usenet@ciao.gmane.io" To: Emanuel Berg , help-gnu-emacs Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Thu Sep 23 03:09:39 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 1mTDF4-0008e2-It for geh-help-gnu-emacs@m.gmane-mx.org; Thu, 23 Sep 2021 03:09:38 +0200 Original-Received: from localhost ([::1]:55132 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mTDF3-00053U-AI for geh-help-gnu-emacs@m.gmane-mx.org; Wed, 22 Sep 2021 21:09:37 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:56228) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mTD2R-0005gz-0o for help-gnu-emacs@gnu.org; Wed, 22 Sep 2021 20:56:36 -0400 Original-Received: from mail-lf1-x12f.google.com ([2a00:1450:4864:20::12f]:37739) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mTD2M-00027y-5j for help-gnu-emacs@gnu.org; Wed, 22 Sep 2021 20:56:34 -0400 Original-Received: by mail-lf1-x12f.google.com with SMTP id i4so19387041lfv.4 for ; Wed, 22 Sep 2021 17:56:29 -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; bh=l8ilsrTxosIIa80/5u42Q4T6p02N2avpiN3m+cn1yEE=; b=hE4F/7fEqyGTNvduIfVrydxqiZOQdRSpJSGUGNmdVRAvJ8mZzvLhJZMImwT7qUHy7X Aw0oN4/rMieohFOUQvF2RRLSTZAHcq6avNEwaB9vWv8w3BF1cQpfbOdI9MWCNdXWM+pv 3H0JBV3CSj8EMPeY6NUK8b+qPLpP+ZLd09upOX+4WLYepSG8EdfVTVAwlWpC4LFOONfD 1ySe8mKLWzAEGYYP36w76gi0tyHe6UL0j8qD/p89Qlw5PDQzhVj2mfnHDS+gH5EhiNuZ 8SKE5oPl3McSJEgbbguBDPkqhHxYiU8IfS/mjp53+zDapZPz7W8Q4U4E5jdJR6ZRAX6g Sqog== 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; bh=l8ilsrTxosIIa80/5u42Q4T6p02N2avpiN3m+cn1yEE=; b=TT5ILAoMNCZkDEot1Dsq8oc1EbtV03zx4qRUPAlG6QlQ5Q/exAVjsh6uqbziDaj532 Utwl21OHMx84fjqddBxPAc9yjwq/COg4xGvY94IDK27+Wyfjc1aSYvyX7j6Z8LtXE1G7 ozZf2dAYOEYQvJHA5z1tH429aTva6Mvkb8NHw3wawb9ZQRJ7/eT7qYReyVWpErzi+QR3 DkZmq44PTFq4erOO59+LudzfLbwwy83q4bIbMdM7x7DKhH81TxEirDVscvNHTjUAxzmi 2Qmc+4VAZxgzslqcb+H3cKLJWIBBYzRXU9vMuFNV8GEIeaPbgLfm4ZN0N9SbGcb+Yr0Q qm6g== X-Gm-Message-State: AOAM532V6OAnv4quYe6yXSV2nqKe3H0pQ3456hMyN0DQ/eFUFatfcXKJ JeACuYm5bdISJyofl7UbWgJwqYewLMNWlO5oOOfKLvcJROp65xP/ X-Google-Smtp-Source: ABdhPJyL49s5OsXxo7c9vebANyF9pDUYewkYihfRyYJGmwbU6q2hJ8OomRTSwd56jWaGUkZYuKffZqT4s0Iv3wDk6ms= X-Received: by 2002:a05:6512:3583:: with SMTP id m3mr1574439lfr.635.1632358588609; Wed, 22 Sep 2021 17:56:28 -0700 (PDT) In-Reply-To: <874kacjezi.fsf@zoho.eu> Received-SPF: pass client-ip=2a00:1450:4864:20::12f; envelope-from=hongyi.zhao@gmail.com; helo=mail-lf1-x12f.google.com X-Spam_score_int: -16 X-Spam_score: -1.7 X-Spam_bar: - X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, DKIM_INVALID=0.1, DKIM_SIGNED=0.1, FREEMAIL_FROM=0.001, 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-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:133161 Archived-At: On Thu, Sep 23, 2021 at 8:47 AM Emanuel Berg via Users list for the GNU Emacs text editor wrote: > > Hongyi Zhao wrote: > > > `M-:' the above code with your data in scratch gives me the > > following message in minibuffer: > > > > [Trailing garbage following expression] > > It is interactive so just do M-x ... > > (re-search-forward "[[:digit:]]\\{2\\}" nil t) Still no so clear what's your meaning. The function you defined above is named as `digits-sum' with an alias `di'. I can't see how this code has anything to do with the ones you posted previously. > Stick to the replace and match stuff when doing this as > otherwise it is easy to insert stuff and then get a hit on > that and so on ... > > -- > underground experts united > https://dataswamp.org/~incal > > HZ