unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Toshi Umehara <toshi@niceume.com>
To: help-gnu-emacs@gnu.org
Subject: re-search-forward in An Introduction to Programming in Emacs Lisp
Date: Sun, 24 Mar 2024 11:17:04 +0900	[thread overview]
Message-ID: <87sf0g74rj.fsf@niceume.com> (raw)


Hello

I have noticed re-search-forward function explanation in "An
Introduction to Programming in Emacs Lisp" does not precisely mention
the movement of point when its third argument is not specified nil or t,
but is specified another value such as 'move [1]. The introduction just
says " If the search is successful, it leaves point immediately after
the last character in the target.", which is true when the third agument
is nil or t.

"Emacs Lisp" manual explains its third argument about cases where it is
nil, t or anything else [2]. When it's specified as anything else, it
explains "Move point to limit (or the end of the accessible portion of
the buffer) and return nil." Therefore, when the third argument is
specified as 'move, even if the search fails and returns nil, the point
moves.

This function is requently used for point movement, and "An Introduction
to Programming in Emacs Lisp" should mention this point movement
behavior.

I could not find where to report this proposal about "An
Introduction to Programming in Emacs Lisp". Does someone have any idea
how to propose modification to the introduction?

Thanks

Reference
[1] https://www.gnu.org/software/emacs/manual/html_node/eintr/re_002dsearch_002dforward.html
[2] https://www.gnu.org/software/emacs/manual/html_node/elisp/Regexp-Search.html

-- 
Toshi (Toshihiro Umehara)



             reply	other threads:[~2024-03-24  2:17 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-24  2:17 Toshi Umehara [this message]
2024-03-26  1:46 ` [External] : re-search-forward in An Introduction to Programming in Emacs Lisp Drew Adams
2024-03-26 13:56 ` Stefan Monnier via Users list for the GNU Emacs text editor
2024-03-26 14:03   ` Heime
2024-03-28 12:43   ` Toshi Umehara

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=87sf0g74rj.fsf@niceume.com \
    --to=toshi@niceume.com \
    --cc=help-gnu-emacs@gnu.org \
    /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.
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).