emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Joseph Vidal-Rosset <joseph.vidal.rosset@gmail.com>
To: Nick Dokos <ndokos@gmail.com>
Cc: "Liste-emacs-orgmode@gnu.org" <emacs-orgmode@gnu.org>
Subject: Re: autoinsert
Date: Fri, 8 Jun 2018 09:38:04 +0200	[thread overview]
Message-ID: <CAD-VTcHWkGYh9oY7SL8MM97P_FHy0y4gdXL0z6CusLQqOsFNZA@mail.gmail.com> (raw)
In-Reply-To: <87r2lhn36h.fsf@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1189 bytes --]

obvious correction:

(auto-insert-mode)  ;;; Adds hook to find-files-hook
    (setq auto-insert-directory "~/.mytemplates/") ;;; Or use custom,
*NOTE* Trailing slash important
    (setq auto-insert-query nil) ;;; If you don't want to be prompted
before insertion
    (define-auto-insert "\.py" "my-python-template.py")
    (define-auto-insert "\.php" "my-php-template.php")


the "#+BEGIN_QUOTE " did not belong to the code that I wanted to quote.

2018-06-08 9:32 GMT+02:00 Joseph Vidal-Rosset <joseph.vidal.rosset@gmail.com
>:

> Hello,
>
> A solution to my problem was indeed given in this web page
> https://www.emacswiki.org/emacs/AutoInsertMode:
>
> #+BEGIN_QUOTE
> (auto-insert-mode)  ;;; Adds hook to find-files-hook
>     (setq auto-insert-directory "~/.mytemplates/") ;;; Or use custom, *NOTE* Trailing slash important
>     (setq auto-insert-query nil) ;;; If you don't want to be prompted before insertion
>     (define-auto-insert "\.py" "my-python-template.py")
>     (define-auto-insert "\.php" "my-php-template.php")
>
> It should not be too difficult, even for me, to adapt this code that I
> just tested.
>
> Best wishes,
> –
> Jo.
>

[-- Attachment #2: Type: text/html, Size: 2060 bytes --]

  reply	other threads:[~2018-06-08  7:38 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-07 17:16 autoinsert Joseph Vidal-Rosset
2018-06-07 21:06 ` autoinsert Nick Dokos
2018-06-08  7:12   ` autoinsert Joseph Vidal-Rosset
2018-06-08  7:32     ` autoinsert Joseph Vidal-Rosset
2018-06-08  7:38       ` Joseph Vidal-Rosset [this message]
2018-06-08  8:37         ` autoinsert Joseph Vidal-Rosset
2018-06-09  9:57           ` autoinsert Eric S Fraga

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.orgmode.org/

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

  git send-email \
    --in-reply-to=CAD-VTcHWkGYh9oY7SL8MM97P_FHy0y4gdXL0z6CusLQqOsFNZA@mail.gmail.com \
    --to=joseph.vidal.rosset@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=ndokos@gmail.com \
    /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.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

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).