hyperbole-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: hyperbole keeps resetting hyrolo-file-list to its default state


From: Robert Weiner
Subject: Re: hyperbole keeps resetting hyrolo-file-list to its default state
Date: Sun, 5 Feb 2023 16:03:37 -0500

Hi Marcus:

We have found and fixed the problem for the next Hyperbole release; it was in the hyrolo-initialize-file-list function in hyrolo.el.  Simply replace that function with the one below in your release, recompile the file and then restart your Emacs and your customized value should stay active.

(defun hyrolo-initialize-file-list (&optional force-init-flag)
  "Initialize the list of files used for HyRolo search if not already initialized."
  (interactive)
  (when (or force-init-flag (not (boundp 'hyrolo-file-list)) (not hyrolo-file-list))
    (let* ((gcontacts (when (hyrolo-google-contacts-p) google-contacts-buffer-name))
           (ms "~/.rolo.otl")
           (posix "~/.rolo.otl")
           (list (delq nil (if (and (boundp 'bbdb-file) (stringp bbdb-file))
                               (if hyperb:microsoft-os-p
                                   (list ms bbdb-file gcontacts)
                                 (list  "~/.rolo.otl" bbdb-file gcontacts))
                             (if hyperb:microsoft-os-p
                                 (list ms gcontacts)
                               (list posix gcontacts))))))
      (setq hyrolo-file-list list)
      (when (called-interactively-p 'interactive)
        (message "HyRolo Search List: %S" list))
      list)))

------------------------------------------------------------------------

On Sat, Feb 4, 2023 at 5:51 PM Marcus Kammer <marcus.kammer@mailbox.org> wrote:
Hello Fellows,

I do not know what I am doing wrong here. I used the following elips
code to set the "hyrolo-file-list" variable.

#+begin_src emacs-lisp
(add-hook 'hyperbole-init-hook
          (lambda ()
            (setq hyrolo-file-list
                  (append (hyrolo-initialize-file-list)
                          (directory-files org-roam-directory t "\\.org$")
                          (directory-files "~/Documents/rolo" t "\\.otl$")))))
#+end_src

Afte starting Emacs, I check the content of "hyrolo-file-list" with
{C-h v}, and I can see all the paths of my org files.
After using any key of hyperbole, e.g. {C-h h d d} or {C-h h r w}
the variable "hyrolo-file-list" is set back to its default state:
"~/.rolo.otl".

Even if Im using the custom interface to set the variable to another
value, calling hyperbole resets it to its default value.

Please help! Thanks a lot!

--
Cheers Marcus (Nuremberg . Germany)
GnuPG Key: https://meta.sr.ht/~marcuskammer.pgp
Fingerprint: 86DB 0F30 F9F1 661A 54E2 1664 C374 817B E285 268F


reply via email to

[Prev in Thread] Current Thread [Next in Thread]