From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Noam Postavsky Newsgroups: gmane.emacs.bugs Subject: bug#29821: Ensure quick substitution only occurs at start of line Date: Wed, 03 Jan 2018 22:10:56 -0500 Message-ID: <87a7xus4hr.fsf@users.sourceforge.net> References: <87fu8272h6.fsf@gmail.com> <87shbqto33.fsf@users.sourceforge.net> <87wp11rqtr.fsf@users.sourceforge.net> <871sj96lgu.fsf@gmail.com> <87tvw4syi9.fsf@users.sourceforge.net> <87wp105ezz.fsf@gmail.com> <87o9mbso9j.fsf@users.sourceforge.net> <87po6q5sns.fsf@gmail.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1515035453 17609 195.159.176.226 (4 Jan 2018 03:10:53 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 4 Jan 2018 03:10:53 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.90 (gnu/linux) Cc: 29821@debbugs.gnu.org, Andreas Schwab To: Jay Kamat Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Jan 04 04:10:48 2018 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eWvvZ-00045I-I3 for geb-bug-gnu-emacs@m.gmane.org; Thu, 04 Jan 2018 04:10:45 +0100 Original-Received: from localhost ([::1]:47067 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eWvxY-00034L-Hm for geb-bug-gnu-emacs@m.gmane.org; Wed, 03 Jan 2018 22:12:48 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:37133) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eWvws-0002kS-9e for bug-gnu-emacs@gnu.org; Wed, 03 Jan 2018 22:12:07 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eWvwo-0006eK-6p for bug-gnu-emacs@gnu.org; Wed, 03 Jan 2018 22:12:06 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:54444) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eWvwo-0006ds-3K for bug-gnu-emacs@gnu.org; Wed, 03 Jan 2018 22:12:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1eWvwn-00020W-Sb for bug-gnu-emacs@gnu.org; Wed, 03 Jan 2018 22:12:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Noam Postavsky Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 04 Jan 2018 03:12:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 29821 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 29821-submit@debbugs.gnu.org id=B29821.15150354687646 (code B ref 29821); Thu, 04 Jan 2018 03:12:01 +0000 Original-Received: (at 29821) by debbugs.gnu.org; 4 Jan 2018 03:11:08 +0000 Original-Received: from localhost ([127.0.0.1]:34892 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eWvvv-0001zG-TR for submit@debbugs.gnu.org; Wed, 03 Jan 2018 22:11:08 -0500 Original-Received: from mail-it0-f51.google.com ([209.85.214.51]:38643) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eWvvs-0001yd-6c for 29821@debbugs.gnu.org; Wed, 03 Jan 2018 22:11:04 -0500 Original-Received: by mail-it0-f51.google.com with SMTP id r6so800561itr.3 for <29821@debbugs.gnu.org>; Wed, 03 Jan 2018 19:11:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=kBlHL0RRY/VzWAmPDM2E9W6Almkgbr3EusthonUJHyI=; b=PVZjhpY928WovrKcMHdbTBgopiaF4k1+X46iwmefmIW/FNu3oDGK/XXM7vz589z5m3 JpmASZ8hKVQA5JEoTO+aWZ9+ynbeW6PkyazXBcSFdP+JyEkh4f7X8IQUr9HeDomHdDFz LzejVKVsvRRUsz4go8hEMajkZImyr6BxT7Ige+QuwhZG0oPomHSGo/QuFidxTJ86id5K /0OJ35KAxN1d0Cnc5sYOsTDH/G3bKmpNKD03rkCjMvTVXB7H9OLFl6MrLgTKmUYrJOBt cTYTttNWU5cMs4WvX/WhUh0QNQgtgQGmVo9Y7YgZHrzrRI79h/zKpJzjC4opGG3zKbX6 Wd9Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:references:date :in-reply-to:message-id:user-agent:mime-version; bh=kBlHL0RRY/VzWAmPDM2E9W6Almkgbr3EusthonUJHyI=; b=FRZtSkYc/IF5hXq+0EIkToJkwkUW+nUVd/+h/ZTiJropLDsZB49xCFSQscDryOOzMG TFDvICOUa6rk5ugTuoLrAuGX40G2EXCrm0JCYeTd1PzCWnEFCEkie2EpGth6h6ANlVGt VZQo6mRFP71Rfa7xHAO5wZmDJAreeLn9IGlWtNvF77yCxdRiJRMX8xCdFb5p/a1KdBo9 BvLKZnpo6W0yNhaRkL4OG523pnbeOAoikX1+5UotB86PkTcyBdC89Tbp4zlnzoJ4FH33 jwLCquCk2EwDNE49rcYqBSiGL9bdjuGAX8Obgc1Cx80mow63u/d+dv+rLpW5/LVmdfdv jJrg== X-Gm-Message-State: AKGB3mJRs9FSt6ZJh2Ux00pcDS68ir9IKPwefC7/auZzacBr0/3LOTpU Gcg9hE9+xhqdn4Yb+vVl1F4= X-Google-Smtp-Source: ACJfBotLIOqiLnHiaXgbR5rrL4r+eyBvUv+WP9edA3HXDUTgAsx+tKPZ0H237/sF8fFlbNMQ3TY0YQ== X-Received: by 10.36.86.10 with SMTP id o10mr4045903itb.86.1515035458685; Wed, 03 Jan 2018 19:10:58 -0800 (PST) Original-Received: from zebian ([45.2.119.34]) by smtp.googlemail.com with ESMTPSA id x97sm1407692ita.9.2018.01.03.19.10.57 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 03 Jan 2018 19:10:57 -0800 (PST) In-Reply-To: <87po6q5sns.fsf@gmail.com> (Jay Kamat's message of "Wed, 03 Jan 2018 17:17:27 -0800") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:141764 Archived-At: Jay Kamat writes: > Noam Postavsky writes: >> Oh, yes, I was confused by your docstring. By "if no match found" you >> meant when the line doesn't match ^foo^bar^ at all; I had somehow got >> the impression you meant that there was no match for "foo". > > Ah, yes, I'll try to make the docstring a bit more clear! Thanks, looks good now. > Here's a patch which tries to fix those issues. I almost regret to prolong this, but I found another mismatch with bash. It seems the quick substitution does not need to take up the entire line: ~/tmp$ echo foo bar foo bar ~/tmp$ ^foo^blah^ etc echo blah bar etc blah bar etc Whereas, with your patch: ~/src/emacs $ echo foo bar ("foo" "bar") ~/src/emacs $ ^foo^blah^ etc ^foo^blah^: command not found