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

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

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

`M-x report-emacs-bug'

That's also for enhancement requests and suggestions.



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

* Re: re-search-forward in An Introduction to Programming in Emacs Lisp
  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
  1 sibling, 2 replies; 5+ messages in thread
From: Stefan Monnier via Users list for the GNU Emacs text editor @ 2024-03-26 13:56 UTC (permalink / raw)
  To: help-gnu-emacs

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

"An Introduction to Programming in Emacs Lisp" is an introduction.
Once you've read it and you actually write code, you're expected to
refer to the ELisp manual and the docstrings.


        Stefan




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

* Re: re-search-forward in An Introduction to Programming in Emacs Lisp
  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
  1 sibling, 0 replies; 5+ messages in thread
From: Heime @ 2024-03-26 14:03 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: help-gnu-emacs






Sent with Proton Mail secure email.

On Wednesday, March 27th, 2024 at 1:56 AM, Stefan Monnier via Users list for the GNU Emacs text editor <help-gnu-emacs@gnu.org> wrote:

> > This function is requently used for point movement, and "An
> > Introduction to Programming in Emacs Lisp" should mention this point
> > movement behavior.
> 
> "An Introduction to Programming in Emacs Lisp" is an introduction.
> Once you've read it and you actually write code, you're expected to
> refer to the ELisp manual and the docstrings.- Stefan

Moving from "Introduction to Programming" to "ELisp Reference Manual"
is a climb too steep.  Would help if there was an Abbreviated Guidebook
at an intermediate level.  Then the task of moving from the Abbreviated
Guidebook to the Reference Manual would be reasonable.




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

* Re: re-search-forward in An Introduction to Programming in Emacs Lisp
  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
  1 sibling, 0 replies; 5+ messages in thread
From: Toshi Umehara @ 2024-03-28 12:43 UTC (permalink / raw)
  To: Stefan Monnier, help-gnu-emacs

Ok, I will refer to Elisp manual and docstrings !
I've noticed there are many comments explaining related concepts 
and functionalities.

On Tue, Mar 26, 2024, at 10:56 PM, Stefan Monnier via Users list for the GNU Emacs text editor wrote:
>> This function is requently used for point movement, and "An
>> Introduction to Programming in Emacs Lisp" should mention this point
>> movement behavior.
>
> "An Introduction to Programming in Emacs Lisp" is an introduction.
> Once you've read it and you actually write code, you're expected to
> refer to the ELisp manual and the docstrings.
>
>
>         Stefan



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