From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rasmus Subject: Re: koma letter exporter: changing the priority of options Date: Sat, 20 Jul 2013 14:59:15 +0200 Message-ID: <87ob9xs7z0.fsf@gmx.us> References: <20130609180059.GA2104@kenny.local> <874nd6we8q.fsf@pank.eu> <87ppuetm2m.fsf@gmx.us> <20130720115835.GB67549@kenny.local> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:58254) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V0Wkz-0000ub-PY for emacs-orgmode@gnu.org; Sat, 20 Jul 2013 08:59:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V0Wky-0000MT-Fu for emacs-orgmode@gnu.org; Sat, 20 Jul 2013 08:59:29 -0400 Received: from plane.gmane.org ([80.91.229.3]:54718) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V0Wky-0000MP-9q for emacs-orgmode@gnu.org; Sat, 20 Jul 2013 08:59:28 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1V0Wkw-0008N5-Hy for emacs-orgmode@gnu.org; Sat, 20 Jul 2013 14:59:26 +0200 Received: from g225142123.adsl.alicedsl.de ([92.225.142.123]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 20 Jul 2013 14:59:26 +0200 Received: from rasmus by g225142123.adsl.alicedsl.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 20 Jul 2013 14:59:26 +0200 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-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Hi Viktor and Allan, >> I think we need to treat koma variables more generally (I have some >> sketches locally) if anything. Not make their behavior more >> specialized. > > Could you elaborate on what you mean by this? I want to be able to generate and set /any/ Koma variable from emacs, including making my own ones. Sometimes I use custom koma variables depending on the letter and my footer then looks for the values of the koma variables and typeset the footer depending on which variables are available. As "half" of current template sets koma variables, this seems like something worthwhile doing. I have a defun to set an arbitrary koma variables, but I haven't looked more into it. >> But you'd still end up with >> two emails in your file, and if you lost the LCO file the other email >> would still be there. > > That is a valid criticism. I'd rather not have data specified in the TeX > file that is overwritten later on. However, if you lose the LCO file, > presumably you can't regenerate the lettern anyway. Nah, but you still "wrong" data in your template. >> I slightly less mind-boggling approach would be to replace the default >> function with one that (1) fetches the LCO values from the file (but >> what if they are remote?); (2) obtains the path via kpsewhich (run >> from the current dir); (3) run grep on each of these files with some >> intelligent keyword. The only hard part is (1) and (2) and (3) are >> almost foolproof. > > That approach, in my view, seems overly complicated and also very > brittle. I not advocating for its inclusion as a general solution(!), but as a specific solution in the case where you don't want to set the user email to nil, but still want to use it some of the time. It's brittle to the extend that Texlive is brittle. Kpsewhich should find the files (running from the same folder) if latex can find them. Making the /location/ of a variable /in the output/ a function of whether it's one value or the other is an ugly hack IMO. (Same as the above, but the above you can keep in your own config file). If we want to go down that path a better way is to let the user decide on the relative importance of variables versus LCO files. 1. To let the placement of koma variables and lco files be configurable via special [BRACKET] keywords as in org-latex-class. 2. To let the preamble be "blocks", as with the end material (ps cc encl), and let users deceit the way they want material to come. E.g. if some variable is '(komavars lco) then lco is typeset before komavars. –Rasmus -- Dung makes an excellent fertilizer