diff options
author | Thomas Fitzsimmons <fitzsim@fitzsim.org> | 2019-06-07 20:43:38 -0400 |
---|---|---|
committer | Thomas Fitzsimmons <fitzsim@fitzsim.org> | 2019-06-07 21:26:21 -0400 |
commit | 890a0826f3f68f4476f6ec0b56fe96c6bc047142 (patch) | |
tree | a393fefd6000b0d63467c22e66382735bf0b1b61 /lisp/calendar/icalendar.el | |
parent | 58cde923414bbc313677116684505b961477c057 (diff) | |
download | emacs-890a0826f3f68f4476f6ec0b56fe96c6bc047142.tar.gz |
Make icalendar-import-buffer not show diary file buffer
* lisp/calendar/diary-lib.el (diary-make-entry): Add
omit-trailing-space parameter. Add do-not-show parameter to
allow not showing diary file buffer.
* lisp/calendar/icalendar.el (icalendar--add-diary-entry): Remove
workaround to omit trailing space in diary entry. Have
diary-make-entry not display the diary file buffer. (Bug#35645)
Diffstat (limited to 'lisp/calendar/icalendar.el')
-rw-r--r-- | lisp/calendar/icalendar.el | 18 |
1 files changed, 4 insertions, 14 deletions
diff --git a/lisp/calendar/icalendar.el b/lisp/calendar/icalendar.el index a8fd765129e..17316ddbbd0 100644 --- a/lisp/calendar/icalendar.el +++ b/lisp/calendar/icalendar.el @@ -2502,20 +2502,10 @@ the entry." (when summary (setq non-marking (y-or-n-p (format "Make appointment non-marking? ")))) - (save-window-excursion - (unless diary-filename - (setq diary-filename - (read-file-name "Add appointment to this diary file: "))) - ;; Note: diary-make-entry will add a trailing blank char.... :( - (funcall (if (fboundp 'diary-make-entry) - 'diary-make-entry - 'make-diary-entry) - string non-marking diary-filename))) - ;; Würgaround to remove the trailing blank char - (with-current-buffer (find-file diary-filename) - (goto-char (point-max)) - (if (= (char-before) ? ) - (delete-char -1))) + (unless diary-filename + (setq diary-filename + (read-file-name "Add appointment to this diary file: "))) + (diary-make-entry string non-marking diary-filename t t)) ;; return diary-filename in case it has been changed interactively diary-filename) |