From mboxrd@z Thu Jan 1 00:00:00 1970 From: Joseph Vidal-Rosset Subject: Re: autoinsert Date: Fri, 8 Jun 2018 09:38:04 +0200 Message-ID: References: <87muw6ldp5.fsf@gmail.com> <87k1rab92r.fsf@alphaville.usersys.redhat.com> <87a7s5wy47.fsf@gmail.com> <87r2lhn36h.fsf@gmail.com> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="00000000000033aa03056e1c7c63" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:33050) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fRBye-0006YQ-74 for emacs-orgmode@gnu.org; Fri, 08 Jun 2018 03:38:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fRByd-0007Iu-4R for emacs-orgmode@gnu.org; Fri, 08 Jun 2018 03:38:28 -0400 Received: from mail-lf0-x229.google.com ([2a00:1450:4010:c07::229]:39230) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fRByc-0007IV-RX for emacs-orgmode@gnu.org; Fri, 08 Jun 2018 03:38:27 -0400 Received: by mail-lf0-x229.google.com with SMTP id t134-v6so18582974lff.6 for ; Fri, 08 Jun 2018 00:38:26 -0700 (PDT) In-Reply-To: <87r2lhn36h.fsf@gmail.com> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: Nick Dokos Cc: "Liste-emacs-orgmode@gnu.org" --00000000000033aa03056e1c7c63 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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 : > 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, *NO= TE* Trailing slash important > (setq auto-insert-query nil) ;;; If you don't want to be prompted bef= ore 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, > =E2=80=93 > Jo. > --00000000000033aa03056e1c7c63 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
obvious correction:
(auto-insert-mode)  ;;; =
Adds hook to find-files-hook
    (setq auto-insert-directory "~/.mytemplates/") ;;; Or use cus=
tom, *NOTE* Trailing slash important
    (setq auto-insert-query nil) ;;; If you don't want to be prompted b=
efore insertion
    (define-auto-insert "\.py" "my-python-template.py")
    (define-auto-insert "\.php" "my-php-template.php")<=
/pre>
the "#+BEGIN_QUOTE " did not belon= g to the code that I wanted to quote.
=
2018-06-08 9:32 GMT+02:00 Joseph Vidal-Rosse= t <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 cus=
tom, *NOTE* Trailing slash important
    (setq auto-insert-query nil) ;;; If you don't want to be prompted b=
efore 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,
=E2=80=93
Jo.


--00000000000033aa03056e1c7c63--