summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Goaziou <mail@nicolasgoaziou.fr>2016-02-04 13:50:44 +0100
committerNicolas Goaziou <mail@nicolasgoaziou.fr>2016-02-04 23:06:03 +0100
commit00f0c70418ab306a9559a7d73472f3b374925fb8 (patch)
tree885a36b3727df945b65b5887224e12891b2f6fa1
parent169dfebbff9a72b48ac89736b07c46b6323207c5 (diff)
downloadorg-mode-00f0c70418ab306a9559a7d73472f3b374925fb8.tar.gz
Special property "ITEM" contains headline without stars
* lisp/org.el (org-entry-properties): "ITEM" contains headline without stars. * lisp/org-colview.el (org-columns-display-here): Apply changes. * doc/org.texi (Special properties): Update documentation. * testing/lisp/test-org.el (test-org/entry-properties): Update tests.
-rw-r--r--doc/org.texi2
-rw-r--r--etc/ORG-NEWS2
-rw-r--r--lisp/org-colview.el8
-rw-r--r--lisp/org.el9
-rw-r--r--testing/lisp/test-org.el4
5 files changed, 14 insertions, 11 deletions
diff --git a/doc/org.texi b/doc/org.texi
index ae7f130..a14917c 100644
--- a/doc/org.texi
+++ b/doc/org.texi
@@ -5446,7 +5446,7 @@ CLOCKSUM_T @r{The sum of CLOCK intervals in the subtree for today.}
CLOSED @r{When was this entry closed?}
DEADLINE @r{The deadline time string, without the angular brackets.}
FILE @r{The filename the entry is located in.}
-ITEM @r{The headline of the entry, with stars.}
+ITEM @r{The headline of the entry.}
PRIORITY @r{The priority of the entry, a string with a single letter.}
SCHEDULED @r{The scheduling timestamp, without the angular brackets.}
TAGS @r{The tags defined directly in the headline.}
diff --git a/etc/ORG-NEWS b/etc/ORG-NEWS
index 9a833ae..53fd34d 100644
--- a/etc/ORG-NEWS
+++ b/etc/ORG-NEWS
@@ -289,13 +289,13 @@ to the article's original group.
*** ~org-babel-check-confirm-evaluate~ is now a function instead of a macro
The calling convention has changed.
-
*** HTML export table row customization changes
Variable ~org-html-table-row-tags~ has been split into
~org-html-table-row-open-tag~ and ~org-html-table-row-close-tag~.
Both new variables can be either a string or a function which will be
called with 6 parameters.
+*** =ITEM= special property returns headline without stars
* Version 8.3
** Incompatible changes
diff --git a/lisp/org-colview.el b/lisp/org-colview.el
index 732cb6c..2b1a5c4 100644
--- a/lisp/org-colview.el
+++ b/lisp/org-colview.el
@@ -162,7 +162,8 @@ This is the compiled version of the format.")
(interactive)
(save-excursion
(beginning-of-line)
- (let* ((level-face (and (looking-at "\\(\\**\\)\\(\\* \\)")
+ (let* ((level (org-current-level))
+ (level-face (and (looking-at "\\(\\**\\)\\(\\* \\)")
(org-get-level-face 2)))
(ref-face (or level-face
(and (eq major-mode 'org-agenda-mode)
@@ -211,7 +212,10 @@ This is the compiled version of the format.")
((functionp org-columns-modify-value-for-display-function)
(funcall org-columns-modify-value-for-display-function
title val))
- ((equal property "ITEM") (org-columns-compact-links val))
+ ((equal property "ITEM")
+ (concat (make-string level ?*)
+ " "
+ (org-columns-compact-links val)))
(fc (org-columns-number-to-string
(org-columns-string-to-number val fm) fm fc))
((and calc (functionp calc)
diff --git a/lisp/org.el b/lisp/org.el
index 9c6f5d0..5a6c74e 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -15622,11 +15622,10 @@ strings."
(when (or (not specific) (string= specific "ITEM"))
(when (looking-at org-complex-heading-regexp)
(push (cons "ITEM"
- (concat
- (org-match-string-no-properties 1)
- (let ((title (org-match-string-no-properties 4)))
- (when (org-string-nw-p title)
- (concat " " (org-remove-tabs title))))))
+ (let ((title (match-string-no-properties 4)))
+ (if (org-string-nw-p title)
+ (org-remove-tabs title)
+ "")))
props))
(when specific (throw 'exit props)))
(when (or (not specific) (string= specific "TODO"))
diff --git a/testing/lisp/test-org.el b/testing/lisp/test-org.el
index 9edc9e0..b0b7539 100644
--- a/testing/lisp/test-org.el
+++ b/testing/lisp/test-org.el
@@ -3622,11 +3622,11 @@ Paragraph<point>"
"Test `org-entry-properties' specifications."
;; Get "ITEM" property.
(should
- (equal "* H"
+ (equal "H"
(org-test-with-temp-text "* TODO H"
(cdr (assoc "ITEM" (org-entry-properties nil "ITEM"))))))
(should
- (equal "* H"
+ (equal "H"
(org-test-with-temp-text "* TODO H"
(cdr (assoc "ITEM" (org-entry-properties))))))
;; Get "TODO" property. TODO keywords are case sensitive.