aboutsummaryrefslogtreecommitdiff
path: root/emacs
diff options
context:
space:
mode:
authorYuchen Pei <id@ypei.org>2023-11-05 01:22:45 +1100
committerYuchen Pei <id@ypei.org>2023-11-05 01:22:45 +1100
commitbb5b46deff62f7f110684766642ada311db626f4 (patch)
tree51ecd8af02ae7ead19d6496feda834f56a3fc0be /emacs
parente3202fe6fef0c59efa34594b22d0cde95998394f (diff)
[emacs] Reset buffer in mastorg-open
Diffstat (limited to 'emacs')
-rw-r--r--emacs/.emacs.d/lisp/my/mastorg.el8
1 files changed, 5 insertions, 3 deletions
diff --git a/emacs/.emacs.d/lisp/my/mastorg.el b/emacs/.emacs.d/lisp/my/mastorg.el
index 61bc027..3544b2e 100644
--- a/emacs/.emacs.d/lisp/my/mastorg.el
+++ b/emacs/.emacs.d/lisp/my/mastorg.el
@@ -196,9 +196,11 @@ Including ancestors and descendants, if any."
Including the context, i.e. ancestors and descendant toots."
(interactive "sToot URL: ")
(with-current-buffer (get-buffer-create mastorg-buffer)
- (insert (mastorg-format-toot-tree url))
- (org-mode)
- (goto-char (point-min)))
+ (let ((inhibit-read-only t))
+ (erase-buffer)
+ (insert (mastorg-format-toot-tree url))
+ (org-mode)
+ (goto-char (point-min))))
(switch-to-buffer mastorg-buffer))
(provide 'mastorg)