Re: [O] autoinsert

2018-06-09 Thread Eric S Fraga
On Friday, 8 Jun 2018 at 10:37, Joseph Vidal-Rosset wrote: [...] > That is certainly trivial for a lot of people in this list (and I > apologize), but maybe it will be helpful for others. Thanks for this. I had the same query but had not got around to seeing if it was possible. Saved me some

Re: [O] autoinsert

2018-06-08 Thread Joseph Vidal-Rosset
Hello, Here is the adaptation of the previous lines of code that works in my setup (the web page [[https://www.emacswiki.org/emacs/RegularExpression]] was helpful): #+BEGIN_SRC (require 'autoinsert) (auto-insert-mode) ;;; Adds hook to find-files-hook (setq auto-insert-directory "~/MEGA

Re: [O] autoinsert

2018-06-08 Thread Joseph Vidal-Rosset
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-p

Re: [O] autoinsert

2018-06-08 Thread Joseph Vidal-Rosset
Hello, A solution to my problem was indeed given in this web page [[https://www.emacswiki.org/emacs/AutoInsertMode]]: #+BEGIN_SRC #+BEGIN_QUOTE (auto-insert-mode) ;;; Adds hook to find-files-hook (setq auto-insert-directory "~/.mytemplates/") ;;; Or use custom, *NOTE* Traili

Re: [O] autoinsert

2018-06-08 Thread Joseph Vidal-Rosset
Le jeu. 07 juin 2018 à 05:06:20 , Nick Dokos a envoyé ce message: #+BEGIN_QUOTE > Are you producing the beamer presentations, the papers, etc. from org > files? If so, isn't the org-mode insertion enough? If not, why not? #+END_QUOTE Many thanks for your question. Yes, I am now always using org-

Re: [O] autoinsert

2018-06-07 Thread Nick Dokos
Joseph Vidal-Rosset writes: > Hello, > > To get an .org file with my .bib links I’m using this code in my user.el > (i.e. init.el): > > (require 'autoinsert) > (push '(org-mode . "/home/joseph/MEGA/org/orgskeleton.org") auto-insert-alist) > (add-hook 'find-file-hook 'auto-insert) > > in this org

[O] autoinsert

2018-06-07 Thread Joseph Vidal-Rosset
Hello, To get an .org file with my .bib links I'm using this code in my user.el (i.e. init.el): #+BEGIN_SRC (require 'autoinsert) (push '(org-mode . "/home/joseph/MEGA/org/orgskeleton.org") auto-insert-alist) (add-hook 'find-file-hook 'auto-insert) #+END_SRC in this orgskeleton.org there is