diff options
-rw-r--r-- | lib/doc/jao-recoll.el | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/lib/doc/jao-recoll.el b/lib/doc/jao-recoll.el index a49d183..f43451f 100644 --- a/lib/doc/jao-recoll.el +++ b/lib/doc/jao-recoll.el @@ -75,9 +75,8 @@ using org mode." (when (looking-at-p "Recoll query:") (setq jao-recoll--last-full-query (string-trim (thing-at-point 'line))) - (let ((kill-whole-line nil)) - (kill-line) - (insert query)) + (let ((kill-whole-line nil)) (kill-line)) + (insert query) (forward-line 2)) (open-line 1) (while (search-forward-regexp jao-recoll--file-regexp nil t) @@ -90,13 +89,15 @@ using org mode." (t (match-string 2)))) (replace-match (format "* [[%s][\\3]] (\\1)" lnk)) (forward-line) - (let ((kill-whole-line t)) (kill-line)) - (while (and (not (eobp)) (not (looking-at-p "/SNIPPETS"))) - (if (looking-at "^\\([1-9][0-9]*\\) : ") - (replace-match (format " - [[%s::\\1][\\1]] : " lnk)) - (insert " - ")) - (forward-line 1)) - (unless (eobp) (let ((kill-whole-line t)) (kill-line)))) + (when (looking-at-p "SNIPPETS") + (let ((kill-whole-line t)) + (kill-line) + (while (and (not (eobp)) (not (looking-at-p "/SNIPPETS"))) + (if (looking-at "^\\([1-9][0-9]*\\) : ") + (replace-match (format " - [[%s::\\1][\\1]] : " lnk)) + (insert " - ")) + (forward-line 1)) + (unless (eobp) (kill-line))))) (pop-to-buffer (current-buffer)) (goto-char (point-min)) (org-next-visible-heading 1) @@ -107,7 +108,7 @@ using org mode." (define-key recoll-mode-map [?p] 'org-previous-link) (define-key recoll-mode-map [?q] 'bury-buffer) (define-key recoll-mode-map [?r] 'jao-recoll-requery) -(define-key recoll-mode-map [?q] 'jao-recoll-requery) +(define-key recoll-mode-map [?g] 'jao-recoll-requery) (define-key recoll-mode-map [?w] 'jao-recoll-show-query) |