From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: David Kastrup Newsgroups: gmane.emacs.bugs Subject: bug#20307: 25.0.50; (regexp-opt nil ...) returns "" Date: Mon, 13 Apr 2015 17:34:34 +0200 Message-ID: <87iod0xcs5.fsf@fencepost.gnu.org> References: <876191vfou.fsf@fencepost.gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1428939330 1621 80.91.229.3 (13 Apr 2015 15:35:30 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 13 Apr 2015 15:35:30 +0000 (UTC) Cc: 20307@debbugs.gnu.org To: Artur Malabarba Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Apr 13 17:35:17 2015 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 1YhgOI-0005WX-16 for geb-bug-gnu-emacs@m.gmane.org; Mon, 13 Apr 2015 17:35:14 +0200 Original-Received: from localhost ([::1]:52379 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YhgOH-0000X0-EX for geb-bug-gnu-emacs@m.gmane.org; Mon, 13 Apr 2015 11:35:13 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:42111) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YhgOE-0000Wt-5M for bug-gnu-emacs@gnu.org; Mon, 13 Apr 2015 11:35:10 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YhgO6-0006TR-Ry for bug-gnu-emacs@gnu.org; Mon, 13 Apr 2015 11:35:10 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:37125) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YhgO6-0006Su-ON for bug-gnu-emacs@gnu.org; Mon, 13 Apr 2015 11:35:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1YhgO6-0005s7-4h for bug-gnu-emacs@gnu.org; Mon, 13 Apr 2015 11:35:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: David Kastrup Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 13 Apr 2015 15:35:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 20307 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 20307-submit@debbugs.gnu.org id=B20307.142893929122546 (code B ref 20307); Mon, 13 Apr 2015 15:35:02 +0000 Original-Received: (at 20307) by debbugs.gnu.org; 13 Apr 2015 15:34:51 +0000 Original-Received: from localhost ([127.0.0.1]:55134 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YhgNv-0005rZ-A2 for submit@debbugs.gnu.org; Mon, 13 Apr 2015 11:34:51 -0400 Original-Received: from fencepost.gnu.org ([208.118.235.10]:47027 ident=Debian-exim) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YhgNt-0005rS-SP for 20307@debbugs.gnu.org; Mon, 13 Apr 2015 11:34:50 -0400 Original-Received: from localhost ([127.0.0.1]:59513 helo=lola) by fencepost.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YhgNt-0004kg-47; Mon, 13 Apr 2015 11:34:49 -0400 Original-Received: by lola (Postfix, from userid 1000) id 3D321E05E3; Mon, 13 Apr 2015 17:34:34 +0200 (CEST) In-Reply-To: (Artur Malabarba's message of "Mon, 13 Apr 2015 15:08:25 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) 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:101482 Archived-At: Artur Malabarba writes: > 2015-04-12 10:50 GMT+01:00 David Kastrup >> Both >> >> M-: (regexp-opt nil) RET >> >> and >> >> M-: (regexp-opt nil t) RET >> >> return "". However, they should return a regexp matching nothing >> rather than everything, and the second invocation should also count as >> one () pairing. > > I agree there should be () on the second one, but I strongly disagree > they should match nothing. > > regexp-opt is NOT meant to match only the given strings. It is meant > to match anything containing the given strings. Well, and no string to match has been given. This is not (regexp-opt '("")) but rather (regexp-opt '()) > There is a very fundamental difference in that. The less strings you > pass to regexp-opt, the MORE things the regexp will match. Come again? > Why would we suddently flip that on its head when going from 1 to 0 > strings? (regexp-opt '("a" "b" "c")) -> "[abc]" (regexp-opt '("a" "b")) -> "[ab]" Quite literally (execute C-x C-e after the expressions above if you don't believe me). So how does "[ab]" match more than "[abc]" ? -- David Kastrup