[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Creating many explicit buttons (each pointing to a file)
From: |
Mats Lidell |
Subject: |
Re: Creating many explicit buttons (each pointing to a file) |
Date: |
Sun, 08 Oct 2023 11:21:26 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
Hi Alexis,
> Alexis Praga writes:
> Hi,
>
> I'm trying to integrate Hyperbole in my workflow. After watching RWS's
> videos, it does look like a powerful tool.
>
> However, I could not figure out how to make efficiently many explicit
> buttons, each pointing to a file. In org-mode, it's rather easy to
> convert the output of "ls" into as many links.
In the pre-release version there is the ebut:program functions that can be used
to programmatically create an ebut. You'll find the pre relase in elpa-devel,
https://elpa.gnu.org/devel/.
Maybe something along these lines could work for you. Example on how to create
ebuts for all files in a directory and insert them in the current buffer.
(defun my-ebut-creator (dir)
"Create ebuts for all files in DIR and insert them in current buffer."
(interactive "DDirectory: ")
(let ((files (directory-files dir nil directory-files-no-dot-files-regexp)))
(dolist (file files)
(ebut:program file 'link-to-file (expand-file-name file dir)))))
Yours
--
%% Mats