3

关于如何配置 Wanderlust 以在新缓冲区而不是拆分窗口中打开电子邮件的任何想法?四 (4) 个窗口发生了太多事情——摘要消息缓冲区;消息缓冲区;大哥阴险的数据库地址管理器;和迷你缓冲区。(请参见下面的屏幕截图。)

我想我已经在 中找到了代码的相关部分wl-message.el,但我不确定要更改哪个部分。 (setq wl-message-window-size '(1 . 1))ininit.el不是要找的,因为我仍然必须与其他缓冲区共享屏幕。

我花了很多时间切换和关闭窗口以获得完整大小的缓冲区,并且我希望在检查我的电子邮件时消除多个窗口。

谢谢 。. . 任何帮助将不胜感激。

;;; wl-message.el -- Message buffer handling from summary buffer.

(defun wl-message-buffer-window ()
  "Get message buffer window if any."
  (let* ((start-win (selected-window))
     (cur-win start-win))
    (catch 'found
      (while (progn
           (setq cur-win (next-window cur-win))
           (with-current-buffer (window-buffer cur-win)
         (if (or (eq major-mode 'wl-message-mode)
             (eq major-mode 'mime-view-mode))
             (throw 'found cur-win)))
           (not (eq cur-win start-win)))))))

(defun wl-message-select-buffer (buffer)
  "Select BUFFER as a message buffer."
  (let ((window (get-buffer-window buffer))
    (sum (car wl-message-window-size))
    (mes (cdr wl-message-window-size))
    whi)
    (when (and window
           (not (eq (with-current-buffer (window-buffer window)
              wl-message-buffer-cur-summary-buffer)
            (current-buffer))))
      (delete-window window)
      (run-hooks 'wl-message-window-deleted-hook)
      (setq window nil))
    (if window
    (select-window window)
      (when wl-fixed-window-configuration
    (delete-other-windows)
    (and wl-stay-folder-window
         (wl-summary-toggle-disp-folder)))
      ;; There's no buffer window. Search for message window and snatch it.
      (if (setq window (wl-message-buffer-window))
      (select-window window)
    (setq whi (1- (window-height)))
    (if mes
        (progn
          (let ((total (+ sum mes)))
        (setq sum (max window-min-height (/ (* whi sum) total)))
        (setq mes (max window-min-height (/ (* whi mes) total))))
          (if (< whi (+ sum mes))
          (enlarge-window (- (+ sum mes) whi)))))
    (split-window (get-buffer-window (current-buffer)) sum)
    (other-window 1)))
    (switch-to-buffer buffer)))

多个窗口
(来源:lawlist.com

4

1 回答 1

2

解决方案#1:由于缓冲区名称开头的空格,其中  wl-message-buffer-name定义的变量使消息缓冲区无趣: 。由于 Emacs 默认隐藏不感兴趣的缓冲区,一种解决方案是通过删除缓冲区名称开头的空格来修改上述变量。这样,缓冲区总是可见的,只需切换到显示消息的窗口,然后. 附加的优点是不再需要返回摘要缓冲区来查看已打开的电子邮件,因为已经有一个专用于所述电子邮件的打开缓冲区。wl-vars.el  *WL:Message*delete-other-windows

(defcustom wl-message-buffer-name "*WL:Message*" ;; " *WL:Message*"
  "*Buffer name for message buffers."
  :group 'wl-pref
  :group 'wl-setting)

解决方案#2:第二种解决方案不再是首选方法,很可能会完全从该答案中删除。由于某种未知原因,我使用的单词搜索实用程序无法梳理wl-vars.el文件,因此第二个解决方案是一种解决方法。

编辑wl-summary-read(inside wl-summary.el) 的键映射并将其替换为函数lawlist-wl-summary-read,以便按下空格键激活所述函数。 wl-summary-enter-handler仍然定义为 enter 键,它以默认方式打开消息。

(define-key wl-summary-mode-map " "    'lawlist-wl-summary-read)

(defun lawlist-wl-summary-read nil
  "Clone the the buffer and make new buffer name unique."
(interactive)
    (wl-summary-enter-handler)
    (windmove-down)
    (let ((n 0)
        bufname)
    (while (progn
             (setq bufname (concat "email"
                                   (if (= n 0) "" (int-to-string n))
                                   "")) ;; could be an ending, like an asterick *
             (setq n (1- n)) ;; if + instead of -, then no hyphen and no space between buffer name and the number
             (get-buffer bufname)))
    (clone-indirect-buffer bufname nil)
    (switch-to-buffer bufname)
    (delete-other-windows) ))
于 2013-06-01T04:51:37.443 回答