From mboxrd@z Thu Jan 1 00:00:00 1970 From: rpgoldman@sift.info Subject: [PATCH] Add an easy template for index (i), and move include file to I from i. Date: Thu, 28 Apr 2011 10:38:54 -0500 Message-ID: <1304005134-31639-2-git-send-email-rpgoldman@sift.info> References: <10844.1303994001@alphaville.dokosmarshall.org> Return-path: Received: from eggs.gnu.org ([140.186.70.92]:45131) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QFTJJ-0001iY-85 for emacs-orgmode@gnu.org; Thu, 28 Apr 2011 11:39:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QFTJH-0001aM-Tr for emacs-orgmode@gnu.org; Thu, 28 Apr 2011 11:39:21 -0400 Received: from enchanter.real-time.com ([63.170.91.11]:4333) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QFTJH-0001a7-P7 for emacs-orgmode@gnu.org; Thu, 28 Apr 2011 11:39:19 -0400 In-Reply-To: <10844.1303994001@alphaville.dokosmarshall.org> 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 Cc: "Robert P. Goldman" From: Robert P. Goldman Implement Nick Dokos' suggestion for inserting #+INDEX. Notes about this patch: 1. It breaks some old user-visible behavior, since ?") ("a" "#+begin_ascii\n?\n#+end_ascii") ("A" "#+ascii: ") - ("i" "#+include %file ?" + ("i" "#+index: ?" + "#+index: ?") + ("I" "#+include %file ?" "") ) "Structure completion elements. This is a list of abbreviation keys and values. The value gets inserted if you type `<' followed by the key and then press the completion key, usually `M-TAB'. %file will be replaced by a file name after prompting -for the file using completion. +for the file using completion. The cursor will be placed at the position +of the `?` in the template. There are two templates for each key, the first uses the original Org syntax, the second uses Emacs Muse-like syntax tags. These Muse-like tags become the default when the /org-mtags.el/ module has been loaded. See also the @@ -10779,7 +10782,7 @@ expands them." (let ((l (buffer-substring (point-at-bol) (point))) a) (when (and (looking-at "[ \t]*$") - (string-match "^[ \t]*<\\([a-z]+\\)$"l) + (string-match "^[ \t]*<\\([a-zA-Z]+\\)$" l) (setq a (assoc (match-string 1 l) org-structure-template-alist))) (org-complete-expand-structure-template (+ -1 (point-at-bol) (match-beginning 1)) a) -- 1.7.3.5