emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [O] default file for any .org file


From: Joseph Vidal-Rosset
Subject: Re: [O] default file for any .org file
Date: Thu, 19 Oct 2017 15:38:41 +0200

Hello again,

I am sorry to say that there is certainly something that I do not understand. I have defined a firstemplate.org file in "/home/joseph/MEGA/git/scimax/user/"  and I have adapted your code in my user.el, Sébastien:

(use-package yatemplate
   :ensure t
   :after yasnippet
   :config

   ;; Define template directory
   (setq yatemplate-dir (concat config-basedir    "/home/joseph/MEGA/git/scimax/user/firstemplate.org"))

   ;; Coupling with auto-insert

   (setq auto-insert-alist nil)
   (yatemplate-fill-alist)
   (add-hook 'find-file-hook 'auto-insert)
   )

But it does not work for me. If I create a new .org file, I do not see the wanted lines that refer to my orgref.bib  file...

Same thing with Fabrice's solution.  "Chou blanc ... " :(

I need at least a more precise example.

Best wishes

Jo.

2017-10-19 10:54 GMT+02:00 Fabrice Popineau <address@hidden>:
More flexible imho : use a #+setupfile: directive.

#+setupfile: my-setup.org

http://orgmode.org/manual/In_002dbuffer-settings.html

Fabrice

2017-10-19 9:12 GMT+02:00 Joseph Vidal-Rosset <address@hidden>:
Many thanks Sébastien ! You understood perfectly what I am looking for. I am going to test your solution and I will be back to inform you.

Again, I am thankful to you, for your quick and certainly helpful reply.

Best wishes

Jo.

2017-10-19 9:02 GMT+02:00 Sébastien Le Maguer <address@hiddene>:
Hello,

If I understand well, you are looking for a template. On my side, I used yatemplate coupled with auto-insert. Here is the part of configuration I have:

 (use-package yatemplate
   :ensure t
   :after yasnippet
   :config

   ;; Define template directory
   (setq yatemplate-dir (concat config-basedir    "/third_parties/templates"))

   ;; Coupling with auto-insert

   (setq auto-insert-alist nil)
   (yatemplate-fill-alist)
   (add-hook 'find-file-hook 'auto-insert)
   )

I use a template like the one attached which is place on the directory "<config-basedir>/third_parties/templates". I let you adapt but technically it should work with many adaptations.

Kind regards,
Sébastien





On Thu, Oct 19 2017 (06:55), Joseph Vidal-Rosset <address@hidden> wrote:

Hello the list,

I apologize if the reply to my question has already be given here of if it
is in the org-mode website.

I would be happy to get in advance,  for any new .org file that I am going
to create, some properties given by default, for example the following
links for .bib file:


bibliography:/home/joseph/MEGA/org/reforg.bib
bibliographystyle:smfplain

and others things that I am always constrained to copy from previous .org
files and paste in the new one.

Your suggestions and your help will be very welcome,

Joseph


--
Save our in-boxes! http://emailcharter.org

================================================================================
Dr. Sébastien Le Maguer
Postdoctorate researcher
Co-chair of SYNSIG (https://synsig.org/index.php/Main_Page)

Saarland University
Campus C7.4 - room 2.03
D-66123 Saarbrücken
Germany

phone : +49-681-302-70030
Mail: address@hidden
website :  http://www.coli.uni-saarland.de/~slemaguer/
================================================================================





--
Fabrice Popineau
-----------------------------
SUPELEC
Département Informatique
91192 Gif/Yvette Cedex
Tel direct : +33 (0) 169851950
------------------------------



reply via email to

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