Article View: gnu.emacs.vm.bug
Article #8850Re: reply and summery mode
From: Kevin Rodgers
Date: Mon, 03 May 1993 16:29
Date: Mon, 03 May 1993 16:29
191 lines
7676 bytes
7676 bytes
In article <199305011645.AA19140@honi.uni-paderborn.de> wolle@uni-paderborn.de (Wolfgang) writes:
>I start up vm with summery mode. This devides emacs's window into two,
>showing the summery in the smaller one and the mail's contents in the big
>one.
>When I type r or R to reply to the mail being currently displayed, the
>small window is used to write the mail, and the big in is left with
>displaying the mail.
>How can I change that ? I'ld like to take the big window to write the mail
>and the small one I'ld like to stay in summery mode.
>Is there a variable I can set ?
Here's a patch to vm-4.41 that does exactly what you're asking, if the
(new) variable vm-send-in-folder-window is non-nil.
Are you interested in adapting this patch to vm-5.x, Kyle?
---
Kevin Rodgers kevin@traffic.den.mmc.com Martin
Marietta MS A16401 (303) 790-3971
116 Inverness Dr. East, Suite 401
Englewood CO 80112 USA GO BUFFS!
*** vm-reply.el.dist Mon Sep 11 11:47:56 1989
--- vm-reply.el Fri Feb 5 08:45:33 1993
***************
*** 22,27 ****
--- 22,29 ----
(if vm-mail-buffer
(set-buffer vm-mail-buffer))
(vm-error-if-folder-empty)
+ (if vm-send-in-folder-window
+ (vm-display-as-folder-window t))
(save-restriction
(widen)
(let ((mail-buffer (current-buffer))
***************
*** 204,209 ****
--- 206,213 ----
(if vm-mail-buffer
(set-buffer vm-mail-buffer))
(vm-error-if-folder-empty)
+ (if vm-send-in-folder-window
+ (vm-display-as-folder-window t))
(let ((b (current-buffer))
(m (car vm-message-pointer))
(start))
***************
*** 237,242 ****
--- 241,248 ----
(vm-follow-summary-cursor)
(if vm-mail-buffer
(set-buffer vm-mail-buffer))
+ (if vm-send-in-folder-window
+ (vm-display-as-folder-window t))
(let ((mail-buffer (current-buffer)))
(cond ((mail)
(use-local-map (copy-keymap (current-local-map)))
***************
*** 252,257 ****
--- 258,265 ----
(if vm-mail-buffer
(set-buffer vm-mail-buffer))
(vm-error-if-folder-empty)
+ (if vm-send-in-folder-window
+ (vm-display-as-folder-window t))
(let ((b (current-buffer))
(start))
(save-restriction
*** vm.el.dist Mon Sep 11 11:47:56 1989
--- vm.el Fri Feb 5 08:52:25 1993
***************
*** 209,214 ****
--- 209,229 ----
A value that is neither t nor nil allows VM to use other windows, but it
will not create new ones, or resize or delete the current ones.")
+ (defvar vm-send-in-folder-window nil
+ "*If non-nil, the VM commands for sending messages select the folder
+ window as the mail composition window. \(The window is selected
+ according to vm-mutable-windows and pop-up-windows, and is proportioned
+ according to vm-mail-window-percentage.\)
+
+ The VM commands for sending messages are:\\<vm-mode-map>
+ `\\[vm-mail]' vm-mail
+ `\\[vm-reply]' vm-reply
+ `\\[vm-reply-include-text]' vm-reply-include-text
+ `\\[vm-followup]' vm-followup
+ `\\[vm-followup-include-text]' vm-followup-include-text
+ `\\[vm-forward-message]' vm-forward-message
+ `\\[vm-send-digest]' vm-send-digest")
+
(defvar vm-startup-with-summary nil
"*Value tells VM what to display when a folder is visited.
Nil means display folder only, t means display the summary only. A
***************
*** 1107,1120 ****
(vm-error-if-folder-empty)
(if (null (get-buffer-window (current-buffer)))
(progn
! (if vm-mutable-windows
! (let ((pop-up-windows
! (and pop-up-windows (eq vm-mutable-windows t))))
! (display-buffer (current-buffer)))
! (switch-to-buffer (current-buffer)))
! (if (and vm-summary-buffer (get-buffer-window vm-summary-buffer)
! (eq vm-mutable-windows t))
! (vm-proportion-windows))
(if (eq vm-system-state 'previewing)
(vm-show-current-message t)
(vm-howl-if-eom-visible)))
--- 1122,1128 ----
(vm-error-if-folder-empty)
(if (null (get-buffer-window (current-buffer)))
(progn
! (vm-display-as-folder-window)
(if (eq vm-system-state 'previewing)
(vm-show-current-message t)
(vm-howl-if-eom-visible)))
***************
*** 1145,1158 ****
(vm-error-if-folder-empty)
(if (null (get-buffer-window (current-buffer)))
(progn
! (if vm-mutable-windows
! (let ((pop-up-windows
! (and pop-up-windows (eq vm-mutable-windows t))))
! (display-buffer (current-buffer)))
! (switch-to-buffer (current-buffer)))
! (if (and vm-summary-buffer (get-buffer-window vm-summary-buffer)
! (eq vm-mutable-windows t))
! (vm-proportion-windows)))
(let ((w (get-buffer-window (current-buffer)))
(old-w (selected-window)))
(unwind-protect
--- 1153,1159 ----
(vm-error-if-folder-empty)
(if (null (get-buffer-window (current-buffer)))
(progn
! (vm-display-as-folder-window))
(let ((w (get-buffer-window (current-buffer)))
(old-w (selected-window)))
(unwind-protect
***************
*** 1160,1165 ****
--- 1161,1183 ----
(select-window w)
(scroll-down arg))
(select-window old-w)))))
+
+ (defun vm-display-as-folder-window (&optional select)
+ "Display the current buffer according to vm-mutable-windows and pop-
+ up-windows, and proportion it according to vm-mail-window-percentage.
+ If the optional argument SELECT is non-nil, select the window."
+ ;; display the buffer:
+ (if vm-mutable-windows
+ (let ((pop-up-windows
+ (and pop-up-windows (eq vm-mutable-windows t))))
+ (if select
+ (pop-to-buffer (current-buffer))
+ (display-buffer (current-buffer))))
+ (switch-to-buffer (current-buffer)))
+ ;; proportion the window:
+ (if (and vm-summary-buffer (get-buffer-window vm-summary-buffer)
+ (eq vm-mutable-windows t))
+ (vm-proportion-windows)))
(defun vm-end-of-message ()
"Displays the end of the current message, exposing and marking it read
*** vm.texinfo.dist Mon Jul 24 08:50:23 1989
--- vm.texinfo Wed Jan 6 15:34:00 1993
***************
*** 410,415 ****
--- 410,421 ----
message much as @kbd{M-x mail} does but allows the added commands
described above.@refill
+ @vindex vm-send-in-folder-window
+ The variable @code{vm-send-in-folder-window} determines which window the
+ VM commands for sending messages use as the mail composition window. By
+ default, it is nil, so the current window is used; if it is non-nil, the
+ folder window is displayed and used instead.@refill
+
@menu
* Replying:: Describes the various way to reply to a message.
* Forwarding Messages:: How to forward a message to a third party.
--
Kevin Rodgers kevin@traffic.den.mmc.com
Martin Marietta MS A16401 (303) 790-3971
116 Inverness Dr. East, Suite 401
Englewood CO 80112 USA GO BUFFS!
Technical Details
Message-ID:
<1993May3.162956.14198@den.mmc.com>Path:
arc1-ca.pugleaf.net!gmd.de!newsserver.jvnc.net!news.cac.psu.edu!howland.reston.ans.net!zaphod.mps.ohio-state.edu!ub!csn!news.den.mmc.com!traffic!kevinReferences:
<199305011645.AA19140@honi.uni-paderborn.de>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f6829,4965b5f2775a22b0 X-Google-Attributes: gidf6829,public X-Google-ArrivalTime: 1993-05-03 10:19:39 PST Newsgroups: gnu.emacs.vm.bug Path: arc1-ca.pugleaf.net!gmd.de!newsserver.jvnc.net!news.cac.psu.edu!howland.reston.ans.net!zaphod.mps.ohio-state.edu!ub!csn!news.den.mmc.com!traffic!kevin From: kevin@traffic.den.mmc.com (Kevin Rodgers) Subject: Re: reply and summery mode Message-ID: <1993May3.162956.14198@den.mmc.com> Sender: news@den.mmc.com (News) Nntp-Posting-Host: traffic.den.mmc.com Organization: Martin Marietta Information Systems, WIS (Denver) Tech Ops References: <199305011645.AA19140@honi.uni-paderborn.de> Date: Mon, 3 May 1993 16:29:56 GMT Lines: 191