From mboxrd@z Thu Jan 1 00:00:00 1970 From: Fabrice Popineau Subject: Re: default file for any .org file Date: Thu, 19 Oct 2017 17:15:23 +0200 Message-ID: References: <8760bb4o3k.fsf@coli.uni-saarland.de> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="f40304378874748d27055be7d482" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:35873) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e5CY3-0003Aw-62 for emacs-orgmode@gnu.org; Thu, 19 Oct 2017 11:15:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e5CXz-0002ot-Rm for emacs-orgmode@gnu.org; Thu, 19 Oct 2017 11:15:51 -0400 Received: from smtp2.supelec.fr ([160.228.120.31]:49226) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e5CXz-0002oG-HP for emacs-orgmode@gnu.org; Thu, 19 Oct 2017 11:15:47 -0400 Received: from localhost (localhost [127.0.0.1]) by smtp2.supelec.fr (Postfix) with ESMTP id 5D89D80574 for ; Thu, 19 Oct 2017 17:15:45 +0200 (CEST) Received: from smtp2.supelec.fr ([127.0.0.1]) by localhost (smtp2.supelec.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id xqB8Rcb61PYc for ; Thu, 19 Oct 2017 17:15:44 +0200 (CEST) Received: from mail-qt0-f176.google.com (mail-qt0-f176.google.com [209.85.216.176]) by smtp2.supelec.fr (Postfix) with ESMTPSA id 5A31D80575 for ; Thu, 19 Oct 2017 17:15:44 +0200 (CEST) Received: by mail-qt0-f176.google.com with SMTP id h4so14828167qtk.8 for ; Thu, 19 Oct 2017 08:15:44 -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: Joseph Vidal-Rosset Cc: "Liste-emacs-orgmode@gnu.org" , =?UTF-8?Q?S=C3=A9bastien_Le_Maguer?= --f40304378874748d27055be7d482 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 2017-10-19 15:38 GMT+02:00 Joseph Vidal-Rosset < joseph.vidal.rosset@gmail.com>: > 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 th= e > wanted lines that refer to my orgref.bib file... > > Same thing with Fabrice's solution. "Chou blanc ... " :( > > If you add your setup by #+setupfile: my-setup.org you need to refresh it by C-c C-c on this line. You won't see the content of my-setup.org, but it will be active in your current orf buffer. Fabrice --f40304378874748d27055be7d482 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


2017-10-19 15:38 GMT+02:00 Joseph Vidal-Rosset <joseph.vid= al.rosset@gmail.com>:
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/sci= max/user/"=C2=A0 and I have adapted your code in my user.el, S=C3= =A9bastien:

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

=C2= =A0=C2=A0 ;; Define template directory
=C2=A0=C2=A0 (setq yatempl= ate-dir (concat config-basedir=C2=A0=C2=A0=C2=A0 "/home/joseph/MEGA/gi= t/scimax/user/fi= rstemplate.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 for me.= If I create a new .org file, I do not see the wanted lines that refer to m= y orgref.bib=C2=A0 file...

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


If you add your setup by
#+setupfile: my-setup.org
you need to refresh it by C-c C-c on = this line.
You won't see the content of my-setup.org, but it will be active in your current orf buff= er.

Fabrice=C2=A0
--f40304378874748d27055be7d482--