pkg update and first config fix
org-brain not working, add org-roam
This commit is contained in:
@@ -3,9 +3,9 @@
|
||||
;; Copyright (C) 2016-2020 Wilfred Hughes <me@wilfred.me.uk>
|
||||
|
||||
;; Author: Wilfred Hughes <me@wilfred.me.uk>
|
||||
;; Version: 1.4
|
||||
;; Package-Version: 20211009.1531
|
||||
;; Package-Commit: c06aec4486c034d0d4efae98cb7054749f9cc0ec
|
||||
;; Version: 1.5
|
||||
;; Package-Version: 20220704.2141
|
||||
;; Package-Commit: af73739084637c8ebadad337a8fe58ff4f1d2ec1
|
||||
;; Keywords: lisp
|
||||
;; Package-Requires: ((dash "2.12.0") (s "1.11.0"))
|
||||
|
||||
@@ -98,9 +98,12 @@ SYMBOL-POSITIONS are 0-indexed, relative to READ-START-POS."
|
||||
(let* ((read-with-symbol-positions t)
|
||||
(read-start-pos (point))
|
||||
(form (read (current-buffer)))
|
||||
(symbols (if (boundp 'read-symbol-positions-list)
|
||||
read-symbol-positions-list
|
||||
(read-positioning-symbols (current-buffer))))
|
||||
(end-pos (point))
|
||||
(start-pos (elisp-refs--start-pos end-pos)))
|
||||
(list form start-pos end-pos read-symbol-positions-list read-start-pos)))
|
||||
(list form start-pos end-pos symbols read-start-pos)))
|
||||
|
||||
(defvar elisp-refs--path nil
|
||||
"A buffer-local variable used by `elisp-refs--contents-buffer'.
|
||||
@@ -582,7 +585,8 @@ render a friendly results buffer."
|
||||
;; Prepare the buffer for the user.
|
||||
(elisp-refs-mode)))
|
||||
;; Cleanup buffers created when highlighting results.
|
||||
(kill-buffer elisp-refs--highlighting-buffer)))
|
||||
(when elisp-refs--highlighting-buffer
|
||||
(kill-buffer elisp-refs--highlighting-buffer))))
|
||||
|
||||
(defun elisp-refs--loaded-bufs ()
|
||||
"Return a list of open buffers, one for each path in `load-path'."
|
||||
@@ -783,8 +787,9 @@ search."
|
||||
(define-derived-mode elisp-refs-mode special-mode "Refs"
|
||||
"Major mode for refs results buffers.")
|
||||
|
||||
(defun elisp-refs-visit-match ()
|
||||
"Go to the search result at point."
|
||||
(defun elisp--refs-visit-match (open-fn)
|
||||
"Go to the search result at point.
|
||||
Open file with function OPEN_FN. `find-file` or `find-file-other-window`"
|
||||
(interactive)
|
||||
(let* ((path (get-text-property (point) 'elisp-refs-path))
|
||||
(pos (get-text-property (point) 'elisp-refs-start-pos))
|
||||
@@ -801,7 +806,7 @@ search."
|
||||
(forward-line -1)
|
||||
(cl-incf line-offset)))
|
||||
|
||||
(find-file path)
|
||||
(funcall open-fn path)
|
||||
(goto-char pos)
|
||||
;; Move point so we're on the same char in the buffer that we were
|
||||
;; on in the results buffer.
|
||||
@@ -815,6 +820,17 @@ search."
|
||||
(cl-incf i))
|
||||
(forward-char 1)))))
|
||||
|
||||
(defun elisp-refs-visit-match ()
|
||||
"Goto the search result at point."
|
||||
(interactive)
|
||||
(elisp--refs-visit-match #'find-file))
|
||||
|
||||
(defun elisp-refs-visit-match-other-window ()
|
||||
"Goto the search result at point, opening in another window."
|
||||
(interactive)
|
||||
(elisp--refs-visit-match #'find-file-other-window))
|
||||
|
||||
|
||||
(defun elisp-refs--move-to-match (direction)
|
||||
"Move point one match forwards.
|
||||
If DIRECTION is -1, moves backwards instead."
|
||||
|
||||
Reference in New Issue
Block a user