[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
petname in modeline
I have noticed that the option `modeline' of the variable `wl-use-folder-petname'
isn't taken into account when a draft buffer is created.
If there isn't any special reason for that, I would kindly ask for applying the
provided patch which changes the relevant lines where the buffer is renamed
resp. where draft buffers are searched for.
Best,
Markus
diff -Naur wanderlust-wanderlust-e6fd48b/wl/wl-draft.el new/wl/wl-draft.el
--- wanderlust-wanderlust-e6fd48b/wl/wl-draft.el 2014-05-20 15:05:25.938454141 +0200
+++ new/wl/wl-draft.el 2014-05-21 08:28:21.311345047 +0200
@@ -1463,7 +1463,9 @@
(if (not (numberp next-number))
(setq wl-draft-buffer-message-number nil)
(setq wl-draft-buffer-message-number next-number)
- (rename-buffer (format "%s/%d" wl-draft-folder next-number) t)
+ (rename-buffer (format "%s/%d" (if (memq 'modeline wl-use-folder-petname)
+ (wl-folder-get-petname wl-draft-folder)
+ wl-draft-folder) next-number) t)
(wl-draft-config-info-operation wl-draft-buffer-message-number 'save))
(setq buffer-file-name (buffer-name))
(set-buffer-modified-p nil)
@@ -1972,7 +1974,9 @@
(wl-draft-reedit t)
(num 0)
buffer change-major-mode-hook body-top)
- (setq buffer (get-buffer-create (format "%s/%d" wl-draft-folder
+ (setq buffer (get-buffer-create (format "%s/%d" (if (memq 'modeline wl-use-folder-petname)
+ (wl-folder-get-petname wl-draft-folder)
+ wl-draft-folder)
number)))
(if wl-draft-use-frame
(switch-to-buffer-other-frame buffer)
@@ -2637,7 +2641,9 @@
(defun wl-draft-buffer-change-number (old-number new-number)
(when (eq wl-draft-buffer-message-number old-number)
(setq wl-draft-buffer-message-number new-number)
- (rename-buffer (format "%s/%d" wl-draft-folder new-number) t)
+ (rename-buffer (format "%s/%d" (if (memq 'modeline wl-use-folder-petname)
+ (wl-folder-get-petname wl-draft-folder)
+ wl-draft-folder) new-number) t)
(setq buffer-file-name (buffer-name))
(set-buffer-modified-p nil)))
diff -Naur wanderlust-wanderlust-e6fd48b/wl/wl-util.el new/wl/wl-util.el
--- wanderlust-wanderlust-e6fd48b/wl/wl-util.el 2014-05-19 07:15:43.000000000 +0200
+++ new/wl/wl-util.el 2014-05-21 08:23:24.842951154 +0200
@@ -522,7 +522,9 @@
result))
(defun wl-collect-draft ()
- (let ((draft-regexp (concat "^" (regexp-quote wl-draft-folder)))
+ (let ((draft-regexp (concat "^" (regexp-quote (if (memq 'modeline wl-use-folder-petname)
+ (wl-folder-get-petname wl-draft-folder)
+ wl-draft-folder))))
result)
(dolist (buffer (buffer-list))
(when (with-current-buffer buffer