diff options
author | Nicolas Goaziou <mail@nicolasgoaziou.fr> | 2018-12-19 22:39:24 +0100 |
---|---|---|
committer | Nicolas Goaziou <mail@nicolasgoaziou.fr> | 2018-12-19 22:39:24 +0100 |
commit | 6aa7c798d5df2b11feb3b82b049686aad306e30d (patch) | |
tree | 76ef21bed4585599adefab72952bee318587f1d0 | |
parent | 9c3a9a96872904e71f3295addaad8f269a995c45 (diff) | |
parent | 255c9c1655e37b8a456ea7fd7ed8c33a1fb10b9c (diff) | |
download | org-mode-6aa7c798d5df2b11feb3b82b049686aad306e30d.tar.gz |
Merge branch 'master' into next
-rw-r--r-- | lisp/org-colview.el | 24 | ||||
-rw-r--r-- | lisp/org-protocol.el | 7 |
2 files changed, 22 insertions, 9 deletions
diff --git a/lisp/org-colview.el b/lisp/org-colview.el index 2aa77e4..507c58a 100644 --- a/lisp/org-colview.el +++ b/lisp/org-colview.el @@ -233,21 +233,27 @@ See `org-columns-summary-types' for details.") "--" ["Quit" org-columns-quit t])) -(defun org-columns--displayed-value (spec value) +(defun org-columns--displayed-value (spec value &optional no-star) "Return displayed value for specification SPEC in current entry. + SPEC is a column format specification as stored in `org-columns-current-fmt-compiled'. VALUE is the real value to -display, as a string." +display, as a string. + +When NO-STAR is non-nil, do not add asterisks before displayed +value for ITEM property." (or (and (functionp org-columns-modify-value-for-display-function) (funcall org-columns-modify-value-for-display-function (nth 1 spec) ;column name value)) (pcase spec (`("ITEM" . ,_) - (concat (make-string (1- (org-current-level)) - (if org-hide-leading-stars ?\s ?*)) - "* " - (org-link-display-format value))) + (let ((stars + (and (not no-star) + (concat (make-string (1- (org-current-level)) + (if org-hide-leading-stars ?\s ?*)) + "* ")))) + (concat stars (org-columns-compact-links value)))) (`(,_ ,_ ,_ ,_ nil) value) ;; If PRINTF is set, assume we are displaying a number and ;; obey to the format string. @@ -280,7 +286,11 @@ possible to override it with optional argument COMPILED-FMT." (get-text-property (point) 'duration)) 'face 'org-warning)) ""))) - (list spec v (org-columns--displayed-value spec v)))))) + ;; A non-nil COMPILED-FMT means we're calling from Org + ;; Agenda mode, where we do not want leading stars for + ;; ITEM. Hence the optional argument for + ;; `org-columns--displayed-value'. + (list spec v (org-columns--displayed-value spec v compiled-fmt)))))) (or compiled-fmt org-columns-current-fmt-compiled)))) (defun org-columns--set-widths (cache) diff --git a/lisp/org-protocol.el b/lisp/org-protocol.el index 88f471e..a0a10d3 100644 --- a/lisp/org-protocol.el +++ b/lisp/org-protocol.el @@ -503,8 +503,11 @@ Now template ?b will be used." :initial region :query parts) (raise-frame) - (org-capture nil template)) - (message "Item captured.")) + (org-capture nil template) + (message "Item captured.") + ;; Make sure we do not return a string, as `server-visit-files', + ;; through `server-edit', would interpret it as a file name. + nil)) (defun org-protocol-convert-query-to-plist (query) "Convert QUERY key=value pairs in the URL to a property list." |