add error handling to code that deletes the scratch buffer as it may not always be present and its a non-error

This commit is contained in:
KemoNine 2023-04-11 09:28:16 -04:00
parent a6eb011afd
commit 7aa4aa9ce6
1 changed files with 3 additions and 2 deletions

View File

@ -33,7 +33,7 @@
; start with fresh frame
(delete-other-windows)
(kmn/kill-other-buffers)
(kill-buffer (get-buffer "*scratch*"))
(ignore-errors (kill-buffer "*scratch*"))
; front load org-agenda so it doesnt reshuffle the frame layout on us
(org-agenda nil "r")
(split-window-below)
@ -57,6 +57,7 @@
; start with fresh frame
(delete-other-windows)
(kmn/kill-other-buffers)
(ignore-errors (kill-buffer "*scratch*"))
; Open main files used as 'gateway' to everything else
(find-file "~/org/health/health_houdini.org")
(find-file "~/org/health/health_mike.org")
@ -76,7 +77,7 @@
(interactive)
(delete-other-windows)
(kmn/kill-other-buffers)
(kill-buffer "*scratch*")
(ignore-errors (kill-buffer "*scratch*"))
(scratch 'text-mode)
; show dired at `~` in left side window
(kmn/dired-directory-on-left dir_path)