From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/41391 Path: main.gmane.org!not-for-mail From: Kai.Grossjohann@CS.Uni-Dortmund.DE (Kai =?iso-8859-1?q?Gro=DFjohann?=) Newsgroups: gmane.emacs.gnus.general Subject: Re: format-spec.el: feature wish Date: Wed, 02 Jan 2002 13:25:11 +0100 Sender: owner-ding@hpc.uh.edu Message-ID: References: NNTP-Posting-Host: coloc-standby.netfonds.no Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: main.gmane.org 1035176793 5854 80.91.224.250 (21 Oct 2002 05:06:33 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 21 Oct 2002 05:06:33 +0000 (UTC) Return-Path: Original-Received: (qmail 18388 invoked from network); 2 Jan 2002 12:26:59 -0000 Original-Received: from malifon.math.uh.edu (mail@129.7.128.13) by mastaler.com with SMTP; 2 Jan 2002 12:26:59 -0000 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 16LkT7-0007lR-00; Wed, 02 Jan 2002 06:26:05 -0600 Original-Received: by sina.hpc.uh.edu (TLB v0.09a (1.20 tibbs 1996/10/09 22:03:07)); Wed, 02 Jan 2002 06:25:57 -0600 (CST) Original-Received: from sclp3.sclp.com (qmailr@sclp3.sclp.com [209.196.61.66]) by sina.hpc.uh.edu (8.9.3/8.9.3) with SMTP id GAA22035 for ; Wed, 2 Jan 2002 06:25:46 -0600 (CST) Original-Received: (qmail 18363 invoked by alias); 2 Jan 2002 12:25:48 -0000 Original-Received: (qmail 18358 invoked from network); 2 Jan 2002 12:25:48 -0000 Original-Received: from waldorf.cs.uni-dortmund.de (129.217.4.42) by gnus.org with SMTP; 2 Jan 2002 12:25:48 -0000 Original-Received: from lothlorien.cs.uni-dortmund.de (lothlorien [129.217.19.67]) by waldorf.cs.uni-dortmund.de with ESMTP id g02CPKb26623 for ; Wed, 2 Jan 2002 13:25:21 +0100 (MET) Original-Received: from lucy.cs.uni-dortmund.de (lucy [129.217.19.80]) by lothlorien.cs.uni-dortmund.de id NAA17530; Wed, 2 Jan 2002 13:25:15 +0100 (MET) Original-Received: by lucy.cs.uni-dortmund.de (Postfix, from userid 6104) id 92AB03B03C; Wed, 2 Jan 2002 13:25:11 +0100 (CET) Original-To: ding@gnus.org In-Reply-To: (Lars Magne Ingebrigtsen's message of "Mon, 31 Dec 2001 07:24:41 +0100") Original-Lines: 37 User-Agent: Gnus/5.090005 (Oort Gnus v0.05) Emacs/21.1.50 (i686-pc-linux-gnu) Precedence: list X-Majordomo: 1.94.jlt7 Xref: main.gmane.org gmane.emacs.gnus.general:41391 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:41391 Lars Magne Ingebrigtsen writes: > Kai.Grossjohann@CS.Uni-Dortmund.DE (Kai Gro=DFjohann) writes: > >> Right now, it appears that the SPECIFICATION argument of FORMAT-SPEC >> should be an alist where the keys are characters and the values are >> strings. >> >> WIBNI the values could be something else, too, which would then be >> evaluated? >> >> Since anything but strings as values aren't useful at the moment, this >> would be upward compatible. > > How would you use this? I'm having difficulty envisioning what you > could express with this that you can't do (easier) with the specs > themselves... (defvar silly-format-spec '((?t . (current-time-string)) (?l . (user-login-name))) "foo") (defvar silly-format "%l on %t" "bar") (defun silly-insert (msg) (insert (format-spec silly-format silly-format-spec) " " msg)) Well. Hm. Maybe this is indeed very silly, but I hope you get the point. With the current mechanism, I have to construct the format spec on the fly, ie, on every invocation of silly-insert. But with my new proposed mechanism, silly-format-spec could be a variable. kai --=20 Simplification good! Oversimplification bad! (Larry Wall)