From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/61767 Path: news.gmane.org!not-for-mail From: Reiner Steib Newsgroups: gmane.emacs.gnus.general Subject: Re: Viewing HTML-mails with external browsers - proposed code Date: Wed, 25 Jan 2006 15:44:55 +0100 Organization: Dept. of Theoretical Physics, University of Ulm Message-ID: References: <874q56xeh4@ularx.de> <878xt8wi4l@ularx.de> Reply-To: Reiner Steib NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1138201493 9035 80.91.229.2 (25 Jan 2006 15:04:53 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 25 Jan 2006 15:04:53 +0000 (UTC) Original-X-From: ding-owner+m10297@lists.math.uh.edu Wed Jan 25 16:04:50 2006 Return-path: Envelope-to: ding-account@gmane.org Original-Received: from malifon.math.uh.edu ([129.7.128.13]) by ciao.gmane.org with esmtp (Exim 4.43) id 1F1mBO-0005wK-Jg for ding-account@gmane.org; Wed, 25 Jan 2006 16:03:39 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu ident=lists) by malifon.math.uh.edu with smtp (Exim 3.20 #1) id 1F1mBJ-0005hE-00; Wed, 25 Jan 2006 09:03:33 -0600 Original-Received: from nas01.math.uh.edu ([129.7.128.39]) by malifon.math.uh.edu with esmtp (Exim 3.20 #1) id 1F1mAu-0005gy-00 for ding@lists.math.uh.edu; Wed, 25 Jan 2006 09:03:08 -0600 Original-Received: from quimby.gnus.org ([80.91.224.244]) by nas01.math.uh.edu with esmtp (Exim 4.52) id 1F1mAq-0003Ih-My for ding@lists.math.uh.edu; Wed, 25 Jan 2006 09:03:07 -0600 Original-Received: from main.gmane.org ([80.91.229.2] helo=ciao.gmane.org) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1F1mAp-0003fi-00 for ; Wed, 25 Jan 2006 16:03:03 +0100 Original-Received: from list by ciao.gmane.org with local (Exim 4.43) id 1F1m9b-0005Jg-OD for ding@gnus.org; Wed, 25 Jan 2006 16:01:47 +0100 Original-Received: from bridgekeeper.physik.uni-ulm.de ([134.60.10.123]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 25 Jan 2006 16:01:47 +0100 Original-Received: from Reiner.Steib by bridgekeeper.physik.uni-ulm.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 25 Jan 2006 16:01:47 +0100 X-Injected-Via-Gmane: http://gmane.org/ Mail-Followup-To: ding@gnus.org Original-To: ding@gnus.org Original-Lines: 105 Original-X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: bridgekeeper.physik.uni-ulm.de X-Face: 'bg&jY[8V'W&:=~6w"|>}#4/T;w~36ei4NNMyKRR.a$n=$|sWFPF1y]a\>6kc\*#GN]UDM| Ywv,vbL^XF1nIp\:F=$Ei2o&mEe:%N~,:3]vtQ~s9u$9izmX$IF@VgGl7/,^dbuM<3|AO2}.%|%?kZ 2Y=@\U!~cll^=8Z9ihKq%wmUe1Ky(#kl3T'>Qk0Ia3mCBsTk?E(,X Mail-Copies-To: nobody User-Agent: Gnus/5.110004 (No Gnus v0.4) Emacs/22.0.50 (gnu/linux) Cancel-Lock: sha1:FHBuQPoWKJZXzVQWi4wqaYeScvI= X-Spam-Score: -2.5 (--) Precedence: bulk Original-Sender: ding-owner@lists.math.uh.edu Xref: news.gmane.org gmane.emacs.gnus.general:61767 Archived-At: On Sun, Jan 22 2006, Hynek Schlawack wrote: > * Reiner Steib wrote: > >> JFTR: It failed with "Mail doesn't contain a HTML-part!" on the >> following forwarded message: [...] > Hm, would you mind to forward some look-a-like to me? I will sent you a look-alike off-list. >> I think (when your assignment is completed), > > It's up to our patience right now. ;) > >> we should add both functions to `gnus-art.el' and add a key binding >> (suggestions?) > > Well, _I_ use "v", but I guess I won't be able to push that. ;) The very few remaining single letter keys should be reserved for very frequently used commands. In fact, `v' is a good candidate for a (prefix) key we could reserve for the user in Gnus, see . >>> (let ((showed)) >> Maybe "done" instead of "showed"? > > I'm not sure whether "done" exactly reflects the purpose of "showed". I didn't read the code very carefully, so I probably misunderstood its purpose. >>> (make-temp-name "/tmp/gnus-html-") >>> (user-login-name)))) >> >> (mm-make-temp-file (expand-file-name "mm" mm-tmp-directory) nil ".html") >> Maybe even (convert-standard-filename (mm-make-temp-file ...)) like >> in `browse-url-of-buffer' is required? > > Uhm, so what's your final suggestion here? :) I looked at `browse-url-of-buffer' and saw that there we have (Emacs 22 / CVS): (setq browse-url-temp-file-name (convert-standard-filename (make-temp-file (expand-file-name "burl" browse-url-temp-dir) nil ".html"))) The doc string says: ,----[ f convert-standard-filename RET ] | convert-standard-filename is a compiled Lisp function in `files.el'. | (convert-standard-filename filename) | | Convert a standard file's name to something suitable for the OS. | This means to guarantee valid names and perhaps to canonicalize | certain patterns. | | filename should be an absolute file name since the conversion rules | sometimes vary depending on the position in the file name. E.g. c:/foo | is a valid DOS file name, but c:/bar/c:/foo is not. | | This function's standard definition is trivial; it just returns | the argument. However, on Windows and DOS, replace invalid | characters. On DOS, make sure to obey the 8.3 limitations. On | Windows, turn Cygwin names into native names, and also turn | slashes into backslashes if the shell requires it (see | `w32-shell-dos-semantics'). | | See Info node `(elisp)Standard File Names' for more details. `---- We don't use `convert-standard-filename' at all in Gnus upto now. I don't use those systems (Windows, DOS, Cygwin) so I'm not sure if we also need to add `convert-standard-filename' when we use `mm-make-temp-file' in Gnus. Maybe the use in `browse-url-of-buffer' isn't necessary? >>> "View HTML-parts of the current Gnus-Article in a graphical browser." >> >> "View \"text/html\" parts of the current article with a WWW browser." >> See `C-h f browse-url RET'. > > Ehm, for what exactly? Well, "graphical browser" might not be correct, depending on the user's environment and preferences. ,----[ f browse-url RET ] | browse-url is an interactive autoloaded Lisp function in `browse-url'. | (browse-url url &rest args) | | Ask a WWW browser to load url. | Prompts for a url, defaulting to the url at or before point. Variable | `browse-url-browser-function' says which browser to use. `---- Bye, Reiner. -- ,,, (o o) ---ooO-(_)-Ooo--- | PGP key available | http://rsteib.home.pages.de/