Max Nikulin <maniku...@gmail.com> writes: > To get impression of the new feature in action, I modified ol-info.el. > First patch does not depend on :insert-description and might be useful > per se. Second one just enables the feature.
Thanks! The patches look useful. You should also add an entry to ORG-NEWS. Otherwise, I just have two minor comments. > +(defun org-info-description-as-command (link desc) > + "Info link description that can be pasted as command. > + > +For the folloing LINK ^following > + > + \"info:elisp::Non-ASCII in Strings\" > + > +the result is > + > + info \"(elisp) Non-ASCII in Strings\" > + > +that may be executed as a shell command or evaluated by > +\\[eval-expression] (wrapped with parenthesis) to read the manual > +in Emacs. > + > +Calling convention is similar to `org-link-make-description-function'. > +DESC has higher priority and returned when it is not nil. > +If LINK is not an info link then DESC is returned." > + (or (org-string-nw-p desc) > + (let* ((file-node (org-info-link-file-node link)) > + (file (car file-node)) > + (node (cadr file-node))) pcase-let would be shorter here. -- Ihor Radchenko, Org mode contributor, Learn more about Org mode at https://orgmode.org/. Support Org development at https://liberapay.com/org-mode, or support my work at https://liberapay.com/yantar92