Function: hyrolo-org

hyrolo-org is an autoloaded, interactive and byte-compiled function defined in hyrolo.el.

Signature

(hyrolo-org STRING &optional MAX-MATCHES ORG-FILES)

Documentation

Find STRING or logic-based matches up to optional MAX-MATCHES in ORG-FILES.

Interactively, MAX-MATCHES is the prefix argument.

Key Bindings

Source Code

;; Defined in ~/.emacs.d/elpa/hyperbole-20260414.325/hyrolo.el
;;; ************************************************************************
;;; Org Package Integrations
;;; ************************************************************************

;;;###autoload
(defun hyrolo-org (string &optional max-matches org-files)
  "Find STRING or logic-based matches up to optional MAX-MATCHES in ORG-FILES.
Interactively, MAX-MATCHES is the prefix argument."
  (interactive (let ((input-and-matching-files
		      (hyrolo-grep-input
		       #'read-string
		       "Find Org directory string (or logical sexpression)"
		       (list (expand-file-name "*.org" org-directory)))))
		 (list (car input-and-matching-files)
		       current-prefix-arg
		       (mapcar (lambda (f) (expand-file-name f org-directory))
			       (cadr input-and-matching-files)))))
  (require 'org)
  (unless (file-readable-p org-directory)
    (make-directory org-directory))
  (if (file-readable-p org-directory)
      (let ((hyrolo-file-list
	     (or org-files (list (expand-file-name "*.org" org-directory)))))
	(hyrolo-fgrep string max-matches))
    (error "(hyrolo-org): `org-directory', \"%s\", does not exist" org-directory)))