unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* re-search-forward in An Introduction to Programming in Emacs Lisp
@ 2024-03-24  2:17 Toshi Umehara
  2024-03-26  1:46 ` [External] : " Drew Adams
  2024-03-26 13:56 ` Stefan Monnier via Users list for the GNU Emacs text editor
  0 siblings, 2 replies; 5+ messages in thread
From: Toshi Umehara @ 2024-03-24  2:17 UTC (permalink / raw)
  To: help-gnu-emacs


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)



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2024-03-28 12:43 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-24  2:17 re-search-forward in An Introduction to Programming in Emacs Lisp Toshi Umehara
2024-03-26  1:46 ` [External] : " 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

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