unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: drmemory@starband.net (DrMemory)
Subject: Re: auto-insert-alist
Date: Thu, 15 Jul 2004 21:39:32 GMT	[thread overview]
Message-ID: <oQCJc.77$VQ1.33@fe25.usenetserver.com> (raw)
In-Reply-To: 40F6A8A3.5050908@yahoo.com

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.

  reply	other threads:[~2004-07-15 21:39 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-07-14 16:36 auto-insert-alist DrMemory
2004-07-14 17:41 ` auto-insert-alist kgold
2004-07-14 17:56 ` auto-insert-alist Kevin Rodgers
2004-07-14 19:36   ` auto-insert-alist DrMemory
2004-07-15 15:54     ` auto-insert-alist Kevin Rodgers
2004-07-15 21:39       ` DrMemory [this message]
2004-07-15 23:38         ` auto-insert-alist Kevin Rodgers
2004-07-16 21:01           ` auto-insert-alist DrMemory
2004-07-16 21:55             ` auto-insert-alist Kevin Rodgers

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='oQCJc.77$VQ1.33@fe25.usenetserver.com' \
    --to=drmemory@starband.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).