[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: auto-insert-alist
From: |
DrMemory |
Subject: |
Re: auto-insert-alist |
Date: |
Thu, 15 Jul 2004 21:39:32 GMT |
User-agent: |
slrn/0.9.5.7 (UNIX) |
On Thu, 15 Jul 2004 09:54:11 -0600, Kevin Rodgers <ihs_4664@yahoo.com> wrote:
>
>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].
>
I'm sort of an elisp novice, but this seems to be the relevant code
from autoinsert.el:
;; Now, if we found something, do it
(and action
(if (stringp action)
(file-readable-p (concat auto-insert-directory action))
t)
(if auto-insert-query
(or (if (eq auto-insert-query 'function)
(eq this-command 'auto-insert))
(y-or-n-p (format auto-insert-prompt desc)))
t)
(mapcar
(lambda (action)
(if (stringp action)
(if (file-readable-p
(setq action (concat auto-insert-directory action)))
(insert-file-contents action))
[...]
Looks to me as if the "absolute filename" option is illusory, and any file
to be inserted would have to be given relative to auto-insert-directory.