From mboxrd@z Thu Jan 1 00:00:00 1970 From: Joseph Vidal-Rosset Subject: Re: default file for any .org file Date: Thu, 19 Oct 2017 15:38:41 +0200 Message-ID: References: <8760bb4o3k.fsf@coli.uni-saarland.de> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="94eb2c1cc6a6a5400e055be67a88" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:40487) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e5B2P-0006IM-EL for emacs-orgmode@gnu.org; Thu, 19 Oct 2017 09:39:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e5B2N-0002zV-Jl for emacs-orgmode@gnu.org; Thu, 19 Oct 2017 09:39:05 -0400 Received: from mail-lf0-x22a.google.com ([2a00:1450:4010:c07::22a]:49687) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1e5B2N-0002z1-7H for emacs-orgmode@gnu.org; Thu, 19 Oct 2017 09:39:03 -0400 Received: by mail-lf0-x22a.google.com with SMTP id w21so9674778lfc.6 for ; Thu, 19 Oct 2017 06:39:03 -0700 (PDT) In-Reply-To: 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: Fabrice Popineau Cc: "Liste-emacs-orgmode@gnu.org" , =?UTF-8?Q?S=C3=A9bastien_Le_Maguer?= --94eb2c1cc6a6a5400e055be67a88 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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=C3=A9bastien: (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 : > 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 < > joseph.vidal.rosset@gmail.com>: > >> Many thanks S=C3=A9bastien ! 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=C3=A9bastien Le Maguer < >> slemaguer@coli.uni-saarland.de>: >> >>> Hello, >>> >>> If I understand well, you are looking for a template. On my side, I use= d >>> 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 >>> "/third_parties/templates". I let you adapt but >>> technically it should work with many adaptations. >>> >>> Kind regards, >>> S=C3=A9bastien >>> >>> >>> >>> >>> >>> On Thu, Oct 19 2017 (06:55), Joseph Vidal-Rosset < >>> joseph.vidal.rosset@gmail.com> wrote: >>> >>> Hello the list, >>>> >>>> I apologize if the reply to my question has already be given here of i= f >>>> 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 >>> >>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >>> Dr. S=C3=A9bastien 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=C3=BCcken >>> Germany >>> >>> phone : +49-681-302-70030 <+49%20681%2030270030> >>> Mail: slemaguer@coli.uni-saarland.de >>> website : http://www.coli.uni-saarland.de/~slemaguer/ >>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >>> >>> >> > > > -- > Fabrice Popineau > ----------------------------- > SUPELEC > D=C3=A9partement Informatique > 3, rue Joliot Curie > > 91192 Gif/Yvette Cedex > Tel direct : +33 (0) 169851950 <01%2069%2085%2019%2050> > Standard : +33 (0) 169851212 <01%2069%2085%2012%2012> > ------------------------------ > > --94eb2c1cc6a6a5400e055be67a88 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hello again,

I am sorry to say that there is certainly something that = I do not understand. I have defined a f= irstemplate.org file in "/home/joseph/MEGA/git/scimax/user/"= =C2=A0 and I have adapted your code in my user.el, S=C3=A9bastien:

(use-package yatemplate
=C2= =A0=C2=A0 :ensure t
=C2=A0=C2=A0 :after yasnippet
=C2=A0=C2=A0 :confi= g

=C2=A0=C2=A0 ;; Define template directory
=C2=A0=C2=A0 (setq ya= template-dir (concat config-basedir=C2=A0=C2=A0=C2=A0 "/home/joseph/ME= GA/git/scimax/user/firstemplate.org= "))

=C2=A0=C2=A0 ;; Coupling with auto-insert

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

But it does not work f= or me. If I create a new .org file, I do not see the wanted lines that refe= r to my orgref.bib=C2=A0 file...

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

I need at least = a more precise example.

Best wishes

Jo.
<= /div>

2017-10-19 1= 0:54 GMT+02:00 Fabrice Popineau <fabrice.popineau@supelec.fr= >:
More flexib= le imho : use a #+setupfile: directive.

#+setupfile: my-setup.org
<= br>

Fabrice

2017-10-19 9:12 = GMT+02:00 Joseph Vidal-Rosset <joseph.vidal.rosset@gmail.com>:
Many thanks S=C3=A9bastien ! 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 thank= ful to you, for your quick and certainly helpful reply.

Best wishes

Jo.

Hello,

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

=C2=A0(use-package yatemplate
=C2=A0 =C2=A0:ensure t
=C2=A0 =C2=A0:after yasnippet
=C2=A0 =C2=A0:config

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

=C2=A0 =C2=A0;; Coupling with auto-insert

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

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

Kind regards,
S=C3=A9bastien





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

=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D
Dr. S=C3=A9bastien Le Maguer
Postdoctorate researcher
Co-chair of SYNSIG (https://synsig.org/index.php/Main_Pa= ge)

Saarland University
Campus C7.4 - room 2.03
D-66123 Saarbr=C3=BCcken
Germany

phone : +49-681-302-70030
Mail: s= lemaguer@coli.uni-saarland.de
website :=C2=A0 http://www.coli.uni-saarland.de/~sle= maguer/
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D





--
Fabrice Popineau
-----------------------------
SUPELEC=
D=C3=A9partement Informatique
91192 Gif/Yvette Cedex
Tel direct : = +33 (0) 169851950
Standard : +33 (0) 169851212<= /div>
------------------------------


--94eb2c1cc6a6a5400e055be67a88--