From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/49324 Path: main.gmane.org!not-for-mail From: Simon Josefsson Newsgroups: gmane.emacs.gnus.general Subject: Re: gnus-convert-image-to-face-command Date: Fri, 17 Jan 2003 09:56:08 +0100 Sender: owner-ding@hpc.uh.edu Message-ID: References: <87vg0p9nep.fsf@orebokech.com> <87lm1lklch.fsf@orebokech.com> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1042793748 535 80.91.224.249 (17 Jan 2003 08:55:48 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Fri, 17 Jan 2003 08:55:48 +0000 (UTC) Return-path: Original-Received: from malifon.math.uh.edu ([129.7.128.13]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 18ZSHy-00008U-00 for ; Fri, 17 Jan 2003 09:55:46 +0100 Original-Received: from sina.hpc.uh.edu ([129.7.128.10] ident=lists) by malifon.math.uh.edu with esmtp (Exim 3.20 #1) id 18ZSIf-0004Rn-00; Fri, 17 Jan 2003 02:56:29 -0600 Original-Received: by sina.hpc.uh.edu (TLB v0.09a (1.20 tibbs 1996/10/09 22:03:07)); Fri, 17 Jan 2003 02:57:26 -0600 (CST) Original-Received: from sclp3.sclp.com (sclp3.sclp.com [66.230.238.2]) by sina.hpc.uh.edu (8.9.3/8.9.3) with SMTP id CAA15709 for ; Fri, 17 Jan 2003 02:57:12 -0600 (CST) Original-Received: (qmail 918 invoked by alias); 17 Jan 2003 08:56:11 -0000 Original-Received: (qmail 913 invoked from network); 17 Jan 2003 08:56:11 -0000 Original-Received: from 178.230.13.217.in-addr.dgcsystems.net (HELO yxa.extundo.com) (217.13.230.178) by 66.230.238.6 with SMTP; 17 Jan 2003 08:56:11 -0000 Original-Received: from latte.josefsson.org (yxa.extundo.com [217.13.230.178]) (authenticated bits=0) by yxa.extundo.com (8.12.6/8.12.6) with ESMTP id h0H8u8Rr016128 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO) for ; Fri, 17 Jan 2003 09:56:08 +0100 Original-To: ding@gnus.org Mail-Copies-To: nobody X-Payment: hashcash 1.1 0:030117:ding@gnus.org:d2320d0cafd38319 X-Hashcash: 0:030117:ding@gnus.org:d2320d0cafd38319 In-Reply-To: <87lm1lklch.fsf@orebokech.com> (Romain FRANCOISE's message of "Thu, 16 Jan 2003 19:20:30 +0100") User-Agent: Gnus/5.090013 (Oort Gnus v0.13) XEmacs/21.4 (Portable Code, i686-pc-linux) X-Face: FmU60_S;07.b/mq$mN4i[hYDH,9?'f\&F~>ROKqqN6'k$rh#oKV}|(Ol8$)L4`#XB"b|Tnu J"{VKSYBqieg/2&a.0pI2[7A\9*s+=%Zq\^> writes: > Simon Josefsson writes: > >> The user may change the command to use jpegtopnm or something entirely >> different, and then the variable documentation would be confusing. If >> the user isn't supposed to be able to alter the command, perhaps it >> should be made into a constant. > > Ah! Yes, good point. I really don't know if the user is supposed to > change the command, I guess if there's only one way to do it, he doesn't > need to. The alternative Gnus motto might be: There Should Always Be Another Way To Do It. >> What do you think of the following solution as a compromise? > >> "Command for converting an image to an X-Face. >> The default is to convert from GIF images by using giftopnm and some >> other programs." > > I think we must at least give the expected image format in the functions > docstrings, so that the user knows what file to give at the prompt, > otherwise she'll be confused. Your suggestion looks fine, can you cook > something up for the function definitions as well? The docstring isn't shown with the prompt, is it? But indicating this in the prompt is probably more useful. Ok: Index: gnus-fun.el =================================================================== RCS file: /usr/local/cvsroot/gnus/lisp/gnus-fun.el,v retrieving revision 6.34 retrieving revision 6.35 diff -u -p -r6.34 -r6.35 --- gnus-fun.el 2003/01/17 06:57:45 6.34 +++ gnus-fun.el 2003/01/17 09:02:08 6.35 @@ -36,12 +36,16 @@ :type 'string) (defcustom gnus-convert-image-to-x-face-command "giftopnm %s | ppmnorm | pnmscale -width 48 -height 48 | ppmtopgm | pgmtopbm | pbmtoxbm | compface" - "Command for converting an image to an X-Face." + "Command for converting an image to an X-Face. +By default it takes a GIF filename and output the X-Face header data +on stdout." :group 'gnus-fun :type 'string) (defcustom gnus-convert-image-to-face-command "djpeg %s | ppmnorm | pnmscale -width 48 -height 48 | ppmquant %d | pnmtopng" - "Command for converting an image to an X-Face." + "Command for converting an image to an Face. +By default it takes a JPEG filename and output the Face header data +on stdout." :group 'gnus-fun :type 'string) @@ -86,7 +90,7 @@ Output to the current buffer, replace te ;;;###autoload (defun gnus-x-face-from-file (file) "Insert an X-Face header based on an image file." - (interactive "fImage file name: ") + (interactive "fImage file name (by default GIF): ") (when (file-exists-p file) (gnus-shell-command-to-string (format gnus-convert-image-to-x-face-command @@ -95,7 +99,7 @@ Output to the current buffer, replace te ;;;###autoload (defun gnus-face-from-file (file) "Return an Face header based on an image file." - (interactive "fImage file name: ") + (interactive "fImage file name (by default JPEG): ") (when (file-exists-p file) (let ((done nil) (attempt "")