From: Reiner Steib <reinersteib+gmane@imap.cc>
Subject: gnus-buffer-configuration in mml-preview
Date: Fri, 28 Oct 2005 14:26:55 +0200 [thread overview]
Message-ID: <v93bmlesj4.fsf@marauder.physik.uni-ulm.de> (raw)
Hi,
the changes in `mml-preview' in the trunk (compared to v5-10 or
revision 7.17 [1]) prevent that my configuration of
`special-display-regexps'[1] does the right thing.
I can work around this by removing mml-preview from
gnus-buffer-configuration:
(when (assq 'mml-preview gnus-buffer-configuration)
(setq gnus-buffer-configuration
(remove (assq 'mml-preview gnus-buffer-configuration)
gnus-buffer-configuration)))
I'm not sure if `gnus-buffer-configuration' is supposed to override
`special-display-regexps' or not. I don't say that the code in
`mml-preview' is incorrect, but maybe we should document it.
Bye, Reiner.
[1]
,----[ <f1> v special-display-regexps RET ]
| special-display-regexps is a variable defined in `C source code'.
| Its value is shown below.
|
| Documentation:
| *List of regexps saying which buffers should have their own special frames.
| [...]
| Value:
| ([...] ("MIME preview" (height . 55)) [...])
`----
[2]
2004-09-22 Katsumi Yamaoka <yamaoka@jpl.org>
* gnus-win.el (gnus-buffer-configuration): Add mml-preview.
(gnus-window-to-buffer): Ditto.
* mml.el (mml-preview-buffer): New variable.
(mml-preview): Manage window layout with gnus-buffer-configuration.
--8<---------------cut here---------------start------------->8---
--- mml.el 28 Oct 2005 14:20:41 +0200 7.17
+++ mml.el 28 Oct 2005 14:12:52 +0200
@@ -1078,10 +1209,15 @@
(message-position-on-field "Mail-Followup-To" "X-Draft-From")
(insert (message-make-mail-followup-to))))
+(defvar mml-preview-buffer nil)
+
(defun mml-preview (&optional raw)
"Display current buffer with Gnus, in a new buffer.
If RAW, don't highlight the article."
(interactive "P")
+ (setq mml-preview-buffer (generate-new-buffer
+ (concat (if raw "*Raw MIME preview of "
+ "*MIME preview of ") (buffer-name))))
(save-excursion
(let* ((buf (current-buffer))
(message-options message-options)
@@ -1093,13 +1229,13 @@
(message-fetch-field "Newsgroups")))
message-posting-charset)))
(message-options-set-recipient)
- (pop-to-buffer (generate-new-buffer
- (concat (if raw "*Raw MIME preview of "
- "*MIME preview of ") (buffer-name))))
(when (boundp 'gnus-buffers)
- (push (current-buffer) gnus-buffers))
- (erase-buffer)
- (insert-buffer-substring buf)
+ (push mml-preview-buffer gnus-buffers))
+ (save-restriction
+ (widen)
+ (set-buffer mml-preview-buffer)
+ (erase-buffer)
+ (insert-buffer-substring buf))
(mml-preview-insert-mail-followup-to)
(let ((message-deletable-headers (if (message-news-p)
nil
@@ -1112,6 +1248,7 @@
(concat "^" (regexp-quote mail-header-separator) "\n") nil t)
(replace-match "\n"))
(let ((mail-header-separator ""));; mail-header-separator is removed.
+ (message-sort-headers)
(mml-to-mime))
(if raw
(when (fboundp 'set-buffer-multibyte)
@@ -1144,7 +1281,12 @@
(lambda (event)
(interactive "@e")
(widget-button-press (widget-event-point event) event)))
- (goto-char (point-min)))))
+ (goto-char (point-min))))
+ (if (and (boundp 'gnus-buffer-configuration)
+ (assq 'mml-preview gnus-buffer-configuration))
+ (let ((gnus-message-buffer (current-buffer)))
+ (gnus-configure-windows 'mml-preview))
+ (pop-to-buffer mml-preview-buffer)))
(defun mml-validate ()
"Validate the current MML document."
--8<---------------cut here---------------end--------------->8---
--
,,,
(o o)
---ooO-(_)-Ooo--- | PGP key available | http://rsteib.home.pages.de/
next reply other threads:[~2005-10-28 12:26 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-10-28 12:26 Reiner Steib [this message]
2005-10-28 15:09 ` Katsumi Yamaoka
2005-10-31 6:16 ` Katsumi Yamaoka
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=v93bmlesj4.fsf@marauder.physik.uni-ulm.de \
--to=reinersteib+gmane@imap.cc \
--cc=Reiner.Steib@gmx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).