Ihor Radchenko <[email protected]> writes:
> Ok. But please double-check that it is really the case.
Checked.
So I have those 3 code snipets:
(defun org-columns--summary-types-completion-function (string)
(docstring-first-line
(cdr (assoc string (append
org-columns-summary-types
org-columns-summary-types-default)))))
(completing-read
"Summary: "
(lambda (string pred flag)
(pcase flag
('t (all-completions string
(delete-dups
(cons '("") ;Allow empty operator.
(mapcar #'car (append
org-columns-summary-types
org-columns-summary-types-default))))
pred))
('metadata (list 'metadata
(cons 'annotation-function
'org-columns--summary-types-completion-function))))))
(defun docstring-first-line (fun)
(let* ((doc (condition-case nil (documentation fun) (error nil)))
(doc (and doc (substring doc 0 (string-search "\n" doc)))))
(if doc
(format " -- %s" doc)
"")))
But I have no idea where to put this piece:
(if doc
(format " -- %s" doc)
"")
It should not be in docstring-first-line.
What do you think?
--
Slawomir Grochowski