From: Francois Fleuret Date: Tue, 10 Mar 2015 10:22:56 +0000 (+0100) Subject: Update. X-Git-Url: https://fleuret.org/cgi-bin/gitweb/gitweb.cgi?a=commitdiff_plain;h=c67534a5a850001dab0a8978801837d1d7dccf48;p=elisp.git Update. --- diff --git a/emacs.el b/emacs.el index 77626cf..3071b3e 100644 --- a/emacs.el +++ b/emacs.el @@ -710,7 +710,8 @@ occurrences " ps-header-line-pad 0.3 ps-header-font-family 'Courier ps-header-title-font-size '(8.5 . 10) - ps-header-font-size '(6 . 7) + ;; ps-header-font-size '(6 . 7) + ps-header-font-size '(10 . 12) ps-font-size '(7 . 8) ) @@ -1240,15 +1241,18 @@ ff/known-address-face is used." "The face to display the dates in the modeline.") (defun ff/secure-note-add () (interactive) - (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) + (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) + ) ;; Colorizes the dates @@ -2510,7 +2514,10 @@ with a time tag, and save this file" (error "No file attached to this buffer"))) (defun ff/insert-date () (interactive) - (insert (format-time-string "\n * %Y %b %d %H:%M:%S\n\n" (current-time))) + ;; (insert (format-time-string "\n * %Y %b %d %H:%M:%S\n\n" (current-time))) + ;; (insert (format-time-string "%Y %b %d %H:%M:%S" (current-time))) + ;; (insert (format-time-string "%d.%m.%y" (current-time))) + (insert (format-time-string "%d.%m.%Y" (current-time))) ) (define-key ff/map [(control g)] 'ff/git-status)