From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Sending multiple patches Date: Tue, 03 Jun 2014 09:25:08 -0400 Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1401801945 24766 80.91.229.3 (3 Jun 2014 13:25:45 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 3 Jun 2014 13:25:45 +0000 (UTC) Cc: emacs-devel@gnu.org To: Michal Nazarewicz Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Jun 03 15:25:38 2014 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1WroiY-00020k-Et for ged-emacs-devel@m.gmane.org; Tue, 03 Jun 2014 15:25:30 +0200 Original-Received: from localhost ([::1]:53208 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WroiY-0004xA-0z for ged-emacs-devel@m.gmane.org; Tue, 03 Jun 2014 09:25:30 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:42840) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WroiM-0004jc-7c for emacs-devel@gnu.org; Tue, 03 Jun 2014 09:25:26 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WroiD-0008LN-RA for emacs-devel@gnu.org; Tue, 03 Jun 2014 09:25:18 -0400 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.181]:50072) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WroiD-0008LH-NY for emacs-devel@gnu.org; Tue, 03 Jun 2014 09:25:09 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ArcGAIDvNVPO+IOj/2dsb2JhbABZgwaDSlK/a4EXF3SCJQEBAQECASMzIwULCw4MAhgOAgIUGA0kiAQIrxuifheBKYgjhHszB4JvgUkEqRmBaoNMIQ X-IPAS-Result: ArcGAIDvNVPO+IOj/2dsb2JhbABZgwaDSlK/a4EXF3SCJQEBAQECASMzIwULCw4MAhgOAgIUGA0kiAQIrxuifheBKYgjhHszB4JvgUkEqRmBaoNMIQ X-IronPort-AV: E=Sophos;i="4.97,753,1389762000"; d="scan'208";a="65559600" Original-Received: from 206-248-131-163.dsl.teksavvy.com (HELO pastel.home) ([206.248.131.163]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 03 Jun 2014 09:25:08 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id AA3F060343; Tue, 3 Jun 2014 09:25:08 -0400 (EDT) In-Reply-To: (Michal Nazarewicz's message of "Tue, 03 Jun 2014 08:28:13 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 206.248.154.181 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 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.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:172289 Archived-At: > Unfortunately that is not the case. For example, imagine a hypothetical ^^^^^^^^^^^^ As you say, it's hypothetical. AFAICT, there's currently no actual use of regular expressions in the "end pattern", so we very much can regexp-quote the whole thing (or alternatively search it via search-forward instead of re-search-forward). If/when a need for something more flexible comes up, we can allow the use of "a function returning a regexp" or maybe even better "a function that jumps to the end" instead of a string. > Do you think that adding Perl's \Q=E2=80=A6\E support to `replace-match' = would > make sense? No. This would naturally lead to adding support for other operations than regexp-quote, and then you end up quoting chunks of code inside strings which is not only ugly but can't be macroexpanded, can't refer to lexical-scoped vars, can't be byte-compiled, ... If useful, we could extend replace-match such that NEWTEXT can be a function instead of a string. That should be easy and clean. Stefan