GNU bug report logs - #35645
Fix icalendar--add-diary-entry/diary-make-entry interaction

Previous Next

Package: emacs;

Reported by: Thomas Fitzsimmons <fitzsim <at> fitzsim.org>

Date: Thu, 9 May 2019 03:33:01 UTC

Severity: normal

Done: Thomas Fitzsimmons <fitzsim <at> fitzsim.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Noam Postavsky <npostavs <at> gmail.com>
To: Thomas Fitzsimmons <fitzsim <at> fitzsim.org>
Cc: 35645 <at> debbugs.gnu.org
Subject: bug#35645: Fix icalendar--add-diary-entry/diary-make-entry interaction
Date: Mon, 13 May 2019 20:13:21 -0400
Thomas Fitzsimmons <fitzsim <at> fitzsim.org> writes:

> To keep the code mostly the same (so that I don't need to factor out
> another function), I've changed the original logic by adding a
> with-current-buffer wrapper, as shown in simplified form in
> diary-make-entry-with-current-buffer.patch.  I'm hoping this keeps the
> default diary-make-entry logic exactly the same, but I'd like
> confirmation from someone more familiar with the subtleties of window
> and buffer manipulation.

> -  (let ((pop-up-frames (or pop-up-frames (window-dedicated-p))))
> -    (find-file-other-window (or file diary-file)))
> +  (with-current-buffer
> +      (let ((pop-up-frames (or pop-up-frames (window-dedicated-p))))
> +        (find-file-other-window (or file diary-file)))

If you're asking whether

    (progn (find-file-other-window (or file diary-file))
      BODY)

is the same as

    (with-current-buffer (find-file-other-window (or file diary-file))
      BODY)

Then yes, I'd say you're fine (assuming BODY doesn't change buffers,
which I believe is the case here).





This bug report was last modified 6 years and 48 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.