From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bernt Hansen Subject: Re: shortcut keys for mark ups Date: Tue, 06 Jan 2009 12:48:13 -0500 Message-ID: <87sknwz5pe.fsf@gollum.intra.norang.ca> References: <49638861.2050606@cornell.edu> 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 1LKG2P-0006R9-NN for emacs-orgmode@gnu.org; Tue, 06 Jan 2009 12:48:21 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LKG2M-0006PY-PS for emacs-orgmode@gnu.org; Tue, 06 Jan 2009 12:48:19 -0500 Received: from [199.232.76.173] (port=50473 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LKG2M-0006PT-EB for emacs-orgmode@gnu.org; Tue, 06 Jan 2009 12:48:18 -0500 Received: from mho-02-bos.mailhop.org ([63.208.196.179]:61906) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LKG2L-0001kC-V2 for emacs-orgmode@gnu.org; Tue, 06 Jan 2009 12:48:18 -0500 In-Reply-To: <49638861.2050606@cornell.edu> (Xin Shi's message of "Tue\, 06 Jan 2009 11\:35\:45 -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: Xin Shi Cc: emacs-orgmode@gnu.org 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