From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Kevin Rodgers Newsgroups: gmane.emacs.help Subject: Re: auto-insert-alist Date: Thu, 15 Jul 2004 09:54:11 -0600 Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: <40F6A8A3.5050908@yahoo.com> References: <40F573E4.4020400@yahoo.com> <%WfJc.12$VQ1.7@fe25.usenetserver.com> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1089907461 28734 80.91.224.253 (15 Jul 2004 16:04:21 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 15 Jul 2004 16:04:21 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Jul 15 18:04:13 2004 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1Bl8e7-0003wJ-00 for ; Thu, 15 Jul 2004 17:59:43 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1Bl8gb-0000Ft-31 for geh-help-gnu-emacs@m.gmane.org; Thu, 15 Jul 2004 12:02:17 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!fu-berlin.de!uni-berlin.de!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 41 Original-X-Trace: news.uni-berlin.de D9NKE3FIU/lLNdZ25URynQ0eR1MvFCmfnhpVGzxtkWmComULs= User-Agent: Mozilla/5.0 (X11; U; SunOS i86pc; en-US; rv:0.9.4.1) Gecko/20020406 Netscape6/6.2.2 X-Accept-Language: en-us Original-Xref: shelby.stanford.edu gnu.emacs.help:124315 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:19650 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:19650 DrMemory wrote: > On Wed, 14 Jul 2004 11:56:52 -0600, Kevin Rodgers wrote: >>Maybe the ~ needs to be explicitly expanded; does this work: >> >>(setq auto-insert-alist >> (cons `((".*ltr.*\\.tex$" . "Letter") . ,(expand-file-name >> "~/leg/ltr.tex")) >> auto-insert-alist)) > > Using expand-file-name does result in being prompted for > auto-insertion; however, what gets inserted is again the file-name > instead of the contents, just as happened when I tried > insert-file-contents! Sigh. I guess I'll have to go back and re-learn > how to write a template. This must be an error in the documentation or > else I'm just not reading it correctly? I think it is a bug. The documentation is very clear: | A list specifying text to insert by default into a new file. | Elements look like (CONDITION . ACTION) or ((CONDITION . DESCRIPTION) . ACTION). | CONDITION maybe a regexp that must match the new file's name, or it may be | a symbol that must match the major mode for this element to apply. | Only the first matching element is effective. | Optional DESCRIPTION is a string for filling `auto-insert-prompt'. | ACTION may be a skeleton to insert (see `skeleton-insert'), an absolute | file-name or one relative to `auto-insert-directory' or a function to call. | ACTION may also be a vector containing several successive single actions as | described above, e.g. ["header.insert" date-and-author-update]. And the default value includes elements like: ("[Mm]akefile\\'" . "makefile.inc") which should be equivalent to: (("[Mm]akefile\\'" . "make rule file") . "makefile.inc") -- Kevin Rodgers