0

I would like to display file names in my global TODO list in column view without directories and extensions.

(setq org-columns-default-format "%TODO %FILE %ITEM") followed by C-catC-cC-xC-c leads to something like

Global list of TODO items of type: ALL Available with ‘N r’: (0)[ALL]
(1)TODO (2)QUICK (3)WAITING (4)NEXT (5)STALL (6)DONE (7)CANCELLED  
TODO   | c:/Users/micha/Dropbox/org/175-stuff.org                      | * Todo 1
TODO   | c:/Users/micha/Dropbox/org/175-stuff.org                      | * Todo 2
TODO   | c:/Users/micha/Dropbox/org/175-stuff.org                      | * Todo 3
TODO   | c:/Users/micha/Dropbox/org/250-petcare.org                    | * Clean dog

I tried setting up a summarizer with

(setq org-columns-default-format "%TODO %FILE{filenamebase} %ITEM")

(defun summarize-file-name-base (values printf)
  (format (or printf "%s") (file-name-base (car values))))

(add-to-list 'org-columns-summary-types '("filenamebase" . summarize-file-name-base))

If I go back to the agenda list and refresh with g then go back to column mode with C-cC-xC-c I get org-entry-put: The FILE property cannot be set with ‘org-entry-put’. If I remove the file-name-base call from the summarizer so that it just returns its input in the case of a list of a single string I don't get an error but I also get no change in formatting.

(defun summarize-file-name-base (values printf)
      (format (or printf "%s") (car values)))

Is there another way to do this?

  • 1
    I can reproduce the problem but I have no idea how to fix it. I would suggest posting it to the org-mode ML. – NickD Jun 13 '18 at 17:12
  • Good idea. I'll do that after it falls off the front page on emacs.stackexchange – Michael Hoffman Jun 13 '18 at 18:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.