From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: Re: shortcut keys for mark ups Date: Tue, 6 Jan 2009 20:00:09 +0100 Message-ID: <173BCCB4-47CA-42B1-9D8F-3359B934EC58@uva.nl> References: <49638861.2050606@cornell.edu> <87sknwz5pe.fsf@gollum.intra.norang.ca> <4963A7FF.1040902@cornell.edu> Mime-Version: 1.0 (Apple Message framework v929.2) Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LKH9z-000809-A3 for emacs-orgmode@gnu.org; Tue, 06 Jan 2009 14:00:15 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LKH9y-0007zx-Il for emacs-orgmode@gnu.org; Tue, 06 Jan 2009 14:00:14 -0500 Received: from [199.232.76.173] (port=46905 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LKH9y-0007zu-G6 for emacs-orgmode@gnu.org; Tue, 06 Jan 2009 14:00:14 -0500 Received: from mail-ew0-f13.google.com ([209.85.219.13]:32771) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LKH9x-0005w0-VF for emacs-orgmode@gnu.org; Tue, 06 Jan 2009 14:00:14 -0500 Received: by ewy6 with SMTP id 6so8923172ewy.18 for ; Tue, 06 Jan 2009 11:00:12 -0800 (PST) In-Reply-To: <4963A7FF.1040902@cornell.edu> 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: Xin Shi Cc: Bernt Hansen , emacs-orgmode@gnu.org On Jan 6, 2009, at 7:50 PM, Xin Shi wrote: > Hi Bernt, > > Thanks for your reply! That's what I was trying to do. But I think > Carsten's suggestion of using the "org-structure-template-alist" is > more appealing to general user. I do like thought that Bernt puts his template around the current line..... - Carsten > > > Xin > > > Bernt Hansen wrote: >> Xin Shi writes: >> >> >>> In org mode, are there any shortcut keys for typing the following >>> mark-ups? >>> >>> #+BEGIN_EXAMPLE >>> #+END_EXAMPLE >>> >> >> Not that I'm aware of. You can use a function like the following to >> achieve this - or maybe you can use yasnippets (I've never tried that >> yet) >> >> ------------------------------------------------------------------------ >> (defun bth-begin-example () >> (interactive) >> (save-excursion >> (beginning-of-line) >> (insert "#+BEGIN_EXAMPLE\n") >> (end-of-line) >> (insert "\n#+END_EXAMPLE"))) >> >> >> (global-set-key (kbd " e") 'bth-begin-example) >> ------------------------------------------------------------------------ >> >> Then you can just type e while on a line and it'll put the >> EXAMPLE >> block around the current line. >> >> HTH, >> >> -Bernt >> > > > > _______________________________________________ > Emacs-orgmode mailing list > Remember: use `Reply All' to send replies to the list. > Emacs-orgmode@gnu.org > http://lists.gnu.org/mailman/listinfo/emacs-orgmode