summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
Diffstat (limited to 'modules')
-rw-r--r--modules/calendar-sync.el24
-rw-r--r--modules/system-utils.el2
2 files changed, 15 insertions, 11 deletions
diff --git a/modules/calendar-sync.el b/modules/calendar-sync.el
index 8b276333..dbea95c9 100644
--- a/modules/calendar-sync.el
+++ b/modules/calendar-sync.el
@@ -663,17 +663,19 @@ invoked when the fetch completes, either successfully or with an error."
:sentinel
(lambda (process event)
(when (memq (process-status process) '(exit signal))
- (with-current-buffer (process-buffer process)
- (let ((content
- (if (and (eq (process-status process) 'exit)
- (= (process-exit-status process) 0))
- (calendar-sync--normalize-line-endings (buffer-string))
- (setq calendar-sync--last-error
- (format "curl failed: %s" (string-trim event)))
- (cj/log-silently "calendar-sync: Fetch error: %s" calendar-sync--last-error)
- nil)))
- (kill-buffer (process-buffer process))
- (funcall callback content)))))))
+ (let ((buf (process-buffer process)))
+ (when (buffer-live-p buf)
+ (let ((content
+ (with-current-buffer buf
+ (if (and (eq (process-status process) 'exit)
+ (= (process-exit-status process) 0))
+ (calendar-sync--normalize-line-endings (buffer-string))
+ (setq calendar-sync--last-error
+ (format "curl failed: %s" (string-trim event)))
+ (cj/log-silently "calendar-sync: Fetch error: %s" calendar-sync--last-error)
+ nil))))
+ (kill-buffer buf)
+ (funcall callback content))))))))
(error
(setq calendar-sync--last-error (error-message-string err))
(cj/log-silently "calendar-sync: Fetch error: %s" calendar-sync--last-error)
diff --git a/modules/system-utils.el b/modules/system-utils.el
index 2ee7200c..f5af18de 100644
--- a/modules/system-utils.el
+++ b/modules/system-utils.el
@@ -207,6 +207,8 @@ Logs output and exit code to buffer *external-open.log*."
(use-package quick-sdcv
:bind
("C-h d" . quick-sdcv-search-input)
+ :bind (:map quick-sdcv-mode-map
+ ("q" . quit-window))
:custom
(quick-sdcv-dictionary-prefix-symbol "►")
(quick-sdcv-ellipsis " ▼"))