From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#13994: End of buffer error for forward-sexp Date: Wed, 24 Apr 2013 23:50:07 -0400 Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1366861867 10008 80.91.229.3 (25 Apr 2013 03:51:07 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 25 Apr 2013 03:51:07 +0000 (UTC) Cc: 13994@debbugs.gnu.org To: "Aaron S. Hawley" Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Apr 25 05:51:11 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 1UVDDB-0008Gn-K6 for geb-bug-gnu-emacs@m.gmane.org; Thu, 25 Apr 2013 05:51:09 +0200 Original-Received: from localhost ([::1]:60430 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UVDDB-0006fq-B3 for geb-bug-gnu-emacs@m.gmane.org; Wed, 24 Apr 2013 23:51:09 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:51876) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UVDD4-0006fT-1g for bug-gnu-emacs@gnu.org; Wed, 24 Apr 2013 23:51:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UVDCz-0007fC-EF for bug-gnu-emacs@gnu.org; Wed, 24 Apr 2013 23:51:01 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:37913) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UVDCz-0007f3-9m for bug-gnu-emacs@gnu.org; Wed, 24 Apr 2013 23:50:57 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1UVDHu-0001XU-8i for bug-gnu-emacs@gnu.org; Wed, 24 Apr 2013 23:56:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 25 Apr 2013 03:56:02 +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.13668621175752 (code B ref 13994); Thu, 25 Apr 2013 03:56:02 +0000 Original-Received: (at 13994) by debbugs.gnu.org; 25 Apr 2013 03:55:17 +0000 Original-Received: from localhost ([127.0.0.1]:42022 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UVDHA-0001Uh-KQ for submit@debbugs.gnu.org; Wed, 24 Apr 2013 23:55:16 -0400 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.182]:40727) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UVDH8-0001UT-Dl for 13994@debbugs.gnu.org; Wed, 24 Apr 2013 23:55:14 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av4EABK/CFFFpYYW/2dsb2JhbABEvw4Xc4IeAQEEAVYWCgMQCzQSFBgNJIgeBsEtkQoDklqSIIFegxM X-IPAS-Result: Av4EABK/CFFFpYYW/2dsb2JhbABEvw4Xc4IeAQEEAVYWCgMQCzQSFBgNJIgeBsEtkQoDklqSIIFegxM X-IronPort-AV: E=Sophos;i="4.84,565,1355115600"; d="scan'208";a="8242656" Original-Received: from 69-165-134-22.dsl.teksavvy.com (HELO ceviche.home) ([69.165.134.22]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 24 Apr 2013 23:50:04 -0400 Original-Received: by ceviche.home (Postfix, from userid 20848) id B68D8660E8; Wed, 24 Apr 2013 23:50:07 -0400 (EDT) In-Reply-To: (Aaron S. Hawley's message of "Wed, 24 Apr 2013 16:38:00 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) 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:73661 Archived-At: >>> I would like C-M-f (`forward-sexp') to signal an error when reaching >>> the beginning or end of a buffer. >> That would make sense, indeed, but I'm afraid there's a fair bit of code >> out there that needs the current behavior. > 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. Thoughts in random order: - the gain is not very large, so the pain needs to be very low. - forward-sexp is used at many places in many different circumstances, so it's difficult to find risky cases. - I do agree that it is very likely that many/most uses of forward-sexp wouldn't suffer. - Even if few problematic cases are out there (or out here in Emacs itself), it may take a very long time (read: not before an actual release) to find some of them. - your patch only affects behavior at BOB/EOB, whereas I think it would make more sense to do the same for "before the first non-whitespace" and "after the last non-whitespace". And comments should be considered whitespace in this respect (at least when parse-sexp-ignore-comments is non-nil). Of course, fixing this might introduce more problematic cases. Stefan