this post was submitted on 22 Nov 2023
1 points (100.0% liked)

Emacs

313 readers
2 users here now

A community for the timeless and infinitely powerful editor. Want to see what Emacs is capable of?!

Get Emacs

Rules

  1. Posts should be emacs related
  2. Be kind please
  3. Yes, we already know: Google results for "emacs" and "vi" link to each other. We good.

Emacs Resources

Emacs Tutorials

Useful Emacs configuration files and distributions

Quick pain-saver tip

founded 1 year ago
MODERATORS
 

When debugging some code, I learned that if you call pop-to-buffer and pop-to-buffer-same-window inside save-excursion or save-current-buffer, the original buffer will not be restored at the end of the save-. You can get around this by using save-window-excursion; however, I still feel like save-excursion ought to work. Does anyone know why it doesn't?

(You can check this by eval-ing the following in any buffer other than *Messages*: (save-excursion (pop-to-buffer-same-window "*Messages*")).

no comments (yet)
sorted by: hot top controversial new old
there doesn't seem to be anything here