* 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)))) (optchar (or (nth 1 cell) (substring (nth 0 cell) 0 1))))
(setq global-mode-string (setq global-mode-string
(concat (concat
(propertize expr 'face 'mu4e-title-face) (propertize mu4e~headers-last-query 'face 'mu4e-title-face)
"(" "("
optchar optchar
(if mu4e-headers-sort-revert "d" "a") (if mu4e-headers-sort-revert "d" "a")

View File

@ -742,16 +742,16 @@ This includes expanding e.g. 3-5 into 3,4,5. If the letter
(if (string-match "\\([0-9]+\\)-\\([0-9]+\\)" elem) (if (string-match "\\([0-9]+\\)-\\([0-9]+\\)" elem)
;; we have found a range A-B, which needs converting ;; we have found a range A-B, which needs converting
;; into the numbers A, A+1, A+2, ... B. ;; into the numbers A, A+1, A+2, ... B.
(progn (progn
(setq beg (string-to-int (match-string 1 elem)) (setq beg (string-to-number (match-string 1 elem))
end (string-to-number (match-string 2 elem))) end (string-to-number (match-string 2 elem)))
(while (<= beg end) (while (<= beg end)
(add-to-list 'list beg 'append) (add-to-list 'list beg 'append)
(setq beg (1+ beg)))) (setq beg (1+ beg))))
;; else just a number ;; else just a number
(add-to-list 'list (string-to-number elem) 'append))) (add-to-list 'list (string-to-number elem) 'append)))
;; Check that all numbers are valid. ;; Check that all numbers are valid.
(mapc (mapc
#'(lambda (x) #'(lambda (x)
(cond (cond
((> x n) ((> x n)

View File

@ -284,7 +284,7 @@ is nil, and otherwise open it."
(interactive) (interactive)
(if is-open (if is-open
(mu4e-view-open-attachment msg attachnum) (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) (defun mu4e~view-construct-attachments (msg)
"Display attachment information; the field looks like something like: "Display attachment information; the field looks like something like:
@ -815,6 +815,7 @@ attachments, but as this is the default, you may not need it."
(let* ((msg (or msg (mu4e-message-at-point))) (let* ((msg (or msg (mu4e-message-at-point)))
(attachstr (mu4e~view-get-attach-num (attachstr (mu4e~view-get-attach-num
"Attachment number range (or 'a' for 'all')" msg t)) "Attachment number range (or 'a' for 'all')" msg t))
(count (hash-table-count mu4e~view-attach-map))
(attachnums (mu4e-split-ranges-to-numbers attachstr count))) (attachnums (mu4e-split-ranges-to-numbers attachstr count)))
(dolist (num attachnums) (dolist (num attachnums)
(mu4e-view-save-attachment-single msg num)))) (mu4e-view-save-attachment-single msg num))))

View File

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