* Bug: Getting property ALLTAGS always returns nil [6.33trans (release_6.33f.130.gb8e0)]
@ 2010-01-17 21:13 David Maus
2010-01-17 22:03 ` David Maus
0 siblings, 1 reply; 3+ messages in thread
From: David Maus @ 2010-01-17 21:13 UTC (permalink / raw)
To: emacs-orgmode
[-- Attachment #1.1: Type: text/plain, Size: 7470 bytes --]
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.
------------------------------------------------------------------------
If I try to get the property ALLTAGS of a headline using
`org-entry-get' the result is always nil.
Using git bisect with this simple elisp script:
,----
| ;; bisect orgmode bug: (org-entry-get (point) "ALLTAGS") always
| ;; returns nil
|
| ;;; Load orgmode
| (add-to-list 'load-path "~/code/remote/org-mode/lisp")
| (require 'org-install)
| (require 'org)
|
| (with-temp-buffer
| (org-mode)
| (insert "* Headline :tag:")
| (let ((tags
| (org-entry-get (point-min) "ALLTAGS")))
| (if (null tags)
| (kill-emacs 1)
| (kill-emacs 0))))
`----
Shows that commit b8e0d6fdb41f2165d675e89fcb54b741c971f6f4 is the
first one where getting ALLTAGS for a headline with a tag return nil.
Bisect log:
,----
| git bisect start
| # bad: [0e370d498b34469a025cdce864fd5c5987bf8050] Fix typo
| git bisect bad 0e370d498b34469a025cdce864fd5c5987bf8050
| # good: [2b528343557b4ff08af8efb283f01b5d231a7fc4] Release 6.33
| git bisect good 2b528343557b4ff08af8efb283f01b5d231a7fc4
| # good: [e8ec6d6d115cbaf09cffd54f4634789cb2081187] Allow unrestricted completion on properties
| git bisect good e8ec6d6d115cbaf09cffd54f4634789cb2081187
| # bad: [70d6341f2e4cec845d6ff2925f8b6c73dfddffa7] Improve future detection when reading dates
| git bisect bad 70d6341f2e4cec845d6ff2925f8b6c73dfddffa7
| # bad: [e690ae7eb016f5635d706a681d158e4d2d1bc3c7] Merge branch 'blocked-as-special-property'
| git bisect bad e690ae7eb016f5635d706a681d158e4d2d1bc3c7
| # good: [1bd88b0394503d55be0bacf6927d0f22e708d7c1] Document that one should not change the `state' entry in `org-log-note-headings'
| git bisect good 1bd88b0394503d55be0bacf6927d0f22e708d7c1
| # good: [f444c8cd679dc488b1016074f1eb25c7c1b6f1af] Export: Do not check for protectedness at the end of a line
| git bisect good f444c8cd679dc488b1016074f1eb25c7c1b6f1af
| # good: [30d179c85e98d2e3176bd8dd0b489d9ac32979dc] LaTeX export: Fix line end after caption command for longtable environments
| git bisect good 30d179c85e98d2e3176bd8dd0b489d9ac32979dc
| # good: [1886c46d9d7b68559b0ba142c828d2c054bf6321] Merge branch 'master' of git+ssh://repo.or.cz/srv/git/org-mode
| git bisect good 1886c46d9d7b68559b0ba142c828d2c054bf6321
| # bad: [b8e0d6fdb41f2165d675e89fcb54b741c971f6f4] Make a new special property BLOCKED, indicating if entry is blocked
| git bisect bad b8e0d6fdb41f2165d675e89fcb54b741c971f6f4
`----
-- David
Emacs : GNU Emacs 23.1.91.1 (i486-pc-linux-gnu, GTK+ Version 2.18.5)
of 2010-01-11 on elegiac, modified by Debian
Package: Org-mode version 6.33trans (release_6.33f.130.gb8e0)
current state:
==============
(setq
org-wl-link-shimbun-to-xref t
org-log-done 'note
org-export-latex-after-initial-vars-hook '(org-beamer-after-initial-vars)
org-todo-keyword-faces '(("TODO" :foreground "red" :weight bold) ("WAIT" :foreground "firebrick" :weight bold)
("DONE" :foreground "green") ("IDEA" :foreground "gold" :weight bold)
("CANC" :foreground "LightSlateGrey") ("PROJ" :foreground "DeepSkyBlue" :weight bold))
org-agenda-custom-commands '(("R" "Refile new tasks and notes" tags "LEVEL=2+REFILE"))
org-agenda-files '("/home/david/org/priv/priv.org" "/home/david/org/work/work.org" "/home/david/org/pg/pg.org"
"/home/david/org/bucket.org" "/home/david/org/tec/tec.org")
org-blocker-hook '(org-block-todo-from-children-or-siblings-or-parent)
org-agenda-tags-column -120
org-metaup-hook '(org-babel-load-in-session-maybe)
org-after-todo-state-change-hook '(org-clock-out-if-current)
org-id-method 'uuidgen
org-agenda-todo-ignore-scheduled t
org-babel-interpreters '("js" "ditaa" "latex" "ruby" "sh" "emacs-lisp")
org-export-latex-format-toc-function 'org-export-latex-format-toc-default
org-log-redeadline 'time
org-export-preprocess-hook '(org-export-blocks-preprocess)
org-tab-first-hook '(org-babel-hide-result-toggle-maybe org-hide-block-toggle-maybe)
org-src-mode-hook '(org-src-mode-configure-edit-buffer)
org-confirm-shell-link-function 'yes-or-no-p
org-export-first-hook '(org-beamer-initialize-open-trackers)
org-wl-link-remove-filter t
org-todo-keywords '((sequence "TODO(t)" "WAIT(w@/!)" "|" "DONE(D)") (type "PROJ(p)" "IDEA(i)" "|" "CANC(C)"))
org-agenda-before-write-hook '(org-agenda-add-entry-text)
org-default-notes-file "~/org/bucket.org"
org-log-reschedule 'time
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-babel-show-result-all) (quote append)
(quote local))
)
org-babel-result-hide-spec org-babel-hide-all-hashes
(lambda nil
(org-add-hook (quote change-major-mode-hook) (quote org-show-block-all) (quote append) (quote local)))
)
org-refile-targets '((org-agenda-files :maxlevel . 4))
org-ctrl-c-ctrl-c-hook '(org-babel-lob-execute-maybe org-babel-hash-at-point org-babel-execute-src-block-maybe)
org-confirm-elisp-link-function 'yes-or-no-p
org-refile-use-outline-path 'file
org-log-into-drawer "LOGBOOK"
org-agenda-todo-ignore-with-date t
org-export-interblocks '((lob org-babel-exp-lob-one-liners) (src org-babel-exp-inline-src-blocks))
org-log-note-headings '((done . "CLOSING NOTE %t") (state . "State %-12s from %-12S %t") (note . "Note taken on %t")
(reschedule . "Rescheduled from %S on %t") (delschedule . "Not scheduled, was %S on %t")
(redeadline . "New deadline from %S on %t") (deldeadline . "Removed deadline, was %S on %t")
(clock-out . ""))
org-enforce-todo-dependencies t
org-occur-hook '(org-first-headline-recenter)
org-from-is-user-regexp "\\<David Maus\\>"
org-export-preprocess-before-selecting-backend-code-hook '(org-beamer-select-beamer-code)
org-modules '(org-habit org-bbdb org-bibtex org-docview org-gnus org-info org-jsinfo org-irc org-mew org-mhe org-rmail
org-vm org-w3m org-wl)
org-remember-templates '(("Todo" 116
"* TODO %^{Description} %^g\n :PROPERTIES:\n :Created: %u\n :Reference: %a\n :END:"
"~/org/bucket.org" "Aufgaben" nil)
("Note" 110 "* %^{Note} :NOTE:%^g\n :PROPERTIES:\n :Created: %u\n :Reference: %a\n :END:"
"~/org/bucket.org" "Notizen" nil)
("Idea" 105
"* IDEA %^{Description} %^g\n :PROPERTIES:\n :Created: %u\n :Reference: %a\n :END:"
"~/org/bucket.org" "Ideen" nil)
("Project" 112
"* PROJ %^{Description} %^g\n :PROPERTIES:\n :Created: %u\n :Reference: %a\n :END:"
"~/org/bucket.org" "Projekte" nil)
("Link" 119 "* %c %^g\n :PROPERTIES:\n :Created: %u\n :Reference: %a\n :END:"
"~/org/bucket.org" "Links" nil)
)
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))
)
[-- Attachment #1.2: Type: application/pgp-signature, Size: 230 bytes --]
[-- Attachment #2: Type: text/plain, Size: 201 bytes --]
_______________________________________________
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Bug: Getting property ALLTAGS always returns nil [6.33trans (release_6.33f.130.gb8e0)]
2010-01-17 21:13 Bug: Getting property ALLTAGS always returns nil [6.33trans (release_6.33f.130.gb8e0)] David Maus
@ 2010-01-17 22:03 ` David Maus
2010-01-18 7:30 ` Carsten Dominik
0 siblings, 1 reply; 3+ messages in thread
From: David Maus @ 2010-01-17 22:03 UTC (permalink / raw)
To: David Maus; +Cc: emacs-orgmode
[-- Attachment #1.1.1: Type: text/plain, Size: 1020 bytes --]
And replying to myself:
The problem seems to be that some if-clauses in `org-entry-properties'
are not right:
- when requesting the ALLTAGS property, the code that adds its value
to the alist did not check if the variable `specific' is "ALLTAGS", but "TAGS"
- when requesting the BLOCKED property, the code that adds its value
to the alist did not check if the variable `specific' is "BLOCKED", but "TAGS"
So requesting one of those properties explicitly didn't work.
I attached three patches for org.el. Patch 0001 fixes a type in the
docstring of `org-entry-properties', patch 0002 modifies the if-clause
for the ALLTAGS property to check if `special' is "ALLTAGS" and patch
0003 modifies the if-clause for the BLOCKED property and adds BLOCKED
to the list of properties that are excluded if user requests all or
standard properties.
Hope I got it right and understood the logic in this function.
-- David
--
OpenPGP... 0x99ADB83B5A4478E6
Jabber.... dmjena@jabber.org
Email..... maus.david@gmail.com
[-- Attachment #1.1.2: 0001-fix-typo-in-docstring-of-org-entry-properties.patch --]
[-- Type: application/octet-stream, Size: 970 bytes --]
From 14f64ed1965d410597a22bc5e22c2686e854565e Mon Sep 17 00:00:00 2001
From: David Maus <maus.david@gmail.com>
Date: Sun, 17 Jan 2010 22:42:59 +0100
Subject: [PATCH 1/3] fix typo in docstring of `org-entry-properties'
---
lisp/org.el | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/lisp/org.el b/lisp/org.el
index ee81c4d..964da3f 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -12509,7 +12509,7 @@ if the property key was used several times.
POM may also be nil, in which case the current entry is used.
If WHICH is nil or `all', get all properties. If WHICH is
`special' or `standard', only get that subclass. If WHICH
-is a string only get exactly this property. Specific can be a sting, the
+is a string only get exactly this property. Specific can be a string, the
specific property we are interested in. Specifying it can speed
things up because then unnecessary parsing is avoided."
(setq which (or which 'all))
--
1.6.5
[-- Attachment #1.1.3: 0002-return-special-property-ALLTAGS-if-requested-so.patch --]
[-- Type: application/octet-stream, Size: 1056 bytes --]
From 61c2d444a40529a2abffb466a67fe690ea6c19b4 Mon Sep 17 00:00:00 2001
From: David Maus <maus.david@gmail.com>
Date: Sun, 17 Jan 2010 22:47:35 +0100
Subject: [PATCH 2/3] return special property ALLTAGS if requested so.
the if-clause that would add the cons for the ALLTAGS property now
checks if user requested this particular properties instead of
checking for a request of the TAGS property.
---
lisp/org.el | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/lisp/org.el b/lisp/org.el
index 964da3f..2afec60 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -12540,7 +12540,7 @@ things up because then unnecessary parsing is avoided."
(setq value (org-get-tags-string))
(string-match "\\S-" value))
(push (cons "TAGS" value) props))
- (when (and (or (not specific) (string= specific "TAGS"))
+ (when (and (or (not specific) (string= specific "ALLTAGS"))
(setq value (org-get-tags-at)))
(push (cons "ALLTAGS" (concat ":" (mapconcat 'identity value ":")
":"))
--
1.6.5
[-- Attachment #1.1.4: 0003-return-special-property-BLOCKED-if-requested-so.patch --]
[-- Type: application/octet-stream, Size: 1385 bytes --]
From 594e9df751e2a710f88e8b6a00c182689d743d6d Mon Sep 17 00:00:00 2001
From: David Maus <maus.david@gmail.com>
Date: Sun, 17 Jan 2010 22:51:26 +0100
Subject: [PATCH 3/3] return special property BLOCKED if requested so.
the if-clause now checks if user specifically requested the value of
the BLOCKED property.
---
lisp/org.el | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/lisp/org.el b/lisp/org.el
index 2afec60..4415240 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -12515,7 +12515,7 @@ things up because then unnecessary parsing is avoided."
(setq which (or which 'all))
(org-with-point-at pom
(let ((clockstr (substring org-clock-string 0 -1))
- (excluded '("TODO" "TAGS" "ALLTAGS" "PRIORITY"))
+ (excluded '("TODO" "TAGS" "ALLTAGS" "PRIORITY" "BLOCKED"))
(case-fold-search nil)
beg end range props sum-props key value string clocksum)
(save-excursion
@@ -12545,7 +12545,7 @@ things up because then unnecessary parsing is avoided."
(push (cons "ALLTAGS" (concat ":" (mapconcat 'identity value ":")
":"))
props))
- (when (or (not specific) (string= specific "TAGS"))
+ (when (or (not specific) (string= specific "BLOCKED"))
(push (cons "BLOCKED" (if (org-entry-blocked-p) "t" "")) props))
(when (or (not specific)
(member specific org-all-time-keywords)
--
1.6.5
[-- Attachment #1.2: Type: application/pgp-signature, Size: 230 bytes --]
[-- Attachment #2: Type: text/plain, Size: 201 bytes --]
_______________________________________________
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
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: Re: Bug: Getting property ALLTAGS always returns nil [6.33trans (release_6.33f.130.gb8e0)]
2010-01-17 22:03 ` David Maus
@ 2010-01-18 7:30 ` Carsten Dominik
0 siblings, 0 replies; 3+ messages in thread
From: Carsten Dominik @ 2010-01-18 7:30 UTC (permalink / raw)
To: David Maus; +Cc: emacs-orgmode
On Jan 17, 2010, at 11:03 PM, David Maus wrote:
> And replying to myself:
>
> The problem seems to be that some if-clauses in `org-entry-properties'
> are not right:
>
> - when requesting the ALLTAGS property, the code that adds its value
> to the alist did not check if the variable `specific' is
> "ALLTAGS", but "TAGS"
>
> - when requesting the BLOCKED property, the code that adds its value
> to the alist did not check if the variable `specific' is
> "BLOCKED", but "TAGS"
>
> So requesting one of those properties explicitly didn't work.
>
> I attached three patches for org.el. Patch 0001 fixes a type in the
> docstring of `org-entry-properties', patch 0002 modifies the if-clause
> for the ALLTAGS property to check if `special' is "ALLTAGS" and patch
> 0003 modifies the if-clause for the BLOCKED property and adds BLOCKED
> to the list of properties that are excluded if user requests all or
> standard properties.
>
> Hope I got it right and understood the logic in this function.
Yes you did. There were really important fixes for quite
stupid bugs, thanks a lot!
- Carsten
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-01-18 7:30 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-17 21:13 Bug: Getting property ALLTAGS always returns nil [6.33trans (release_6.33f.130.gb8e0)] David Maus
2010-01-17 22:03 ` David Maus
2010-01-18 7:30 ` Carsten Dominik
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).