]> git.cworth.org Git - notmuch/commitdiff
emacs/show: fix for text/calendar display
authorDavid Bremner <david@tethera.net>
Wed, 29 May 2024 10:15:26 +0000 (07:15 -0300)
committerDavid Bremner <david@tethera.net>
Sat, 15 Jun 2024 17:40:01 +0000 (14:40 -0300)
In certain scenarios involving symlinks and setting
find-file-visit-truename, text/calendar parts were not displayed
properly.

Following a suggestion of Al Haji-Ali [1], replace the use of
get-file-buffer with find-buffer-visiting.

[1]: id:m2wmneguh8.fsf@gmail.com

emacs/notmuch-show.el
test/T450-emacs-show.sh

index 4c0ad74d5043cefcefaa86ab65313660dade6884..14e3c698693e1c1954a5f3682532083e05ab5150 100644 (file)
@@ -864,7 +864,7 @@ will return nil if the CID is unknown or cannot be retrieved."
                    (unless (icalendar-import-buffer file t)
                      (error "Icalendar import error. %s"
                             "See *icalendar-errors* for more information"))
-                   (set-buffer (get-file-buffer file))
+                   (set-buffer (find-buffer-visiting file))
                    (setq result (buffer-substring (point-min) (point-max)))
                    (set-buffer-modified-p nil)
                    (kill-buffer (current-buffer)))
index 027062cdc64ad5cd0cac411022aa9a3b1dc73346..7c6a946acd2498ab0032be997810f78793401fa1 100755 (executable)
@@ -341,7 +341,6 @@ EOF
 test_expect_equal_file EXPECTED OUTPUT
 
 test_begin_subtest "display of text/calendar, symlinked tmpdir"
-test_subtest_known_broken
 mkdir real-tmp
 ln -s real-tmp tmp
 test_emacs "(let ((notmuch-show-all-multipart/alternative-parts t)