From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Skip Montanaro Newsgroups: gmane.emacs.help Subject: Re: TIL about string-rectangle Date: Wed, 30 Dec 2020 17:24:25 -0600 Message-ID: References: <448d5e17-910f-4d32-b99c-96410c8e802e@default> 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="7591"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Help GNU Emacs To: Drew Adams Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Thu Dec 31 00:24:59 2020 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 1kukpv-0001s2-E3 for geh-help-gnu-emacs@m.gmane-mx.org; Thu, 31 Dec 2020 00:24:59 +0100 Original-Received: from localhost ([::1]:36948 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kukpu-0004P6-H1 for geh-help-gnu-emacs@m.gmane-mx.org; Wed, 30 Dec 2020 18:24:58 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:34874) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kukp7-00048H-Ju for help-gnu-emacs@gnu.org; Wed, 30 Dec 2020 18:24:09 -0500 Original-Received: from mail-yb1-xb2b.google.com ([2607:f8b0:4864:20::b2b]:43519) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kukp6-0007pV-89 for help-gnu-emacs@gnu.org; Wed, 30 Dec 2020 18:24:09 -0500 Original-Received: by mail-yb1-xb2b.google.com with SMTP id y128so16065586ybf.10 for ; Wed, 30 Dec 2020 15:24:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=W1HAQF96F8YP83BF91PfT32RR9vxsPiAhxwaQh9WSvg=; b=LeEJ/4CHYf2/y0czQeeQL9Lz55oYKsExuR20c2YTW4+4GTRFuxi2kAsi1auzdbNZ/f iz6UGp80w9f6qrXwu64BJxmflauhRqx54AOiIimo8HDZCVg8xPp14e4u1sg6OzT8GQUr aP9jW+i2P+5R/fABPZ30glqkYGUDCM0mg75BvKlGsq4LDtQh5j4+C2DOl3RL8RoVCjHl czHlLeS7dtVydB/itJHEj24qfCkmdudCBYfzKKt/2KlzrP7f0X28k9wHejhx9pSKiUYR YtLGLetJKUa3OmZg5O4mZjsfcGylxFFLkwUVUBvUPQoVWELdaMWlLJE4AdFIqHWe9b7u xWEw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=W1HAQF96F8YP83BF91PfT32RR9vxsPiAhxwaQh9WSvg=; b=Rut1HJtk1XapidSEOL8k0G2dYGuw7iVZ19Sr/cvF2k31UG70epFx31syI4nGKcAQOU gTFf/V1O9kh4mxbkXWZWXXwVrd/a4mYkHGDAVj/1gL7Evaw+eJr1+yLlJAZCIY/d5hWl zxT0OFKRPgypDp1Mt9TWSbrMNJO5JGHDATPiiYxrt9ufwP7VjZn5XvyqP9A1VcqynOLI dtm6RMZegNQ4UOf6Tcw62UbbifrSsAFCwJs3UMCFv7hZAGWQ027PjS7veq7AuiffZK3K rb6bKZSazOMmNjDmyudBwA0IGbwXpL1s0zIzXkhofjtrmKwAaL0nff4uSdQWht2JCWqO 3zjQ== X-Gm-Message-State: AOAM531ApcNkgSuYrNO9A1Cci98J51C6uT1jubwBfeJuNl5PMB+NVCQY 9Rc6/O6xNqtiW+tWCdh2IPsTMkINJCaDMR51AMag4Dw= X-Google-Smtp-Source: ABdhPJz5a5TLqT/QgA81ER74QCFhWojM/moqkfYy9PgOx4KHDZUHZe0sqGPMsT1AAzTEU8chctbYBfJt0unQfxq5lmo= X-Received: by 2002:a25:16c5:: with SMTP id 188mr79104136ybw.62.1609370647094; Wed, 30 Dec 2020 15:24:07 -0800 (PST) In-Reply-To: Received-SPF: pass client-ip=2607:f8b0:4864:20::b2b; envelope-from=skip.montanaro@gmail.com; helo=mail-yb1-xb2b.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:126930 Archived-At: > > Hmmm... That doesn't work for me. I've used rectangles a lot over the > > years and have never seen query-replace and friends be constrained by > > the currently defined rectangle. > > Are you sure? After you activate the (rectangular) > region, you may need to use `C-x C-x', so point is > before mark, because query-replacing moves forward > from point. I used query-replace which highlights what it will replace. When I saw it highlight strings outside the region, I thought, "Hmmm... That doesn't look right." I accepted one substitution, and it moved onto the next. It moved onto the next instance, which was outside the rectangle. > Works for me, with `emacs -Q' (no init file). Just tried with -Q. Same result. It highlighted and wanted to replace strings outside the defined rectangle. Not sure what's going on. Skip