all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#30001: 27.0.50; Outdated info on save-excursion in (info "(cl) Modify Macros")
@ 2018-01-06  5:29 Xu Chunyang
  2018-01-06  9:10 ` Eli Zaretskii
  0 siblings, 1 reply; 5+ messages in thread
From: Xu Chunyang @ 2018-01-06  5:29 UTC (permalink / raw)
  To: 30001

'C-h S cl-letf' or (info "(cl) Modify Macros") has the following:

  Note that `cl-letf' on `(point)' is not quite like a
  `save-excursion', as the latter effectively saves a marker which
  tracks insertions and deletions in the buffer.

but 'save-excursion' is no longer saving marker since Emacs 25.1
according to 'C-h f save-excursion'.





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

* bug#30001: 27.0.50; Outdated info on save-excursion in (info "(cl) Modify Macros")
  2018-01-06  5:29 bug#30001: 27.0.50; Outdated info on save-excursion in (info "(cl) Modify Macros") Xu Chunyang
@ 2018-01-06  9:10 ` Eli Zaretskii
  2018-01-06 12:12   ` Stephen Berman
       [not found]   ` <m2efn3xj73.fsf@xuchunyang.me>
  0 siblings, 2 replies; 5+ messages in thread
From: Eli Zaretskii @ 2018-01-06  9:10 UTC (permalink / raw)
  To: Xu Chunyang; +Cc: 30001

> From: Xu Chunyang <mail@xuchunyang.me>
> Date: Sat, 06 Jan 2018 13:29:57 +0800
> 
> 'C-h S cl-letf' or (info "(cl) Modify Macros") has the following:
> 
>   Note that `cl-letf' on `(point)' is not quite like a
>   `save-excursion', as the latter effectively saves a marker which
>   tracks insertions and deletions in the buffer.
> 
> but 'save-excursion' is no longer saving marker since Emacs 25.1
> according to 'C-h f save-excursion'.

save-excursion doesn't save the _mark_, but it still saves a _marker_
that tracks point, as opposed to just the value of point at the moment
of the call.

Do you have a practical use case where the documentation is incorrect?

Thanks.





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

* bug#30001: 27.0.50; Outdated info on save-excursion in (info "(cl) Modify Macros")
  2018-01-06  9:10 ` Eli Zaretskii
@ 2018-01-06 12:12   ` Stephen Berman
  2018-01-06 15:15     ` Eli Zaretskii
       [not found]   ` <m2efn3xj73.fsf@xuchunyang.me>
  1 sibling, 1 reply; 5+ messages in thread
From: Stephen Berman @ 2018-01-06 12:12 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: Xu Chunyang, 30001

On Sat, 06 Jan 2018 11:10:00 +0200 Eli Zaretskii <eliz@gnu.org> wrote:

>> From: Xu Chunyang <mail@xuchunyang.me>
>> Date: Sat, 06 Jan 2018 13:29:57 +0800
>> 
>> 'C-h S cl-letf' or (info "(cl) Modify Macros") has the following:
>> 
>>   Note that `cl-letf' on `(point)' is not quite like a
>>   `save-excursion', as the latter effectively saves a marker which
>>   tracks insertions and deletions in the buffer.
>> 
>> but 'save-excursion' is no longer saving marker since Emacs 25.1
>> according to 'C-h f save-excursion'.
>
> save-excursion doesn't save the _mark_, but it still saves a _marker_
> that tracks point, as opposed to just the value of point at the moment
> of the call.

It looks like the doc string of save-excursion contains a few typos:

  Before Emacs 25.1, ‘save-excursion’ used to save the mark state.
  To save the marker state as well as the point and buffer, use
              ^^^^^^                  ^^^           ^^^^^^
  ‘save-mark-and-excursion’.

Shouldn't that be: "To save the mark state as well as point and the
buffer"?

Steve Berman





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

* bug#30001: 27.0.50; Outdated info on save-excursion in (info "(cl) Modify Macros")
  2018-01-06 12:12   ` Stephen Berman
@ 2018-01-06 15:15     ` Eli Zaretskii
  0 siblings, 0 replies; 5+ messages in thread
From: Eli Zaretskii @ 2018-01-06 15:15 UTC (permalink / raw)
  To: Stephen Berman; +Cc: mail, 30001

> From: Stephen Berman <stephen.berman@gmx.net>
> Cc: Xu Chunyang <mail@xuchunyang.me>,  30001@debbugs.gnu.org
> Date: Sat, 06 Jan 2018 13:12:37 +0100
> 
>   Before Emacs 25.1, ‘save-excursion’ used to save the mark state.
>   To save the marker state as well as the point and buffer, use
>               ^^^^^^                  ^^^           ^^^^^^
>   ‘save-mark-and-excursion’.
> 
> Shouldn't that be: "To save the mark state as well as point and the
> buffer"?

Of course.  Thanks, fixed.





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

* bug#30001: 27.0.50; Outdated info on save-excursion in (info "(cl) Modify Macros")
       [not found]   ` <m2efn3xj73.fsf@xuchunyang.me>
@ 2018-01-06 15:16     ` Eli Zaretskii
  0 siblings, 0 replies; 5+ messages in thread
From: Eli Zaretskii @ 2018-01-06 15:16 UTC (permalink / raw)
  To: Xu Chunyang; +Cc: 30001-done

> From: Xu Chunyang <mail@xuchunyang.me>
> Date: Sat, 06 Jan 2018 20:31:12 +0800
> 
> > save-excursion doesn't save the _mark_, but it still saves a _marker_
> > that tracks point, as opposed to just the value of point at the moment
> > of the call.
> 
> I see. Please close the bug report since it is simply my
> misunderstanding. Thanks.

Done.





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

end of thread, other threads:[~2018-01-06 15:16 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-01-06  5:29 bug#30001: 27.0.50; Outdated info on save-excursion in (info "(cl) Modify Macros") Xu Chunyang
2018-01-06  9:10 ` Eli Zaretskii
2018-01-06 12:12   ` Stephen Berman
2018-01-06 15:15     ` Eli Zaretskii
     [not found]   ` <m2efn3xj73.fsf@xuchunyang.me>
2018-01-06 15:16     ` Eli Zaretskii

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.