[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/hyperbole d0dd9202d8 06/19: HyRolo search org-directory
From: |
ELPA Syncer |
Subject: |
[elpa] externals/hyperbole d0dd9202d8 06/19: HyRolo search org-directory, org-roam files or with helm-org-rifle |
Date: |
Sun, 24 Jul 2022 16:57:37 -0400 (EDT) |
branch: externals/hyperbole
commit d0dd9202d89fb753e92ddfef6688c3d8c3039c6b
Author: Bob Weiner <rsw@gnu.org>
Commit: Bob Weiner <rsw@gnu.org>
HyRolo search org-directory, org-roam files or with helm-org-rifle
---
ChangeLog | 6 ++++++
hyrolo.el | 53 ++++++++++++++++++++++++++++++++++++++++++++++++++++-
2 files changed, 58 insertions(+), 1 deletion(-)
diff --git a/ChangeLog b/ChangeLog
index f7af3a5ec2..3c97134d18 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -85,6 +85,12 @@
MANIFEST: Added above file.
2022-07-06 Bob Weiner <rsw@gnu.org>
+2022-07-02 Bob Weiner <rsw@gnu.org>
+
+* hyrolo.el (hyrolo-org, hyrolo-helm-org-rifle, hyrolo-org-roam): Add HyRolo-
+ based searching of Org files, helm-based searching of HyRolo files and
+ Hyrolo-based searching of Org Roam files.
+
* hsys-org.el (hsys-org-link-at-p, hsys-org-heading-at-p): Update to use
'smart-eolp' and 'smart-eobp'.
diff --git a/hyrolo.el b/hyrolo.el
index f9863e4b90..1d50f59063 100644
--- a/hyrolo.el
+++ b/hyrolo.el
@@ -3,7 +3,7 @@
;; Author: Bob Weiner
;;
;; Orig-Date: 7-Jun-89 at 22:08:29
-;; Last-Mod: 18-Jun-22 at 21:53:51 by Mats Lidell
+;; Last-Mod: 3-Jul-22 at 09:46:59 by Bob Weiner
;;
;; Copyright (C) 1991-2022 Free Software Foundation, Inc.
;; See the "HY-COPY" file for license information.
@@ -279,6 +279,8 @@ entry which begins with the parent string."
(setq again nil match t)))))
(setq buffer-read-only nil)
(unless match
+ (unless (zerop (current-column))
+ (insert "\n"))
(insert (concat level "*")
(if (string-equal entry-spc "") " " entry-spc)
name "\n")
@@ -1097,6 +1099,55 @@ otherwise just use the cdr of the item."
'entry)
token "* "))))
+;;; ************************************************************************
+;;; Org Package Integrations
+;;; ************************************************************************
+
+;;;###autoload
+(defun hyrolo-helm-org-rifle ()
+ "Prompt for a search pattern with helm and interactively show all matches
from `hyrolo-file-list'."
+ (interactive)
+ (unless (package-installed-p 'helm-org-rifle)
+ (package-install 'helm-org-rifle))
+ (require 'helm-org-rifle)
+ (let ((files (seq-filter #'file-readable-p hyrolo-file-list)))
+ (save-excursion
+ (mapc (lambda (file)
+ (set-buffer (find-file-noselect file))
+ (org-mode))
+ files))
+ (helm-org-rifle-files files)))
+
+;;;###autoload
+(defun hyrolo-org ()
+ "Prompt for patterns and search Org directory files for string or
logic-based matches."
+ (interactive "sFind Org directory string (or logical expression): \nP")
+ (require 'org)
+ (unless (file-readable-p org-directory)
+ (make-directory org-directory))
+ (if (file-readable-p org-directory)
+ (if (fboundp #'helm-org-rifle-org-directory)
+ (helm-org-rifle-org-directory)
+ (let ((hyrolo-file-list (cddr (directory-files org-directory t
"\\.org$"))))
+ (hyrolo-fgrep string max-matches)))
+ (error "(hyrolo-org): `org-directory', \"%s\", does not exist"
org-directory)))
+
+;;;###autoload
+(defun hyrolo-org-roam (string &optional max-matches)
+ "Search Org Roam directory files for string or logic-based matches."
+ (interactive "sFind Org Roam directory string (or logical expression): \nP")
+ (unless (package-installed-p 'org-roam)
+ (package-install #'org-roam))
+ (require 'org-roam)
+ (unless (file-readable-p org-roam-directory)
+ (make-directory org-roam-directory))
+ (unless org-roam-db-autosync-mode
+ (org-roam-db-autosync-mode))
+ (if (file-readable-p org-roam-directory)
+ (let ((hyrolo-file-list (cddr (directory-files org-roam-directory t
"\\.org$"))))
+ (hyrolo-fgrep string max-matches))
+ (error "(hyrolo-org-roam): `org-roam-directory', \"%s\", does not exist"
org-roam-directory)))
+
;;; ************************************************************************
;;; Public functions
;;; ************************************************************************
- [elpa] externals/hyperbole updated (89913d256c -> 75c9214c35), ELPA Syncer, 2022/07/24
- [elpa] externals/hyperbole 2d2fcb97d9 04/19: Add a number of small updates with little functional change, ELPA Syncer, 2022/07/24
- [elpa] externals/hyperbole 96deda39db 05/19: demo-tests.el - Use 'sh' instead of 'bash', ELPA Syncer, 2022/07/24
- [elpa] externals/hyperbole c9a58fc673 01/19: hsys-youtube.el: Add action button types for Youtube videos, ELPA Syncer, 2022/07/24
- [elpa] externals/hyperbole d0dd9202d8 06/19: HyRolo search org-directory, org-roam files or with helm-org-rifle,
ELPA Syncer <=
- [elpa] externals/hyperbole 44262d14a7 14/19: Resolve all but one test case issues from the latest updates, ELPA Syncer, 2022/07/24
- [elpa] externals/hyperbole 80d1d2dd4c 12/19: Update tests to work with new ibut:create code, ELPA Syncer, 2022/07/24
- [elpa] externals/hyperbole c38d137510 03/19: Merge branch 'master' of hyperbole, ELPA Syncer, 2022/07/24
- [elpa] externals/hyperbole e9015341c0 08/19: hypb.el: Support devdocs-lookup package, ELPA Syncer, 2022/07/24
- [elpa] externals/hyperbole 4860da0802 07/19: hsettings.el (hyperbole-web-search): Add flag to return search expr, ELPA Syncer, 2022/07/24
- [elpa] externals/hyperbole 72ca3f0041 10/19: hui-mini.el: Multi-line menu support; add To/ and Doc a-z menus, ELPA Syncer, 2022/07/24
- [elpa] externals/hyperbole 7a86ea33e2 09/19: Add ibut:create and allow Assist Key :help for Elisp functions, ELPA Syncer, 2022/07/24
- [elpa] externals/hyperbole c517641b51 18/19: * ibut:create Ensure lbl-key is always set to name, if available, ELPA Syncer, 2022/07/24
- [elpa] externals/hyperbole 694f3110fd 02/19: hsys-org.el: Activate only if not at eol or eob, ELPA Syncer, 2022/07/24
- [elpa] externals/hyperbole d256f195ee 11/19: Fix major issues with ibut:create but some tests still fail, ELPA Syncer, 2022/07/24