[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: wanderlust install question



At Wed, 08 Jan 2014 19:43:11 -0800,
Erik Hetzner wrote:
> No that I know of, but searching with M-x wl--buffer yields some
> functions that might help you, wl-summary-next-buffer and
> wl-summary-previous-buffer. Modifying them slightly:
> 
> (defun wl-summary-switch-buffer ()
>   (interactive)
>   (let* ((buffers (sort (wl-collect-summary)
> 		       (lambda (buffer1 buffer2)
> 			 (string-lessp (buffer-name buffer1)
> 				       (buffer-name buffer2)))))
>          (buffers-alist (mapcar (lambda (b) (list (buffer-name b) b)) buffers))
>          (buffer-names (mapcar 'buffer-name buffers))
>          (chosen-name (ido-completing-read "Buffer: " buffer-names))
>          (chosen-buffer (assoc-string chosen-name buffer-alist)))
>     (switch-to-buffer chosen-buffer)))

Oops, that doesnʼt actually work. Here is one that does:

(defun wl-summary-switch-buffer ()
  (interactive)
  (let* ((buffers (sort (wl-collect-summary)
		       (lambda (buffer1 buffer2)
			 (string-lessp (buffer-name buffer1)
				       (buffer-name buffer2)))))
         (buffer-names (mapcar 'buffer-name buffers)))
    (switch-to-buffer (ido-completing-read "Buffer: " buffer-names))))

best, Erik
-- 
Sent from my free software system <http://fsf.org/>.