From: David Maus <maus.david@gmail.com>
To: David Maus <maus.david@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: Bug: Getting property ALLTAGS always returns nil [6.33trans (release_6.33f.130.gb8e0)]
Date: Sun, 17 Jan 2010 23:03:31 +0100 [thread overview]
Message-ID: <87zl4c75jg.wl%maus.david@gmail.com> (raw)
In-Reply-To: <873a248mf0.wl%maus.david@gmail.com>
[-- 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
next prev parent reply other threads:[~2010-01-17 22:03 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
2010-01-18 7:30 ` Carsten Dominik
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87zl4c75jg.wl%maus.david@gmail.com \
--to=maus.david@gmail.com \
--cc=emacs-orgmode@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.