* fix some fallout from recent changes

This commit is contained in:
djcb 2012-06-10 11:33:31 +03:00
parent 20d858e464
commit fc03e613c5
4 changed files with 18 additions and 19 deletions

View File

@ -647,7 +647,7 @@ last query, sorting settings."
(optchar (or (nth 1 cell) (substring (nth 0 cell) 0 1))))
(setq global-mode-string
(concat
(propertize expr 'face 'mu4e-title-face)
(propertize mu4e~headers-last-query 'face 'mu4e-title-face)
"("
optchar
(if mu4e-headers-sort-revert "d" "a")

View File

@ -620,7 +620,7 @@ FUNC (if non-nil) afterwards."
(when mu4e-update-timer
(cancel-timer mu4e-update-timer)
(setq
mu4e-update-timer nil
mu4e-update-timer nil
mu4e~maildir-list nil))
(mu4e~proc-kill)
(kill-buffer))
@ -742,21 +742,21 @@ This includes expanding e.g. 3-5 into 3,4,5. If the letter
;; we have found a range A-B, which needs converting
;; into the numbers A, A+1, A+2, ... B.
(progn
(setq beg (string-to-int (match-string 1 elem))
end (string-to-int (match-string 2 elem)))
(setq beg (string-to-number (match-string 1 elem))
end (string-to-number (match-string 2 elem)))
(while (<= beg end)
(add-to-list 'list beg 'append)
(setq beg (1+ beg))))
;; else just a number
(add-to-list 'list (string-to-int elem) 'append)))
(add-to-list 'list (string-to-number elem) 'append)))
;; Check that all numbers are valid.
(mapc
'(lambda (x)
(cond
((> x n)
(error "Attachment %d bigger than maximum (%d)" x n))
((< x 1)
(error "Attachment number must be greater than 0 (%d)" x))))
#'(lambda (x)
(cond
((> x n)
(error "Attachment %d bigger than maximum (%d)" x n))
((< x 1)
(error "Attachment number must be greater than 0 (%d)" x))))
list)))

View File

@ -284,7 +284,7 @@ is nil, and otherwise open it."
(interactive)
(if is-open
(mu4e-view-open-attachment msg attachnum)
(mu4e-view-save-attachment msg attachnum)))))
(mu4e-view-save-attachment-single msg attachnum)))))
(defun mu4e~view-construct-attachments (msg)
"Display attachment information; the field looks like something like:
@ -769,7 +769,7 @@ all messages in the thread at point in the headers view."
(progn
(setq def (if (= count 1) "1" (format "1-%d" count)))
(read-string (mu4e-format "%s (default %s): " prompt def) nil nil def)))))
(defun mu4e~view-get-attach (msg attnum)
"Return the attachment plist in MSG corresponding to attachment
number ATTNUM."
@ -815,7 +815,8 @@ attachments, but as this is the default, you may not need it."
(let* ((msg (or msg (mu4e-message-at-point)))
(attachstr (mu4e~view-get-attach-num
"Attachment number range (or 'a' for 'all')" msg t))
(attachnums (mu4e-split-ranges-to-numbers attachstr count)))
(count (hash-table-count mu4e~view-attach-map))
(attachnums (mu4e-split-ranges-to-numbers attachstr count)))
(dolist (num attachnums)
(mu4e-view-save-attachment-single msg num))))

View File

@ -28,6 +28,7 @@
;;; Code:
(require 'org)
(eval-when-compile (require 'org-exp))
(eval-when-compile (require 'cl))
(eval-when-compile (require 'mu4e))
@ -192,14 +193,12 @@ rich-text version of the what is assumed to be an org-mode body."
"Execute keysequence KEYSEQ by (temporarily) switching to compose
mode."
(mu4e-compose-mode)
(setq org-mu4e-compose-org-mode t)
(add-hook 'post-command-hook 'org~mu4e-mime-switch-headers-or-body t t)
(let ((func (lookup-key (current-local-map) key)))
(let ((func (lookup-key (current-local-map) keyseq)))
(unless (functionp func)
(error "Invalid key binding"))
(add-hook 'message-send-hook 'org~mu4e-mime-convert-to-html-maybe t t)
(funcall func)))
(funcall func)))
(defun org~mu4e-mime-switch-headers-or-body ()
"Switch the buffer to either mu4e-compose-mode (when in headers)
@ -258,7 +257,6 @@ or org-mode (when in the body),"
(progn ;; otherwise, remove crap
(remove-hook 'post-command-hook 'org~mu4e-mime-switch-headers-or-body t)
(org~mu4e-mime-undecorate-headers) ;; shut off org-mode stuff
(setq org-mu4e-compose-org-mode nil)
(mu4e-compose-mode)
(message "org-mu4e-compose-org-mode disabled"))))