diff --git a/doc/org.texi b/doc/org.texi index ae7f1308b..a14917cac 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 9a833ae70..53fd34d1b 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 732cb6ccb..2b1a5c4c7 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 9c6f5d084..5a6c74e71 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 9edc9e0b7..b0b7539f9 100644 --- a/testing/lisp/test-org.el +++ b/testing/lisp/test-org.el @@ -3622,11 +3622,11 @@ Paragraph" "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.