From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: immerrr again Newsgroups: gmane.emacs.bugs Subject: bug#17862: 24.3; regexp-opt docstring is incorrect Date: Tue, 1 Jul 2014 11:15:56 +0400 Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: ger.gmane.org 1404199043 17506 80.91.229.3 (1 Jul 2014 07:17:23 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 1 Jul 2014 07:17:23 +0000 (UTC) To: 17862@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Jul 01 09:17:16 2014 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1X1sJY-0001JB-22 for geb-bug-gnu-emacs@m.gmane.org; Tue, 01 Jul 2014 09:17:16 +0200 Original-Received: from localhost ([::1]:38897 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X1sJX-00028F-IU for geb-bug-gnu-emacs@m.gmane.org; Tue, 01 Jul 2014 03:17:15 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:53810) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X1sJP-00026F-Ti for bug-gnu-emacs@gnu.org; Tue, 01 Jul 2014 03:17:12 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X1sJK-0002Nx-Ut for bug-gnu-emacs@gnu.org; Tue, 01 Jul 2014 03:17:07 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:47436) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X1sJK-0002Nn-Qk for bug-gnu-emacs@gnu.org; Tue, 01 Jul 2014 03:17:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1X1sJK-00029e-9s for bug-gnu-emacs@gnu.org; Tue, 01 Jul 2014 03:17:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: immerrr again Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 01 Jul 2014 07:17:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 17862 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 17862-submit@debbugs.gnu.org id=B17862.14041989658195 (code B ref 17862); Tue, 01 Jul 2014 07:17:02 +0000 Original-Received: (at 17862) by debbugs.gnu.org; 1 Jul 2014 07:16:05 +0000 Original-Received: from localhost ([127.0.0.1]:38583 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1X1sIO-000287-H3 for submit@debbugs.gnu.org; Tue, 01 Jul 2014 03:16:04 -0400 Original-Received: from mail-qg0-f50.google.com ([209.85.192.50]:42071) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1X1sIM-00027X-0J for 17862@debbugs.gnu.org; Tue, 01 Jul 2014 03:16:03 -0400 Original-Received: by mail-qg0-f50.google.com with SMTP id j5so2929356qga.37 for <17862@debbugs.gnu.org>; Tue, 01 Jul 2014 00:15:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=BN1b+3V/Uw/79nD6lo4x+UWCMt31N5V8sN2XHh39a5A=; b=qAPaFjWIuE2ACDSljezDtYbXRVyRqUEvY5aFvEGDELEAnTvhHkuyBiJkykSOpyAZak LaKbRbekVbu7JRu6Cx91Ayw527mhQQGGkLamlBt6EZHzJIZSixUnCi1SgqtbohasyhXv BCOoI97REo+tqwwrkPyp+lKkFURE1rK4GdvCJEdOtu+VhVcZRH7tQl4Y6Iuul3uL5FNe 5q90R+5yBR2FEHbbkEf1FHkoUZdKocikj16++UyrtNR/pltLNOslSRptmEa4+GJPiLrP qi7uwIxGaQtTU9eqZh3anwZZExVC409/z8K4PlEKmG7xyyQBUllQIuK092mKbAiVfi71 a3hA== X-Received: by 10.140.42.11 with SMTP id b11mr15735945qga.109.1404198956566; Tue, 01 Jul 2014 00:15:56 -0700 (PDT) Original-Received: by 10.140.51.240 with HTTP; Tue, 1 Jul 2014 00:15:56 -0700 (PDT) In-Reply-To: X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.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-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:91037 Archived-At: On Mon, Jun 30, 2014 at 5:37 PM, Stefan Monnier wrote: > > > It makes the semantics of regexp-opt much simpler/cleaner since the > caller doesn't need to worry about the fact that the returned regexp > might need to be surrounded by additional grouping in order for things > like (concat (regexp-opt ..) "[ \t]+" ...) to work as intended. > > A few redundant shy-group wrappers are a very small price to pay for > that, I think. We could arrange to provide some way to avoid this > wrapper, I guess. > > > Stefan Sure, I'm all for reducing the number ways to shoot yourself in the foot and I agree that not grouping by default is more error-prone. I was rather surprised to find the fix effectively disabling the power-user feature completely instead of changing the default behaviour (and frustrated a bit about the docstring becoming explicitly misguiding). Cheers, immerrr PS. My apologies, I've sent this message directly to Stefan, this is to leave it in the tracker for reference. On Mon, Jun 30, 2014 at 5:37 PM, Stefan Monnier wrote: >> I'd argue that this sole change requires me to special-case (or ..) form >> of rx macro for one arguments to avoid the unnecessary shy-grouping >> there, but the message of said commit contains no information about the >> background of that change, so it's hard to say if its benefits overweigh >> the inconveniences. > > It makes the semantics of regexp-opt much simpler/cleaner since the > caller doesn't need to worry about the fact that the returned regexp > might need to be surrounded by additional grouping in order for things > like (concat (regexp-opt ..) "[ \t]+" ...) to work as intended. > > A few redundant shy-group wrappers are a very small price to pay for > that, I think. We could arrange to provide some way to avoid this > wrapper, I guess. > > > Stefan