Subject: 25.1, 26.0.50; ‘eshell/which’ abuses‘describe-function’

From: Dmitry Alexandrov <[email-masked]>
Date: Fri, 12 May 2017 05:18:52 +0300

‘eshell/which’ in its part, that locates built-in commands (‘$ which which’ for example) and elisp functions in general, looks like a dirty hack [0]: it calls interactive ‘describe-function’ command and parses *Help* buffer.

I encounered two user-visible consequences of this, which perceived as bugs by me:

— When ‘*Help*’ buffer is configured to be shown in a dedicated frame (e. g. (setq pop-up-frames t)), every  ‘$ which <build-in command>’ generates a new frame and do not close it.

- When ‘*Help*‘ buffer is already opened, ‘$ which <build-in command>’: (1) raises the frame where it’s opened; (2) kills it, losing its history ([back] / [forward]).

[0] http://git.sv.gnu.org/gitweb/?p=emacs.git;a=blob;f=lisp/eshell/esh-cmd.el;hb=cee4128#l1151