Change/Fix: (helm-org-ql.el) Wrap in eval-and-compile
This avoids errors when Helm is not installed, and it seems to work correctly when Helm is installed. This should be an improvement until this file is put in its own package.
This commit is contained in:
parent
11a0466f92
commit
0648196076
1 changed files with 136 additions and 134 deletions
|
|
@ -28,15 +28,14 @@
|
|||
|
||||
;;; Code:
|
||||
|
||||
;;;; Requirements
|
||||
(eval-and-compile
|
||||
|
||||
(eval-when-compile
|
||||
;; Require these when compiling, but not necessarily on load.
|
||||
(require 'org)
|
||||
|
||||
(require 'org-ql)
|
||||
(require 'org-ql-search)
|
||||
|
||||
;; (require 'helm)
|
||||
;; (require 'helm-org)
|
||||
(require 'org-ql-search))
|
||||
|
||||
;;;; Compatibility
|
||||
|
||||
|
|
@ -53,13 +52,16 @@
|
|||
(defvar helm-pattern)
|
||||
(defvar helm-input-idle-delay)
|
||||
|
||||
(when (require 'helm nil 'noerror)
|
||||
|
||||
;; Requirements.
|
||||
(require 'helm-org)
|
||||
|
||||
;;;; Variables
|
||||
|
||||
(defvar helm-org-ql-map
|
||||
(let ((map (make-sparse-keymap))
|
||||
(mappings '(
|
||||
"C-x C-s" helm-org-ql-save
|
||||
)))
|
||||
(mappings '("C-x C-s" helm-org-ql-save)))
|
||||
(cl-loop for (key fn) on mappings by #'cddr
|
||||
do (define-key map (kbd key) fn))
|
||||
(make-composed-keymap map helm-map))
|
||||
|
|
@ -223,7 +225,7 @@ WINDOW-WIDTH should be the width of the Helm window."
|
|||
(path (if helm-org-ql-reverse-paths
|
||||
(concat heading "\\" (s-join "\\" (nreverse path)))
|
||||
(concat (s-join "/" path) "/" heading))))
|
||||
(cons (concat prefix path) (point-marker))))
|
||||
(cons (concat prefix path) (point-marker))))))
|
||||
|
||||
;;;; Footer
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue