From 643ce61c1babf6e73ca7e03fb907282e7ee3b176 Mon Sep 17 00:00:00 2001 From: Pieter Praet Date: Mon, 16 Jan 2012 11:38:33 +0100 Subject: emacs: logically group def{custom,face}s To allow for expansion whilst keeping everything tidy and organized, move all defcustom/defface variables to the following subgroups, defined in notmuch-lib.el: - Hello - Search - Show - Send - Crypto - Hooks - External Commands - Appearance As an added benefit, defcustom keyword args are now consistently ordered as they appear @ defcustom's docstring (OCD much?). Proper defgroup docstrings and various other improvements by courtesy of Austin Clements. --- emacs/notmuch-maildir-fcc.el | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'emacs/notmuch-maildir-fcc.el') diff --git a/emacs/notmuch-maildir-fcc.el b/emacs/notmuch-maildir-fcc.el index 6fbf82d..dcfbc4b 100644 --- a/emacs/notmuch-maildir-fcc.el +++ b/emacs/notmuch-maildir-fcc.el @@ -51,13 +51,13 @@ the database.path option in the notmuch configuration file). You will be prompted to create the directory if it does not exist yet when sending a mail." - :require 'notmuch-fcc-initialization - :group 'notmuch :type '(choice (const :tag "No FCC header" nil) (string :tag "A single folder") (repeat :tag "A folder based on the From header" - (cons regexp (string :tag "Folder"))))) + (cons regexp (string :tag "Folder")))) + :require 'notmuch-fcc-initialization + :group 'notmuch-send) (defun notmuch-fcc-initialization () "If notmuch-fcc-directories is set, -- cgit v1.2.3 From d094153a264a69bc560366198a0febfa96c1ceb5 Mon Sep 17 00:00:00 2001 From: Jesse Rosenthal Date: Thu, 14 Jun 2012 13:16:03 -0400 Subject: emacs: derive correct timestamp in FCC unique name Previously, the timestamp at the beginning of the FCC unique maildir name was derived incorrectly, thanks to an integer overflow. This changes the derivation of timestamp to use a float, and so will get the number correct at least until 2038. (It is still formatted with "%d" so it will show up as an integer.) Should we need to change it in the next 26 years to take the unix millenium into account, it will be invisible to users. This change is mostly a question of consistency, since the unique name is arbitrary anyway. But since most people use timestamps, and that was the original intention here as well, we might as well. Signed-off-by: Jesse Rosenthal --- emacs/notmuch-maildir-fcc.el | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'emacs/notmuch-maildir-fcc.el') diff --git a/emacs/notmuch-maildir-fcc.el b/emacs/notmuch-maildir-fcc.el index dcfbc4b..07eedba 100644 --- a/emacs/notmuch-maildir-fcc.el +++ b/emacs/notmuch-maildir-fcc.el @@ -140,13 +140,12 @@ will NOT be removed or replaced." t)) (defun notmuch-maildir-fcc-make-uniq-maildir-id () - (let* ((ct (current-time)) - (timeid (+ (* (car ct) 65536) (cadr ct))) - (microseconds (car (cdr (cdr ct)))) + (let* ((ftime (float-time)) + (microseconds (mod (* 1000000 ftime) 1000000)) (hostname (notmuch-maildir-fcc-host-fixer system-name))) (setq notmuch-maildir-fcc-count (+ notmuch-maildir-fcc-count 1)) (format "%d.%d_%d_%d.%s" - timeid + ftime (emacs-pid) microseconds notmuch-maildir-fcc-count -- cgit v1.2.3