GNU bug report logs - #48294
Use 'with-current-buffer' byte-compiler warning seems wrong

Previous Next

Package: emacs;

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: Eli Zaretskii <eliz <at> gnu.org>
To: rswgnu <at> gmail.com
Cc: 48294 <at> debbugs.gnu.org
Subject: Re: bug#48294: Use 'with-current-buffer' byte-compiler warning seems
 wrong
Date: Sun, 09 May 2021 19:11:13 +0300
> 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.