dba097229e8909202fcb4f67766464e0fc13b321 — Samuel Culpepper a month ago c6aef31
lisp/org-eldoc.el: Fix propertizing of non-string header args

sql-mode exposes a header-arg ~:dbport~, which accepts only number
args[fn:1], yet ~org-eldoc-get-src-header~ uses ~string=~ to
quick-exit in the propertizing lambda, which operates directly on the
header args given by ~org-babel-get-src-block-info~; in which there is
no value normalisation, thus can yield /any/ type, given that a header
arg may some arbitrary elisp expression.  Here we cast all objects to
their printed representation using the string directive ~%s~.

[fn:1] this numeric arg however, is only enforced by
~org-babel-sql-dbstring-*~ for most vendors, as:

  (when port (format "-p%d" port))
1 files changed, 4 insertions(+), 2 deletions(-)

M lisp/org-eldoc.el
M lisp/org-eldoc.el => lisp/org-eldoc.el +4 -2
@@ 81,11 81,13 @@
           ": "
            (lambda (elem)
              (when (and (cdr elem) (not (string= "" (cdr elem))))
              (when-let* ((val (and (cdr elem)
                                    (format "%s" (cdr elem))))
                          (_ (not (string-empty-p val))))
                 (propertize (symbol-name (car elem)) 'face 'org-list-dt)
                 " "
                 (propertize (format "%s" (cdr elem)) 'face 'org-verbatim)
                 (propertize val 'face 'org-verbatim)
                 " ")))
            hdr-args " ")))))))