From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Yuri Khan Newsgroups: gmane.emacs.devel Subject: Re: Curious: Why is there no binding for replace-string "out of the box"? Date: Thu, 7 Mar 2024 13:17:42 +0700 Message-ID: References: <87frx36myt.fsf@igel.home> 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="37922"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Andreas Schwab , emacs-devel@gnu.org To: "T.V Raman" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Mar 07 07:18:41 2024 Return-path: Envelope-to: ged-emacs-devel@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 1ri75V-0009iE-N6 for ged-emacs-devel@m.gmane-mx.org; Thu, 07 Mar 2024 07:18:41 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ri74y-0004XJ-LI; Thu, 07 Mar 2024 01:18:08 -0500 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 1ri74n-0004VF-CS for emacs-devel@gnu.org; Thu, 07 Mar 2024 01:17:58 -0500 Original-Received: from mail-ua1-x92f.google.com ([2607:f8b0:4864:20::92f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ri74l-000370-5w for emacs-devel@gnu.org; Thu, 07 Mar 2024 01:17:56 -0500 Original-Received: by mail-ua1-x92f.google.com with SMTP id a1e0cc1a2514c-7db1a21e83fso287508241.2 for ; Wed, 06 Mar 2024 22:17:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1709792274; x=1710397074; darn=gnu.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=bL5nNm+1HRvzaIJdZBL80Vrbc8XB8Ke7IavZuXT3+8w=; b=leHyOe3wld7QKB4aJ2E6CPek1tSpKLpmLHVXiolgtLH7GZTwPNwYlJCRH4aeZcI2sZ FoBnRlMnoR/7RrMbMxt6+TQa7nfKxFndKYJS1e/Td5kTM5Q+rBsy8kHmBRkDQksBqCC0 JNZfaWXnyfAbnAM0x6XwQYRPFrQuklW9rHhKCnKAuJ5fLFxghLseSyObeti43v7E7AhV 4KLY2EUII10zcJYrD4ji5qBU3KNSTDQN+PH70MZt04tcyHt8FbOaO1B0UuxgU4B3lAIu skGUy17nSmF/U7GSFPVFXFgnv2AUAyqUPGO7Vdr3X94m7xmJHAg06BGPPfXLyI6y/asq Q3Mw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709792274; x=1710397074; h=content-transfer-encoding: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=bL5nNm+1HRvzaIJdZBL80Vrbc8XB8Ke7IavZuXT3+8w=; b=jkgwGvGSvEEAeEAOGmv0qEzFQj6Z7FbVbVAjzQWW/jolu84daymCgBclvl/tL5+aOO rFVr8h6DKZCcJ9gZ3KHS5/w7RW6mVRoxnfG9FG7YznABJm5zsgSrJsBNA4fG1YBHte03 zWfw+RbEI2S71ZYOZCFQZ73+9jHCpPilm8ClCoAddm3Lcys/1xOJknRbsuJY5lXc6mzs TDVRP5vc9DJg+2n9XYM608MIxQVIGfblbiiJNBaWM5iSEKffKfvh4PM9TSX480305b/U YAIIz6byFA23nnaRkLtztoS5SSxo/cQCmboZrVfTnvhantbzXHyy33inZ2oJ0OY2Mch9 EdHw== X-Forwarded-Encrypted: i=1; AJvYcCUHXAeR9dVMMsrQfXiYXeBLVyq2tM/byeGUwomBoxah4SS9N3Ykusa5Zd7n47rB5n/vAcE027XYQVTBLd+bnKDcFcxT X-Gm-Message-State: AOJu0Yx7yfvpmehI1Lyt5UOeHOKE2W4Uf6S8nuPBOH2xky9lV9kbEV4B eXUN3fKicR47vl2uEe0+5Db0WqeJo4C7+UZsUO0aIFqFAfhLvWLppaQkc/k5lk8isDez7A+GDKK tLEr3H0bRaY3hPP+e3cI7FHMAaY8= X-Google-Smtp-Source: AGHT+IHu82sE4F1iREyT/QPGT5Ar7uhZTTRLKxS5ekDx5/Z1KbFqz+n+oBrUD6jpiualnmbu5aIxU7H/dCwV2YTpiyk= X-Received: by 2002:a05:6102:162c:b0:472:ee80:60d7 with SMTP id cu44-20020a056102162c00b00472ee8060d7mr4988613vsb.34.1709792273664; Wed, 06 Mar 2024 22:17:53 -0800 (PST) In-Reply-To: Received-SPF: pass client-ip=2607:f8b0:4864:20::92f; envelope-from=yurivkhan@gmail.com; helo=mail-ua1-x92f.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, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:316873 Archived-At: On Thu, 7 Mar 2024 at 09:16, T.V Raman wrote: > > Andreas Schwab writes: > > more importantly replace-string is not bound. That is what I was trying t= o say The user-facing difference between replace-string and query-replace is that the former replaces unconditionally while the latter asks for confirmation (with a possibility to type =E2=80=98!=E2=80=99 to confirm rep= lacement for all remaining occurrences). Similarly, replace-regexp vs query-replace-regexp. Both confirming commands are bound by default: query-replace to M-%, query-replace-regexp to C-M-%. Replacing without confirmation could be seen as an advanced feature =E2=80= =94 if you are already comfortable with undo, you=E2=80=99re ready to use it; i= f not, it=E2=80=99s scary.