From mboxrd@z Thu Jan 1 00:00:00 1970 From: Robert Goldman Subject: Fix for bug in org-capture Date: Mon, 15 Apr 2013 17:14:59 -0500 Message-ID: <516C7BE3.8030905@sift.info> Reply-To: rpgoldman@sift.info Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------030409000409050500040909" Return-path: Received: from eggs.gnu.org ([208.118.235.92]:35402) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1URrg3-0000C3-Ew for emacs-orgmode@gnu.org; Mon, 15 Apr 2013 18:15:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1URrg2-0000W3-Id for emacs-orgmode@gnu.org; Mon, 15 Apr 2013 18:15:07 -0400 Received: from 23-25-144-217-static.hfc.comcastbusiness.net ([23.25.144.217]:51621 helo=mpls.sift.net) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1URrg2-0000G1-EO for emacs-orgmode@gnu.org; Mon, 15 Apr 2013 18:15:06 -0400 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: Org Mode This is a multi-part message in MIME format. --------------030409000409050500040909 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit I tried to make two submenus to my org-capture templates: a prefix key "t" (for TODO) and a prefix key "T" (for today's TODO). When I tried to use them, the "T" key did not appear and was not accepted. Looking more deeply, it appears that it was filtered out by a mistakenly case-folding (or at least potentially case-folding) search in org-capture. I am attaching a diff which has the two line fix for this bug. --------------030409000409050500040909 Content-Type: text/plain; x-mac-type="0"; x-mac-creator="0"; name="org-capture.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="org-capture.patch" diff --git a/lisp/org-capture.el b/lisp/org-capture.el index d8e62a1..861d640 100644 --- a/lisp/org-capture.el +++ b/lisp/org-capture.el @@ -1431,7 +1431,8 @@ only the bare key is returned." (insert prefix "[" dkey "]" "..." " " ddesc "..." "\n") ;; Skip keys which are below this prefix (setq re (concat "\\`" (regexp-quote dkey))) - (while (and tbl (string-match re (caar tbl))) (pop tbl))) + (let ((case-fold-search nil)) + (while (and tbl (string-match re (caar tbl))) (pop tbl)))) ((= 2 (length (car tbl))) ;; Not yet a usable description, skip it ) --------------030409000409050500040909--