]> git.notmuchmail.org Git - notmuch/commitdiff
Merge branch 'release'
authorDavid Bremner <david@tethera.net>
Thu, 17 Nov 2016 12:25:08 +0000 (08:25 -0400)
committerDavid Bremner <david@tethera.net>
Thu, 17 Nov 2016 12:25:08 +0000 (08:25 -0400)
Updates for 0.23.2

1  2 
emacs/Makefile.local
emacs/notmuch-address.el
emacs/notmuch-company.el
emacs/notmuch-lib.el

diff --combined emacs/Makefile.local
index 6896ff90210202a429b48311f882186f157f5eb3,dfa7c1f11dcad859a7358fe6e3b049d53d880eb3..90a57cca74ed40e1f56d0b962531a6048b5c64cb
@@@ -3,6 -3,7 +3,7 @@@
  dir := emacs
  emacs_sources := \
        $(dir)/notmuch-lib.el \
+       $(dir)/notmuch-compat.el \
        $(dir)/notmuch-parser.el \
        $(dir)/notmuch.el \
        $(dir)/notmuch-query.el \
        $(dir)/notmuch-print.el \
        $(dir)/notmuch-version.el \
        $(dir)/notmuch-jump.el \
 -      $(dir)/notmuch-company.el
 +      $(dir)/notmuch-company.el \
 +      $(dir)/notmuch-draft.el
  
  $(dir)/notmuch-version.el: $(dir)/Makefile.local version.stamp
  $(dir)/notmuch-version.el: $(srcdir)/$(dir)/notmuch-version.el.tmpl
        @sed -e 's/%AG%/Generated file (from $(<F)) -- do not edit!/' \
             -e 's/%VERSION%/"$(VERSION)"/' $< > $@
  
+ $(dir)/notmuch-pkg.el: $(srcdir)/$(dir)/notmuch-pkg.el.tmpl
+       @sed -e 's/%AG%/Generated file (from $(<F)) -- do not edit!/' \
+            -e 's/%VERSION%/"$(ELPA_VERSION)"/' $< > $@
+ all: $(dir)/notmuch-pkg.el
+ install-emacs: $(dir)/notmuch-pkg.el
  
  emacs_images := \
        $(srcdir)/$(dir)/notmuch-logo.png
@@@ -85,4 -91,4 +92,4 @@@ endi
        mkdir -p "$(DESTDIR)$(emacsetcdir)"
        install -m0644 $(emacs_images) "$(DESTDIR)$(emacsetcdir)"
  
- CLEAN := $(CLEAN) $(emacs_bytecode) $(dir)/notmuch-version.el
+ CLEAN := $(CLEAN) $(emacs_bytecode) $(dir)/notmuch-version.el $(dir)/notmuch-pkg.el
diff --combined emacs/notmuch-address.el
index 5b2beefeb823c906280755ed4da121fe209969ee,34793dbec99e235ae863ae63dbc6d79881ce3efb..b3c56cfaad9dc212b990559171c1df2499b39722
@@@ -98,17 -98,6 +98,17 @@@ to know how address selection is made b
    :group 'notmuch-send
    :group 'notmuch-external)
  
 +(defcustom notmuch-address-post-completion-functions nil
 +  "Functions called after completing address.
 +
 +The completed address is passed as an argument to each function.
 +Note that this hook will be invoked for completion in headers
 +matching `notmuch-address-completion-headers-regexp'.
 +"
 +  :type 'hook
 +  :group 'notmuch-address
 +  :group 'notmuch-hooks)
 +
  (defun notmuch-address-selection-function (prompt collection initial-input)
    "Call (`completing-read'
        PROMPT COLLECTION nil nil INITIAL-INPUT 'notmuch-address-history)"
@@@ -147,11 -136,11 +147,11 @@@ toggles the setting in this buffer.
    (interactive)
    (if (local-variable-p 'notmuch-address-command)
        (kill-local-variable 'notmuch-address-command)
-     (setq-local notmuch-address-command 'internal))
+     (notmuch-setq-local notmuch-address-command 'internal))
    (if (boundp 'company-idle-delay)
        (if (local-variable-p 'company-idle-delay)
          (kill-local-variable 'company-idle-delay)
-       (setq-local company-idle-delay nil))))
+       (notmuch-setq-local company-idle-delay nil))))
  
  (defun notmuch-address-matching (substring)
    "Returns a list of completion candidates matching SUBSTRING.
@@@ -205,20 -194,12 +205,20 @@@ external commands.
                    (t
                     (funcall notmuch-address-selection-function
                              (format "Address (%s matches): " num-options)
 -                            (cdr options) (car options))))))
 +                            ;; We put the first match as the initial
 +                            ;; input; we put all the matches as
 +                            ;; possible completions, moving the
 +                            ;; first match to the end of the list
 +                            ;; makes cursor up/down in the list work
 +                            ;; better.
 +                            (append (cdr options) (list (car options)))
 +                            (car options))))))
        (if chosen
          (progn
            (push chosen notmuch-address-history)
            (delete-region beg end)
 -          (insert chosen))
 +          (insert chosen)
 +          (run-hook-with-args 'notmuch-address-post-completion-functions chosen))
        (message "No matches.")
        (ding))))
     (t nil)))
diff --combined emacs/notmuch-company.el
index b0f9782175a0c0d1c78c67045d0030785e8ab7a9,5d75c1455933e0548cb44fe47b26d718c4656a14..ebe2c0846e1b2108f520023e3198970d7e43410e
@@@ -28,6 -28,7 +28,7 @@@
  ;;; Code:
  
  (eval-when-compile (require 'cl))
+ (require 'notmuch-lib)
  
  (defvar notmuch-company-last-prefix nil)
  (make-variable-buffer-local 'notmuch-company-last-prefix)
@@@ -53,7 -54,7 +54,7 @@@
    ;; internal completion) can still be accessed via standard company
    ;; functions, e.g., company-complete.
    (unless (eq notmuch-address-command 'internal)
-     (setq-local company-idle-delay nil)))
+     (notmuch-setq-local company-idle-delay nil)))
  
  ;;;###autoload
  (defun notmuch-company (command &optional arg &rest _ignore)
@@@ -86,7 -87,6 +87,7 @@@
        (match (if (string-match notmuch-company-last-prefix arg)
                 (match-end 0)
               0))
 +      (post-completion (run-hook-with-args 'notmuch-address-post-completion-functions arg))
        (no-cache t))))
  
  
diff --combined emacs/notmuch-lib.el
index 1f0d1678466479d72cfb65532bb0b15149d0dde4,23bd81c1d0e7251d69506ea0564e5ab489b1c647..5dc6797068c876619bc36f57cd2ffa4c9ae5e9ab
@@@ -27,6 -27,7 +27,7 @@@
  (require 'mm-view)
  (require 'mm-decode)
  (require 'cl)
+ (require 'notmuch-compat)
  
  (unless (require 'notmuch-version nil t)
    (defconst notmuch-emacs-version "unknown"
  
  (custom-add-to-group 'notmuch-send 'message 'custom-group)
  
 +(defgroup notmuch-tag nil
 +  "Tags and tagging in Notmuch."
 +  :group 'notmuch)
 +
  (defgroup notmuch-crypto nil
    "Processing and display of cryptographic MIME parts."
    :group 'notmuch)
@@@ -151,7 -148,6 +152,7 @@@ For example, if you wanted to remove a
      (define-key map "z" 'notmuch-tree)
      (define-key map "m" 'notmuch-mua-new-mail)
      (define-key map "=" 'notmuch-refresh-this-buffer)
 +    (define-key map (kbd "M-=") 'notmuch-refresh-all-buffers)
      (define-key map "G" 'notmuch-poll-and-refresh-this-buffer)
      (define-key map "j" 'notmuch-jump-search)
      map)
@@@ -418,8 -414,10 +419,8 @@@ of its command symbol.
    "Refresh the current buffer."
    (interactive)
    (when notmuch-buffer-refresh-function
 -    (if (commandp notmuch-buffer-refresh-function)
 -      ;; Pass prefix argument, etc.
 -      (call-interactively notmuch-buffer-refresh-function)
 -      (funcall notmuch-buffer-refresh-function))))
 +    ;; Pass prefix argument, etc.
 +    (call-interactively notmuch-buffer-refresh-function)))
  
  (defun notmuch-poll-and-refresh-this-buffer ()
    "Invoke `notmuch-poll' to import mail, then refresh the current buffer."
    (notmuch-poll)
    (notmuch-refresh-this-buffer))
  
 +(defun notmuch-refresh-all-buffers ()
 +  "Invoke `notmuch-refresh-this-buffer' on all notmuch major-mode buffers.
 +
 +The buffers are silently refreshed, i.e. they are not forced to
 +be displayed."
 +  (interactive)
 +  (dolist (buffer (buffer-list))
 +    (let ((buffer-mode (buffer-local-value 'major-mode buffer)))
 +      (when (memq buffer-mode '(notmuch-show-mode
 +                              notmuch-tree-mode
 +                              notmuch-search-mode
 +                              notmuch-hello-mode))
 +      (with-current-buffer buffer
 +        (notmuch-refresh-this-buffer))))))
 +
  (defun notmuch-prettify-subject (subject)
    ;; This function is used by `notmuch-search-process-filter' which
    ;; requires that we not disrupt its' matching state.