From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dan Davison Subject: Re: Re: [Babel] Macro for begin_src? Date: Fri, 16 Apr 2010 22:35:22 -0400 Message-ID: <87fx2ug61h.fsf@stats.ox.ac.uk> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1O2xsa-000434-FT for emacs-orgmode@gnu.org; Fri, 16 Apr 2010 22:35:32 -0400 Received: from [140.186.70.92] (port=35711 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1O2xsZ-00042w-3W for emacs-orgmode@gnu.org; Fri, 16 Apr 2010 22:35:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1O2xsW-0002im-UZ for emacs-orgmode@gnu.org; Fri, 16 Apr 2010 22:35:31 -0400 Received: from markov.stats.ox.ac.uk ([163.1.210.1]:60783) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1O2xsV-0002ic-N2 for emacs-orgmode@gnu.org; Fri, 16 Apr 2010 22:35:28 -0400 In-Reply-To: (Nathan Neff's message of "Fri, 16 Apr 2010 20:32:31 -0500") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Nathan Neff Cc: emacs-orgmode@gnu.org Nathan Neff writes: > On Fri, Apr 16, 2010 at 8:18 PM, Nathan Neff wrote: > > I've been converting my init.el file to org-babel, and am getting tired of > copying/pasting or typing the begin_src and end_src blocks. > > Example: > #+begin_src emacs-lisp :results silent > #+end_src Hi Nate, By the way, if you are using :results silent for all your blocks, then you can just enter it once as a buffer property: #+property: results silent (and if you want it for a whole subtree but not a whole buffer, then set a property called :results: with value silent in the root of the subtree). I agree with the others about using yasnippets for blocks. I have src and elisp snippets (although to be honest I still haven't learned the syntax for defining them and I have trouble stopping them leaving annoying trailing spaces...ok thanks you made me fix that, although I still don't know the syntax, something like this then src: #+begin_src...#+end_src # -- #+begin_src ${2:language} $0 #+end_src elisp: #name : #+begin_src...#+end_src # -- #+begin_src emacs-lisp $0 #+end_src ) Dan > > > > *Sigh* I Googled around for about 15 minutes, then posted the question to the > mailing list. (I swear!) > > Then, I stumbled upon Brent's Yasnippets when researching something totally > different. > > http://doc.norang.ca/org-mode.html#Yasnippets > > If anyone else has a different macro set up, I'm still interested in hearing > your solutions. > > Thanks, > --Nate > _______________________________________________ > Emacs-orgmode mailing list > Please use `Reply All' to send replies to the list. > Emacs-orgmode@gnu.org > http://lists.gnu.org/mailman/listinfo/emacs-orgmode