unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: "Aaron S. Hawley" <aaron.s.hawley@gmail.com>
Cc: 13994@debbugs.gnu.org
Subject: bug#13994: End of buffer error for forward-sexp
Date: Wed, 24 Apr 2013 23:50:07 -0400	[thread overview]
Message-ID: <jwvsj2fmgbj.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <CAFw1JJ4tek5KXMPRC-ic4a=5f9+aGfoHH-LEdH2HUMhzK1OGDA@mail.gmail.com> (Aaron S. Hawley's message of "Wed, 24 Apr 2013 16:38:00 -0400")

>>> 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





  parent reply	other threads:[~2013-04-25  3:50 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-18 21:54 bug#13994: End of buffer error for forward-sexp Aaron S. Hawley
2013-03-31 13:36 ` Stefan Monnier
2013-04-24 20:38   ` Aaron S. Hawley
2013-04-24 21:22     ` Drew Adams
2013-04-24 21:35       ` Aaron S. Hawley
2013-04-25  3:50     ` Stefan Monnier [this message]
2013-04-29  7:10 ` Juri Linkov
2013-04-29 12:43 ` Andreas Röhler

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=jwvsj2fmgbj.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=13994@debbugs.gnu.org \
    --cc=aaron.s.hawley@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).