emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] autoinsert


From: Joseph Vidal-Rosset
Subject: Re: [O] autoinsert
Date: Fri, 8 Jun 2018 09:38:04 +0200

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 <address@hidden>:

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.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]