Gnus development mailing list
 help / color / mirror / Atom feed
* Inter-operating between Gnus and RMAIL
@ 1999-04-18 19:04 François Pinard
  1999-06-11 23:54 ` Lars Magne Ingebrigtsen
  0 siblings, 1 reply; 2+ messages in thread
From: François Pinard @ 1999-04-18 19:04 UTC (permalink / raw)


Hello, people.  (Hi, Lars!)

Having thousands of Babyl files, and being an addict of Gnus as well, I often
go between both systems, and am trying to increase the inter-operability,
until I'm fully read to fully switch to Gnus.  Following advice from Lars,
which he might not even remember, I just wrote these lines.  I'm sharing
them here, as they might be useful to others, who knows, and because you
might want to improve on them.


(defun fp-rmail-mode-routine ()
; ...
  (local-set-key "G" 'fp-rmail-gnus-fetch-group)
  (local-set-key "O" 'fp-rmail-nnml-request-accept-article)
; ...
  )
(add-hook 'rmail-mode-hook 'fp-rmail-mode-routine)


(defun fp-rmail-gnus-fetch-group (group)
  (interactive
   (list (completing-read
	  "Group: " gnus-active-hashtb nil
	  (gnus-read-active-file-p)
	  nil
	  'gnus-group-history)))
  (gnus-fetch-group group))

(defun fp-rmail-nnml-request-accept-article (group)
  (interactive
   (list (completing-read
	  "Group: " gnus-active-hashtb nil
	  (gnus-read-active-file-p)
	  nil
	  'gnus-group-history)))
  (let ((message (buffer-substring (point-min) (point-max))))
    (with-temp-buffer
      (insert message)
      (nnml-request-accept-article group))))


>From RMAIL, `G' directly switch to a given Gnus group, and `O' sends a copy
of the current message into some Gnus mailgroup.  Both seem to work well,
except for those pesky \201's which pop up in copied messages: I'm cursed!

My last need in that precise area would be to find a way to (fastly)
use Gnus for displaying an article directly from RMAIL mode (modifiable
if possible), would it be merely to take advantage of MIME presentation.
I'm not sure how to that, but will try a bit.  I'm not really expecting
that anybody has a ready-made working recipe yet, but, gosh, who knows :-).


P.S. - Quite a while ago, I tried some code for Gnus to better save
Babyl messages, as it was not always doing it correctly (I forgot what
the misbehavior was).  It should do it correctly, yet a bit slowly.
Since then, the code lies there, and I forgot about it, but stumbled on
it today.  I should comment out that code to see if Gnus does it better now.
In the meantime, here is that code:


(setq gnus-default-article-saver 'fp-gnus-summary-save-in-rmail)

(defun fp-gnus-summary-save-in-rmail (&optional filename)
  "Append this article to Rmail file.
Optional argument FILENAME specifies file name.
Directory to save to is default to `gnus-article-save-directory'."
  (setq filename (gnus-read-save-file-name
		  "Save %s in rmail file:" filename
		  gnus-rmail-save-name gnus-newsgroup-name
		  gnus-current-headers 'gnus-newsgroup-last-rmail))
  (gnus-eval-in-buffer-window gnus-save-article-buffer
    (when (and (boundp 'rmail-message-vector) (vectorp rmail-message-vector))
      (rmail-forget-messages))
    (save-excursion
      (save-restriction
	(widen)
	(goto-char (point-min))
	(insert "From Gnus " (current-time-string) "\n")
	(rmail-convert-file)
	(let ((rmail-delete-after-output nil))
	  (rmail-output-to-rmail-file filename))
	(rmail-forget-messages))))
  filename)

-- 
François Pinard                            mailto:pinard@iro.umontreal.ca
Join the free Translation Project!    http://www.iro.umontreal.ca/~pinard



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Inter-operating between Gnus and RMAIL
  1999-04-18 19:04 Inter-operating between Gnus and RMAIL François Pinard
@ 1999-06-11 23:54 ` Lars Magne Ingebrigtsen
  0 siblings, 0 replies; 2+ messages in thread
From: Lars Magne Ingebrigtsen @ 1999-06-11 23:54 UTC (permalink / raw)


François Pinard <pinard@iro.umontreal.ca> writes:

> My last need in that precise area would be to find a way to (fastly)
> use Gnus for displaying an article directly from RMAIL mode (modifiable
> if possible), would it be merely to take advantage of MIME presentation.
> I'm not sure how to that, but will try a bit.  I'm not really expecting
> that anybody has a ready-made working recipe yet, but, gosh, who knows :-).

I've never tried it, but I think that `gnus-display-mime' might work
on an arbitrary article-like buffer.

-- 
(domestic pets only, the antidote for overdose, milk.)
  larsi@gnus.org * Lars Magne Ingebrigtsen


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~1999-06-11 23:54 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-04-18 19:04 Inter-operating between Gnus and RMAIL François Pinard
1999-06-11 23:54 ` Lars Magne Ingebrigtsen

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).