From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.bugs Subject: bug#13994: End of buffer error for forward-sexp Date: Wed, 24 Apr 2013 14:22:45 -0700 Message-ID: <60DF8CA8098A46B1A6B5F6E815AC8CE4@us.oracle.com> References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1366838592 25876 80.91.229.3 (24 Apr 2013 21:23:12 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 24 Apr 2013 21:23:12 +0000 (UTC) Cc: 13994@debbugs.gnu.org To: "'Aaron S. Hawley'" , "'Stefan Monnier'" Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Apr 24 23:23:16 2013 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 1UV79m-0002KN-V4 for geb-bug-gnu-emacs@m.gmane.org; Wed, 24 Apr 2013 23:23:15 +0200 Original-Received: from localhost ([::1]:53471 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UV79m-0003ko-GB for geb-bug-gnu-emacs@m.gmane.org; Wed, 24 Apr 2013 17:23:14 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:55910) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UV79d-0003jn-TY for bug-gnu-emacs@gnu.org; Wed, 24 Apr 2013 17:23:10 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UV79W-0008GM-A1 for bug-gnu-emacs@gnu.org; Wed, 24 Apr 2013 17:23:05 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:37541) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UV79W-0008GI-6c for bug-gnu-emacs@gnu.org; Wed, 24 Apr 2013 17:22:58 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1UV7EP-00045q-U7 for bug-gnu-emacs@gnu.org; Wed, 24 Apr 2013 17:28:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: "Drew Adams" Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 24 Apr 2013 21:28:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 13994 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 13994-submit@debbugs.gnu.org id=B13994.136683887915726 (code B ref 13994); Wed, 24 Apr 2013 21:28:01 +0000 Original-Received: (at 13994) by debbugs.gnu.org; 24 Apr 2013 21:27:59 +0000 Original-Received: from localhost ([127.0.0.1]:41650 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UV7EN-00045b-80 for submit@debbugs.gnu.org; Wed, 24 Apr 2013 17:27:59 -0400 Original-Received: from userp1040.oracle.com ([156.151.31.81]:31312) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UV7EJ-00045M-2K for 13994@debbugs.gnu.org; Wed, 24 Apr 2013 17:27:57 -0400 Original-Received: from acsinet21.oracle.com (acsinet21.oracle.com [141.146.126.237]) by userp1040.oracle.com (Sentrion-MTA-4.3.1/Sentrion-MTA-4.3.1) with ESMTP id r3OLMlTN025822 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL); Wed, 24 Apr 2013 21:22:48 GMT Original-Received: from aserz7022.oracle.com (aserz7022.oracle.com [141.146.126.231]) by acsinet21.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id r3OLMl8D017449 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL); Wed, 24 Apr 2013 21:22:47 GMT Original-Received: from abhmt112.oracle.com (abhmt112.oracle.com [141.146.116.64]) by aserz7022.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id r3OLMl1C015453; Wed, 24 Apr 2013 21:22:47 GMT Original-Received: from dradamslap1 (/130.35.178.8) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Wed, 24 Apr 2013 14:22:46 -0700 X-Mailer: Microsoft Office Outlook 11 In-Reply-To: Thread-Index: Ac5BK9HTE+r7EevbShOooO5RDeJ7mAAA8/lw X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 X-Source-IP: acsinet21.oracle.com [141.146.126.237] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.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:73655 Archived-At: > I by no means use all of Emacs, but haven't run into an issue yet with > my patch. I use Emacs with t-d-o-e on. Pretty small sample. > Do you have an example of code that you've seen "needs the current > behavior" at the beginning or end of the buffer.... > > So far, I've looked at these functions in Emacs to see if > they still work. > > end-of-sexp > beginning-of-sexp > thing-at-point-bounds-of-list-at-point > sort-numeric-fields > transpose-sexps > blink-matching-open > diary-list-sexp-entries > diary-mark-sexp-entries > comint-extract-string Pretty small sample. There must be thousands of uses of `forward-sexp' in existing Emacs-Lisp code out there. How many of them depend (intentionally or not) on `forward-sexp' returning nil for premature `eobp'? Who knows. Now everytime some code does (when (looking-at "\"") (forward-sexp 1)) or whatever it will need to be fixed to wrap it in `ignore-errors' or otherwise treat the `eobp' case? Doesn't sound like a sound approach at this point. Might have been a reasonable suggestion 30 years ago. What's the point? If you have some code that needs to raise an error when `forward-sexp' reaches eob, that's easy enough to do, no? Not to mention that the code for `forward-sexp' explicitly takes point to eob when `scan-sexps' returns nil. IOW, that behavior is presumably by design. And not to mention that it calls `forward-sexp-function', if non-nil, to do everything, in which case (depending on where you would place your call to `error') you might be changing the meaning/behavior for its code as well, if it reaches eob.