From mboxrd@z Thu Jan 1 00:00:00 1970 From: Puneeth Chaganti Subject: [PATCH] Missing prompt label in capture template expansion Date: Fri, 25 Feb 2011 15:11:55 +0530 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from [140.186.70.92] (port=50818 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PsuBo-0006BT-8Q for emacs-orgmode@gnu.org; Fri, 25 Feb 2011 04:42:21 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PsuBm-0002kK-OD for emacs-orgmode@gnu.org; Fri, 25 Feb 2011 04:42:20 -0500 Received: from mail-ww0-f49.google.com ([74.125.82.49]:57134) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PsuBm-0002js-By for emacs-orgmode@gnu.org; Fri, 25 Feb 2011 04:42:18 -0500 Received: by wwb29 with SMTP id 29so1634343wwb.30 for ; Fri, 25 Feb 2011 01:42:16 -0800 (PST) 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: Aankhen Cc: emacs-orgmode@gnu.org Hi, Bar has the properties of a LINK associated with it and hence is not being displayed in the mini-buffer. Here is a possible fix, but I'm not sure if it's the best fix. HTH, Puneeth diff --git a/lisp/org-capture.el b/lisp/org-capture.el index b5711f7..da21e89 100644 --- a/lisp/org-capture.el +++ b/lisp/org-capture.el @@ -1279,8 +1279,8 @@ The template may still contain \"%?\" for cursor positioning." (while (re-search-forward "%^\\({\\([^}]*\\)}\\)?\\([gGtTuUCLp]\\)?" nil t) (unless (org-capture-escaped-%) - (setq char (if (match-end 3) (match-string 3)) - prompt (if (match-end 2) (match-string 2))) + (setq char (if (match-end 3) (match-string-no-properties 3)) + prompt (if (match-end 2) (match-string-no-properties 2))) (goto-char (match-beginning 0)) (replace-match "") (setq completions nil default nil) On Fri, Feb 25, 2011 at 12:41 PM, Aankhen wrote: > Remember to cover the basics, that is, what you expected to happen and > what in fact did happen. =C2=A0You don't know how to make a good report? = =C2=A0See > > =C2=A0 =C2=A0 http://orgmode.org/manual/Feedback.html#Feedback > > Your bug report will be posted to the Org-mode mailing list. > ------------------------------------------------------------------------ > > STEPS TO REPRODUCE: > 1. Add this to the list of capture templates: > =C2=A0 =C2=A0("t" "Test" entry (file "z:/Temp/t.org") > =C2=A0 =C2=A0 "*** TODO %^{Foo} [[bar:%^{Bar}][Bar]]") > 2. Run org-capture. > 3. Fill in a value for =E2=80=9CFoo=E2=80=9D when prompted and press Ente= r. > > EXPECTED RESULTS: > Prompted for second value, with label =E2=80=9CBar=E2=80=9D. > > ACTUAL RESULTS: > Prompted for second value, with label =E2=80=9C =E2=80=9D (single space). > > NOTES: > I tried this using org-mode from git (commit id: > b23d35de06c229db84472d893c8645c63896a6cd) after starting Emacs with > =E2=80=98emacs -Q=E2=80=99 to ensure there was no interference. =C2=A0A c= ouple of > variations on the template above work fine, correctly showing the > label when prompting for a value: > > * No prompts before the one in the link: ("t" "Test" entry (file > "z:/Temp/t.org") "*** TODO [[bar:%^{Bar}][Bar]]") > * No link description: ("t" "Test" entry (file "z:/Temp/t.org") "*** > TODO [[bar:%^{Bar}][Bar]]") > > Config follows=E2=80=A6 > > Emacs =C2=A0: GNU Emacs 24.0.50.1 (i386-mingw-nt6.1.7601) > =C2=A0of 2010-11-10 on SHAN-PC > Package: Org-mode version 7.4 > > current state: > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > (setq > =C2=A0org-export-latex-after-initial-vars-hook '(org-beamer-after-initial= -vars) > =C2=A0org-speed-command-hook '(org-speed-command-default-hook > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0org-babel-speed-command-hook) > =C2=A0org-metaup-hook '(org-babel-load-in-session-maybe) > =C2=A0org-capture-templates '(("t" "Test" entry (file "z:/Temp/t.org" "Me= dia") > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0"*** TODO %^{Foo} [[bar:%^{Bar}][Bar]]") > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 ) > =C2=A0org-after-todo-state-change-hook '(org-clock-out-if-current) > =C2=A0org-export-blocks-postblock-hook '(org-exp-res/src-name-cleanup) > =C2=A0org-export-latex-format-toc-function 'org-export-latex-format-toc-d= efault > =C2=A0org-tab-first-hook '(org-hide-block-toggle-maybe > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0org-src-native-tab-command-maybe > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0org-babel-hide-result-toggle-maybe) > =C2=A0org-src-mode-hook '(org-src-babel-configure-edit-buffer > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 org= -src-mode-configure-edit-buffer) > =C2=A0org-confirm-shell-link-function 'yes-or-no-p > =C2=A0org-export-first-hook '(org-beamer-initialize-open-trackers) > =C2=A0org-agenda-before-write-hook '(org-agenda-add-entry-text) > =C2=A0org-babel-pre-tangle-hook '(save-buffer) > =C2=A0org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-hide-dr= awers > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0org-cycle-s= how-empty-lines > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0org-optimiz= e-window-after-visibility-change) > =C2=A0org-export-preprocess-before-normalizing-links-hook > '(org-remove-file-link-modifiers) > =C2=A0org-mode-hook '(#[nil "\300\301\302\303\304$\207" > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 [org-add-h= ook change-major-mode-hook org-show-block-all > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0appe= nd local] > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 5] > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 #[nil "\300\301\3= 02\303\304$\207" > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 [org-add-h= ook change-major-mode-hook > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0org-= babel-show-result-all append local] > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 5] > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 org-babel-result-= hide-spec org-babel-hide-all-hashes) > =C2=A0org-ctrl-c-ctrl-c-hook '(org-babel-hash-at-point > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0org-babel-execute-safely-maybe) > =C2=A0org-confirm-elisp-link-function 'yes-or-no-p > =C2=A0org-export-interblocks '((lob org-babel-exp-lob-one-liners) > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0(src org-babel-exp-inline-src-blocks)) > =C2=A0org-occur-hook '(org-first-headline-recenter) > =C2=A0org-export-preprocess-before-selecting-backend-code-hook > '(org-beamer-select-beamer-code) > =C2=A0org-export-latex-final-hook '(org-beamer-amend-header org-beamer-fi= x-toc > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 org-beamer-auto-fragile-frames > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 org-beamer-place-default-actions-for-lists) > =C2=A0org-metadown-hook '(org-babel-pop-to-session-maybe) > =C2=A0org-export-blocks '((src org-babel-exp-src-block nil) > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (co= mment org-export-blocks-format-comment t) > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (di= taa org-export-blocks-format-ditaa nil) > =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (do= t org-export-blocks-format-dot nil)) > =C2=A0) > > _______________________________________________ > 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 > --=20 Puneeth