GNU bug report logs -
#48294
Use 'with-current-buffer' byte-compiler warning seems wrong
Previous Next
Reported by: rswgnu <at> gmail.com
Date: Sat, 8 May 2021 20:15:01 UTC
Severity: normal
Tags: notabug
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
Full log
Message #18 received at 48294 <at> debbugs.gnu.org (full text, mbox):
> From: Robert Weiner <rsw <at> gnu.org>
> Date: Sun, 9 May 2021 11:57:25 -0400
> Cc: 48294 <at> debbugs.gnu.org
>
> Thanks for the feedback. Everything you wrote is very clear. The issue, however, is that I want to save
> point in the current buffer prior to switching context to the 'with-current-buffer' buffer, just as my
> (save-excursion (set-buffer ...)) code does. If I move the save-excursion into the with-current-buffer body,
> then it applies to the new buffer not the original one and if in that same body we change buffers again to the
> original and move point, then that movement will stay in place. So the question is, what is the appropriate
> code that the byte-compiler will accept when you want to save your original place before switching buffers.
I don't understand: with-current-buffer doesn't change point of the
original buffer, so why do you need to save it?
This bug report was last modified 4 years and 69 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.