From mboxrd@z Thu Jan 1 00:00:00 1970 From: Karl Voit Subject: HowTo: Letter template method using yasnippet (was: Org/LaTeX set-up for business letters?) Date: Fri, 6 Jul 2012 21:08:24 +0200 Message-ID: <2012-07-06T20-54-34@devnull.Karl-Voit.at> References: <8762a2l6f7.fsf@googlemail.com> Reply-To: news1142@Karl-Voit.at Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([208.118.235.92]:50749) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SnE88-00030O-Av for emacs-orgmode@gnu.org; Fri, 06 Jul 2012 15:23:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SnE85-00077s-Tu for emacs-orgmode@gnu.org; Fri, 06 Jul 2012 15:23:51 -0400 Received: from plane.gmane.org ([80.91.229.3]:54242) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SnE85-00076E-Hm for emacs-orgmode@gnu.org; Fri, 06 Jul 2012 15:23:49 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1SnDtV-0005kG-Vw for emacs-orgmode@gnu.org; Fri, 06 Jul 2012 21:08:45 +0200 Received: from mail.michael-prokop.at ([88.198.6.110]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 06 Jul 2012 21:08:45 +0200 Received: from news1142 by mail.michael-prokop.at with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 06 Jul 2012 21:08:45 +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 * Thorsten Jolitz wrote: > > Hi List, Hi Thorsten! > although using Emacs/Org-mode for almost everything, I still write my > "official" correspondence with a (quite nice) OpenOffice template. It > would be so much easier and faster to just use Org mode for that too. I accomplished this by using yasnippet and Org-mode. It is quite convenient :-) 1. install, configure, and learn yasnippet for your Emacs - a must; independent of this one here! 2. put «newletter» (below) into your snippet directory so that it can be invoked when you're in a Org-mode buffer - usually, this means storing as something similar to «~/.emacs.d/snippets/text-mode/org-mode/newletter» - adopt my dummy entries for your name, address, and so forth So far for the initial setup. 3. create a new (empty) folder 4. enter the new folder 5. create and open a new Org-mode file in Emacs - it is only temporary - you might want to use «emacsclient init.org» 6. within this open Emacs buffer, type «newletter» followed by TAB - this invokes the yasnippet template 7. fill out all fields, take default values or change them, switch to the next field by using TAB 8. when you end up at the line «cat >Kopf.tex <letter.tex < mehr Text \opening{Sehr geehrtXX NAME!} TEXT \closing{Mit freundlichen Grüßen} %\encl{Lebenslauf}% Anhang \end{letter} % ------------------------------------------------------------- \end{document} EOF cat -T >Makefile_temp <Makefile rm Makefile_temp #+END_SRC =========================================================================== -- Karl Voit