From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Bastien Newsgroups: gmane.emacs.devel Subject: Re: Why (substring "abc" 0 4) does not return "abc" instead of an error? Date: Mon, 16 Jul 2012 18:46:46 +0200 Organization: GNU Message-ID: <87hat7bqmh.fsf@gnu.org> References: <87fw8smxag.fsf@gnu.org> <877gu4mv85.fsf@gnu.org> <871ukcmb47.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: dough.gmane.org 1342457187 2398 80.91.229.3 (16 Jul 2012 16:46:27 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 16 Jul 2012 16:46:27 +0000 (UTC) Cc: Juanma Barranquero , emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Jul 16 18:46:27 2012 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 1SqoRG-0002Rc-8A for ged-emacs-devel@m.gmane.org; Mon, 16 Jul 2012 18:46:26 +0200 Original-Received: from localhost ([::1]:54565 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SqoRF-0005IN-K7 for ged-emacs-devel@m.gmane.org; Mon, 16 Jul 2012 12:46:25 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:60605) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SqoRC-0005I7-8c for emacs-devel@gnu.org; Mon, 16 Jul 2012 12:46:23 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SqoR6-0002rt-Cp for emacs-devel@gnu.org; Mon, 16 Jul 2012 12:46:22 -0400 Original-Received: from mail-we0-f169.google.com ([74.125.82.169]:35952) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SqoR5-0002rf-O1 for emacs-devel@gnu.org; Mon, 16 Jul 2012 12:46:15 -0400 Original-Received: by weys10 with SMTP id s10so3483602wey.0 for ; Mon, 16 Jul 2012 09:46:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20120113; h=sender:from:to:cc:subject:in-reply-to:organization:references :user-agent:date:message-id:mime-version:content-type :content-transfer-encoding; bh=cfp72Et1B425cP7P5q5ZYx1kZ79/saCTQMrkZZ/l0Zo=; b=en6T7F56b8ZICItXK4jHKtMF+WuvaR9TjVL/mhsQsaQ9muC2OdsbOrH5Hr4zZMKRUc rLaDIgrYGGkmD4eJiZHqz3oA657rA2EYfBH9wlWO7UQ3yH8QVo5r9o+Yy9MXSAtsMpbo dIi4Slk3z5Z2xA9m+OL0wbsBz02f+nu6Yycz112SWbe74Nd2Blv3kE36Fvo6NuohwPt/ i3wgehR/8YRv3N0VUH4lY8gxRhc53EQ/S07nMmgw/G9+ywMESIwYsAGbJAqNXfkbZF+m gQaT0pIrDF8WT6/CJxQaqTDE7HJDfR5LeWVVHxwvOYKhwRxQkw1kNGJiqiGHwfRnuSNu xAWw== Original-Received: by 10.216.3.85 with SMTP id 63mr496953weg.134.1342457174610; Mon, 16 Jul 2012 09:46:14 -0700 (PDT) Original-Received: from myhost.localdomain (mar75-2-81-56-68-112.fbx.proxad.net. [81.56.68.112]) by mx.google.com with ESMTPS id fb20sm32911443wid.1.2012.07.16.09.46.12 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 16 Jul 2012 09:46:13 -0700 (PDT) Original-Received: by myhost.localdomain (Postfix, from userid 1000) id EE7D68207; Mon, 16 Jul 2012 18:46:46 +0200 (CEST) In-Reply-To: (Stefan Monnier's message of "Mon, 16 Jul 2012 12:15:22 -0400") User-Agent: Gnus/5.130006 (Ma Gnus v0.6) Emacs/24.1.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 74.125.82.169 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:151680 Archived-At: Stefan Monnier writes: > We have general functionality when you want to ignore some errors, such > as condition-case. Also, I'm fine with (substring "abc" -1 1) => #ERROR so using ̀€condition-case' would not help me distinguish between the case above and (substring "abc" 0 4), which is what I want. I see the benefit of having (substring "abc" 0 4) => "abc" in terms of simplifying Elisp writing -- and I still fail to see the harm (but maybe Pascal will tell me where he has been bitten by this.) -- Bastien