- ;; Adds a new entry (i.e. date and a bunch of empty lines)
-
- (goto-char (point-min))
- (insert "-- "
- (format-time-string "%Y %b %d %H:%M:%S" (current-time))
- " --\n\n")
- (previous-line 1)
+ (unless
+ (let ((b (find-buffer-visiting ff/secure-note-file)))
+ (and b (switch-to-buffer b)))
+ (find-file ff/secure-note-file)
+ ;; Adds a new entry (i.e. date and a bunch of empty lines)
+ (goto-char (point-min))
+ (insert "-- "
+ (format-time-string "%Y %b %d %H:%M:%S" (current-time))
+ " --\n\n")
+ (previous-line 1)
+ )