Gnus development mailing list
 help / color / mirror / Atom feed
From: Reiner Steib <reinersteib+gmane@imap.cc>
Subject: Re: Viewing HTML-mails with external browsers - proposed code
Date: Fri, 10 Feb 2006 19:15:35 +0100	[thread overview]
Message-ID: <v9ek2b84hk.fsf@marauder.physik.uni-ulm.de> (raw)
In-Reply-To: <x7hd7kzi5j.fsf@ularx.de>

On Tue, Jan 31 2006, Hynek Schlawack wrote:

> * Reiner Steib <reinersteib+gmane@imap.cc> wrote:
>
>> As for your code, it's fine for now if you use `mm-make-temp-file'
>> instead of `make-temp-name'.
>
> Done. I've attached it - would some Win32-user care to test whether it
> works as expected _please_? Thanks!
>
>>> So, there's the bug with your mail and the temp-file-stuff left,
>>> iirc?
>> You mean removing the temp file(s)?  
>
> I'm still pondering how to get that best. I'll definitely add an
> argument for that because _I_ don't want to be bothered everytime I look
> at a HTML-mail. But any other suggestions? 

Here is an idea:

Store each used temp-filename in a list (internal variable).  Add a
function `gnus-article-browse-delete-temp-files' (better name?)  that
walks through this list and deletes the files (remove deleted files
from the list).  This function can be added to a suitable
gnus-*-exit-hook [1] (say on summary exit or on exit from Gnus).

Add a customizable variable (a list) specifying *when* to delete the
files and whether to prompt the user or not.
E.g. `gnus-article-browse-delete-temp' (better name?).

(memq t gnus-article-browse-delete-temp)    -> prompt before deleting
(eq nil gnus-article-browse-delete-temp)    -> delete w/o prompt

(memq 'summary gnus-article-browse-delete-temp)
  -> run `gnus-article-browse-delete-temp-files' on summary exit
(memq 'gnus gnus-article-browse-delete-temp)
  -> run `gnus-article-browse-delete-temp-files' on exit from Gnus
Maybe not useful:
(memq 'emacs gnus-article-browse-delete-temp)
  -> run `gnus-article-browse-delete-temp-files' on exit from Emacs

Depending on the value of `gnus-article-browse-delete-temp',
`gnus-article-browse-html-parts' does e.g.
(add-hook 'gnus-summary-exit-hook 'gnus-article-browse-delete-temp-files).

(Hm, this would lead to "CHANGED outside Customize" message in
customize.  But `spam-initialize' also does this.)

More simple approach: Run `gnus-article-browse-delete-temp-files' from
`gnus-summary-prepare-exit-hook' and `gnus-exit-gnus-hook'.  Allow
only the values `t' (delete w/o prompt), `nil' (don't delete) and
`ask' for the `gnus-article-browse-delete-temp' variable.

Opinions?

> C'mon guys/gals, it's not only Reiner reading here. ;)

Maybe we get more feedback now that I committed it to `gnus-art.el'.

Bye, Reiner.

[1]
,----
| gnus-after-exiting-gnus-hook
|   Variable: Hook called after exiting Gnus.
| gnus-exit-gnus-hook
|   Variable: Hook called when exiting Gnus.
| gnus-exit-group-hook
|   Variable: *A hook called when exiting summary mode.
| gnus-summary-exit-hook
|   Variable: *A hook called on exit from the summary buffer.
| gnus-summary-prepare-exit-hook
|   Variable: *A hook called when preparing to exit from the summary buffer.
`----
-- 
       ,,,
      (o o)
---ooO-(_)-Ooo---  |  PGP key available  |  http://rsteib.home.pages.de/




  reply	other threads:[~2006-02-10 18:15 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-12-18 21:49 Hynek Schlawack
2006-01-13 13:42 ` Hynek Schlawack
2006-01-13 15:57   ` Reiner Steib
2006-01-13 17:13     ` Hynek Schlawack
2006-01-19 19:35 ` Reiner Steib
2006-01-22 12:40   ` Hynek Schlawack
2006-01-25 14:44     ` Reiner Steib
2006-01-25 16:29       ` Hynek Schlawack
2006-01-25 17:41         ` Reiner Steib
2006-01-31 12:38           ` Hynek Schlawack
2006-02-10 18:15             ` Reiner Steib [this message]
2006-02-13  0:06               ` Katsumi Yamaoka
2006-02-13 14:53                 ` Reiner Steib
2006-02-13 15:24                   ` Hynek Schlawack
2006-02-13 15:37                   ` Hynek Schlawack
2006-02-13 22:16                     ` Reiner Steib
2006-02-14  0:11                       ` Katsumi Yamaoka
2006-02-14 11:50                         ` Katsumi Yamaoka
2006-02-15  8:39                           ` mm-make-temp-file (was Re: Viewing HTML-mails with external browsers - proposed code) Katsumi Yamaoka
2006-02-14 20:08                         ` Viewing HTML-mails with external browsers - proposed code Hynek Schlawack

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