[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Creating many explicit buttons (each pointing to a file)
From: |
Alexis Praga |
Subject: |
Re: Creating many explicit buttons (each pointing to a file) |
Date: |
Sun, 08 Oct 2023 09:29:23 +0000 |
------- Original Message -------
On Sunday, October 8th, 2023 at 11:21 AM, Mats Lidell <mats.lidell@lidells.se>
wrote:
>
>
> 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
Many thanks for your answers ! I've tried to edit the .hypb file manually but
the programmatic version is easier.
Also, thanks for the code as I'm struggling to write some lisp :)
Alexis
signature.asc
Description: OpenPGP digital signature