emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Orgmode] Bug: capture with PROPERTIES [7.3 commit-972b0a58...]


From: Giovanni Ridolfi
Subject: [Orgmode] Bug: capture with PROPERTIES [7.3 commit-972b0a58...]
Date: Fri, 10 Dec 2010 13:10:31 +0100

Remember to cover the basics, that is, what you expected to happen and
what in fact did happen.  You don't know how to make a good report?  See

     http://orgmode.org/manual/Feedback.html#Feedback

Your bug report will be posted to the Org-mode mailing list.
------------------------------------------------------------------------

Emacs  : GNU Emacs 23.2.1 (i386-mingw-nt5.1.2600)
 of 2010-05-08 on G41R2F1
Package: Org-mode version 7.3 commit-972b0a581eff180bcdc15883d2fe30c4cc24996a


Hello everyone,

I found a bug in the insertion of PROPERTies in capture templates.

------------------------ TEST FILE: ------------------
     -*- mode: org; -*-

(setq org-capture-templates
'(
("q" "element" entry (file+headline "test.org" "capture") "*** %^{prompt} \n 
:PROPERTIES:\n :ID: lab \n %^{Element}p  \n %^{Number}p \n %^{Type}p \n 
:Feeling: %? \n :Comment:  \n :END:"
)
))
* capture
:PROPERTIES:
:Element_ALL: H He Li Na Hg
:Number_ALL:  1  2  3 4  80
:Type_ALL: gas solid liquid
:END:

-----------------------------------
1. set my capture template
2. call capture template.
3. Enter headline: "first test", <RET> 
   so far so good.
4. Now you are requested to insert a PROPERTY
   and the buffer appears as:   

-------------------- 4th  step --------------
***  first test
 :PROPERTIES:
 :ID: lab 

 %^{Number}p 
 %^{Type}p 
 :Feeling: %? 
 :Comment:  
 :END:
----------------------
Value for Element:  ||   cursor is here
--------------------
------------------------------------------------

5. enter He <RET>

BUG: the layout of the buffer is broken:

---------------------------
*** first test 
 :PROPERTIES:
 :ID: lab 
                      -------|  a blank line is here
                             |  
 %^{Type}p                   |
 :Feeling: %?                |
 :Comment:                   |
 :Element:  He       <-------|  the property is inserted here!
 :END:
----------------------
Value for Number:  ||   (cursor is here)
---------------------------------------------------------

The line of the property is inserted at the end 
of the Properties drawer, but before :END:. 

Not where the prompt was, and where I expected to find it.

----------------------- A complete test: ----------
** second test 
 :PROPERTIES:
 :ID: lab 
   .                   I put the "." to highligh the eol
  .
  .
 :Feeling: mickey mouse[1]
 :Comment:  
 :Element:  He
 :Number:   2
 :Type:     gas
 :END:
[1] http://www.ncbi.nlm.nih.gov/pmc/articles/PMC1117755/
----------------------------

cheers,
Giovanni

current state:
==============
(setq
 org-log-done 'time
 org-export-latex-after-initial-vars-hook '(org-beamer-after-initial-vars)
 org-speed-command-hook '(org-speed-command-default-hook 
org-babel-speed-command-hook)
 org-blocker-hook '(org-block-todo-from-children-or-siblings-or-parent)
 org-metaup-hook '(org-babel-load-in-session-maybe)
 org-capture-templates '(("q" "element" entry (file+headline "test.org" 
"capture")
                          "*** %^{prompt} \n :PROPERTIES:\n :ID: lab \n 
%^{Element}p  \n %^{Number}p \n %^{Type}p \n :Feeling: %? \n :Comment:  \n 
:END:")
                         )
 org-after-todo-state-change-hook '(org-clock-out-if-current)
 org-export-blocks-postblock-hook '(org-exp-res/src-name-cleanup)
 org-export-latex-format-toc-function 'org-export-latex-format-toc-default
 org-capture-before-finalize-hook '(org-clock-in)
 org-tab-first-hook '(org-hide-block-toggle-maybe 
org-src-native-tab-command-maybe org-babel-hide-result-toggle-maybe)
 org-src-mode-hook '(org-src-babel-configure-edit-buffer 
org-src-mode-configure-edit-buffer)
 org-finalize-agenda-hook '(my-org-agenda-to-appt)
 org-confirm-shell-link-function 'yes-or-no-p
 org-export-first-hook '(org-beamer-initialize-open-trackers)
 org-agenda-before-write-hook '(org-agenda-add-entry-text)
 org-babel-pre-tangle-hook '(save-buffer)
 org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-hide-drawers 
org-cycle-show-empty-lines
                  org-optimize-window-after-visibility-change)
 org-export-preprocess-before-normalizing-links-hook 
'(org-remove-file-link-modifiers)
 org-mode-hook '((lambda nil
                  (org-add-hook (quote change-major-mode-hook) (quote 
org-show-block-all) (quote append) (quote local)))
                 (lambda nil
                  (org-add-hook (quote change-major-mode-hook) (quote 
org-babel-show-result-all) (quote append)
                   (quote local))
                  )
                 org-babel-result-hide-spec org-babel-hide-all-hashes)
 org-ctrl-c-ctrl-c-hook '(org-babel-hash-at-point 
org-babel-execute-safely-maybe)
 org-confirm-elisp-link-function 'yes-or-no-p
 org-export-interblocks '((lob org-babel-exp-lob-one-liners) (src 
org-babel-exp-inline-src-blocks))
 org-enforce-todo-dependencies t
 org-occur-hook '(org-first-headline-recenter)
 org-export-preprocess-before-selecting-backend-code-hook 
'(org-beamer-select-beamer-code)
 org-export-latex-final-hook '(org-beamer-amend-header org-beamer-fix-toc 
org-beamer-auto-fragile-frames
                               org-beamer-place-default-actions-for-lists)
 org-metadown-hook '(org-babel-pop-to-session-maybe)
 org-export-blocks '((src org-babel-exp-src-blocks nil) (comment 
org-export-blocks-format-comment t)
                     (ditaa org-export-blocks-format-ditaa nil) (dot 
org-export-blocks-format-dot nil))
 )



reply via email to

[Prev in Thread] Current Thread [Next in Thread]