Perfect, that did what I wanted more precisely: ----------------------- (require 'help-fns) (require 'seq) (defun aa/show-interactive-commands () (interactive) (seq-sort-by #'length #'< (all-completions "" #'help--symbol-completion-table (lambda (f) (commandp f))))) ----------------------- Returns a list (sorted by size) of available interactive commands. I can now make them known to i3 to integrate them on demand. Great! Thanks, Alex On Do, Nov 04 2021, 10:44:17, Robert Pluim wrote: >>>>>> On Thu, 04 Nov 2021 09:08:26 +0100, Alexander Asteroth said: > > Alexander> Dear all, > Alexander> I don't know if I'm right here but I don't find a group that is devoted > Alexander> to elisp programming. I'm trying to write a little funtion that I can > Alexander> call from emacsclient to get a list of interactive functions > Alexander> available. The result shoud be a list of strings or just one string, > Alexander> more or less what the *Completions* buffer displays when pressing > Alexander> M-x followed by . I'm sure there must be a very simple solution to > Alexander> this but somehow I get lost in the code in simple.el on my search for > Alexander> it. > > You mean something like this? > > (all-completions "" > #'help--symbol-completion-table > (lambda (f) > (commandp f))) > > (that returns quite a few things) > > Robert