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

Re: things i have never figured out



Hi all -

At Tue, 16 Mar 2010 14:22:29 -0400,
David Abrahams wrote:
> 
> I'm still interested in the answers to many of Randy's questions
> below.
> 
> At Mon, 15 Mar 2010 08:17:14 +0900, Randy Bush wrote:
> > 
> > i have been using wl for a while now, and am very thankful for clue
> > received on this list.  though i do seem to have the ~/.wl from hell :)
> > 
> > but here is my list of things which i still have not figured out:
> > 
> > i desperately miss VM's E(dit command, where i could fully edit a
> > message and the resave it.  i used this to M-Q unwrapped text and other
> > useful things.  as it is now, i have to manually go into the folder and
> > MH message by number.  lack of this has me seriously eying mew, as the
> > author is at the next desk and i can apply pressure. :)

I think that you could modify wl-draft-reedit to support this
functionality.

> > how to have the Sent summary buffer display To: as opposed to From:?

Still not sure why this does not work for you.

> > what is equivalent of VM's b(ounce of a message, e.g. resend with
> > Resent-headers not altering From: etc.?  wl-summary-reedit changes the
> > From: etc.  ~ does not let me edit the message buffer.

Check attached for a start. This adds a new function
wl-summary-reedit-no-from. I think that you could easily add resent
headers as necessary.

> > is there a way to have commands such as a(nswer, n(ext, etc. work in the
> > message buffer, as opposed to only when the cursor is in the summary
> > buffer?

a works for me. That is, when I type a in message buffer, I get a
draft buffer for a reply.

For n, p, try:

(setq mime-preview-over-to-next-method-alist
      '((wl-original-message-mode . (lambda ()
                                      (wl-message-exit)
                                      (wl-summary-next)))))

(setq mime-preview-over-to-previous-method-alist
      '((wl-original-message-mode . (lambda ()
                                      (wl-message-exit)
                                      (wl-summary-prev)))))

Is that the functionality you need? It seems to work well for me.

> > how to set a fence beyond which a scan from desktop will not go?  i
> > have a quite large (over 5000 +folders) email archive that i see no
> > reason to re-scan.

Don’t know, sorry.

> > what can be set to remember across invocations which folders were
> > open and which closed?  and how to have the cursor remember where i was
> > in each summary?

Don’t know this one either.

best,
Erik

(defun wl-summary-reedit-no-from (&optional arg)
  "Re-edit current message without changing from header.
If ARG is non-nil, Supersedes message"
  (interactive "P")
  (wl-summary-toggle-disp-msg 'off)
  (cond
   ((null (wl-summary-message-number))
    (message "No message."))
   (arg
    (wl-summary-supersedes-message))
   ((string= (wl-summary-buffer-folder-name) wl-draft-folder)
    (wl-draft-reedit (wl-summary-message-number))
    (if (wl-message-news-p)
	(mail-position-on-field "Newsgroups")
      (mail-position-on-field "To")))
   (t
    (my-wl-draft-edit-string (wl-summary-message-string 'maybe) t))))

(defun my-wl-draft-edit-string (string &optional no-from-mangle)
  (let ((cur-buf (current-buffer))
	(tmp-buf (get-buffer-create " *wl-draft-edit-string*"))
	to subject in-reply-to cc references newsgroups mail-followup-to
	content-type content-transfer-encoding from
	body-beg)
    (set-buffer tmp-buf)
    (erase-buffer)
    (insert string)
    (setq to (std11-field-body "To"))
    (setq to (and to
		  (eword-decode-string
		   (decode-mime-charset-string
		    to
		    wl-mime-charset))))
    (setq subject (std11-field-body "Subject"))
    (setq subject (and subject
		       (eword-decode-string
			(decode-mime-charset-string
			 subject
			 wl-mime-charset))))
    (if no-from-mangle
        (setq from (std11-field-body "From"))
      (setq from (std11-field-body "From")
            from (and from
                      (eword-decode-string
                       (decode-mime-charset-string
                        from
                        wl-mime-charset)))))
    (setq in-reply-to (std11-field-body "In-Reply-To"))
    (setq cc (std11-field-body "Cc"))
    (setq cc (and cc
		  (eword-decode-string
		   (decode-mime-charset-string
		    cc
		    wl-mime-charset))))
    (setq references (std11-field-body "References"))
    (setq newsgroups (std11-field-body "Newsgroups"))
    (setq mail-followup-to (std11-field-body "Mail-Followup-To"))
    (setq content-type (std11-field-body "Content-Type"))
    (setq content-transfer-encoding (std11-field-body "Content-Transfer-Encoding"))
    (goto-char (point-min))
    (or (re-search-forward "\n\n" nil t)
	(search-forward (concat mail-header-separator "\n") nil t))
    (unwind-protect
	(set-buffer
	 (wl-draft (list
		    (cons 'From
                          (if no-from-mangle from
                            (if (wl-address-user-mail-address-p from) from)))
		    (cons 'To to)
		    (cons 'Cc cc)
		    (cons 'Subject subject)
		    (cons 'Newsgroups newsgroups)
		    (cons 'Mail-Followup-To mail-followup-to)
		    (cons 'In-Reply-To in-reply-to)
		    (cons 'References references))
		   content-type content-transfer-encoding
		   (buffer-substring (point) (point-max))
		   'edit-again))
      (kill-buffer tmp-buf))
    ;; Set cursor point to the top.
    (goto-char (point-min))
    (search-forward (concat mail-header-separator "\n") nil t)
    (run-hooks 'wl-draft-reedit-hook)
    (and to (mail-position-on-field "To"))))

Attachment: pgp8A4nDeS6Z2.pgp
Description: PGP signature