pkg update and first config fix
org-brain not working, add org-roam
This commit is contained in:
@@ -27,6 +27,7 @@
|
||||
;;; Code:
|
||||
|
||||
(eval-when-compile
|
||||
(require 'cl-lib)
|
||||
(require 'subr-x))
|
||||
|
||||
(defface ivy-cursor
|
||||
@@ -97,15 +98,51 @@ Then attach the overlay to the character before point."
|
||||
(declare-function ivy-state-current "ivy")
|
||||
(declare-function ivy-state-window "ivy")
|
||||
|
||||
(defun ivy-overlay--current-column ()
|
||||
"Return `current-column', ignoring `ivy-overlay-at'.
|
||||
Temporarily make `ivy-overlay-at' invisible so that the
|
||||
`string-width' of its `display' property is not included in the
|
||||
`current-column' calculation by Emacs >= 29.
|
||||
See URL `https://bugs.gnu.org/53795'."
|
||||
(if (overlayp ivy-overlay-at)
|
||||
(cl-letf (((overlay-get ivy-overlay-at 'invisible) t))
|
||||
(1+ (current-column)))
|
||||
(current-column)))
|
||||
|
||||
(defun ivy-overlay-impossible-p (_str)
|
||||
(or
|
||||
(and (eq major-mode 'org-mode)
|
||||
(plist-get (text-properties-at (point)) 'src-block))
|
||||
;; If this breaks, an alternative is to call the canonical function
|
||||
;; `org-in-src-block-p', which is slower. Neither approach works
|
||||
;; in Org versions that shipped with Emacs < 26, however.
|
||||
(get-text-property (point) 'src-block))
|
||||
(<= (window-height) (+ ivy-height 2))
|
||||
(= (point) (point-min))
|
||||
(< (- (+ (window-width) (window-hscroll)) (current-column))
|
||||
(bobp)
|
||||
(< (- (+ (window-width) (window-hscroll))
|
||||
(ivy-overlay--current-column))
|
||||
30)))
|
||||
|
||||
(defun ivy-overlay--org-indent ()
|
||||
"Return `ivy-overlay-at' indentation due to `org-indent-mode'.
|
||||
That is, the additional number of columns needed under the mode."
|
||||
;; Emacs 28 includes the following fix for `https://bugs.gnu.org/49695':
|
||||
;;
|
||||
;; "Fix display of line/wrap-prefix when there's a display property at BOL"
|
||||
;; 662f91a795 2021-07-22 21:23:48 +0300
|
||||
;; `https://git.sv.gnu.org/cgit/emacs.git/commit/?id=662f91a795'
|
||||
;;
|
||||
;; This increasingly misindents `ivy-overlay-at' with each additional Org
|
||||
;; level. See also `https://github.com/abo-abo/swiper/commit/ee7f7f8c79'.
|
||||
;; FIXME: Is there a better way to work around this?
|
||||
(if (and (eq major-mode 'org-mode)
|
||||
(bound-and-true-p org-indent-mode)
|
||||
(< emacs-major-version 28))
|
||||
(let ((level (org-current-level)))
|
||||
(if (org-at-heading-p)
|
||||
(1- level)
|
||||
(* org-indent-indentation-per-level (or level 1))))
|
||||
0))
|
||||
|
||||
(defun ivy-display-function-overlay (str)
|
||||
"Called from the minibuffer, display STR in an overlay in Ivy window.
|
||||
Hide the minibuffer contents and cursor."
|
||||
@@ -134,17 +171,11 @@ Hide the minibuffer contents and cursor."
|
||||
(list "\n"
|
||||
(ivy-left-pad
|
||||
(string-remove-prefix "\n" str)
|
||||
(+
|
||||
(if (and (eq major-mode 'org-mode)
|
||||
(bound-and-true-p org-indent-mode))
|
||||
(if (org-at-heading-p)
|
||||
(1- (org-current-level))
|
||||
(* org-indent-indentation-per-level (or (org-current-level) 1)))
|
||||
0)
|
||||
(save-excursion
|
||||
(when ivy-completion-beg
|
||||
(goto-char ivy-completion-beg))
|
||||
(current-column)))))))))
|
||||
(+ (ivy-overlay--org-indent)
|
||||
(save-excursion
|
||||
(when ivy-completion-beg
|
||||
(goto-char ivy-completion-beg))
|
||||
(ivy-overlay--current-column)))))))))
|
||||
(let ((cursor-offset (1+ (length ivy-text))))
|
||||
(add-face-text-property cursor-offset (1+ cursor-offset)
|
||||
'ivy-cursor t overlay-str))
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
(define-package "ivy" "20211231.1730" "Incremental Vertical completYon"
|
||||
(define-package "ivy" "20220926.1250" "Incremental Vertical completYon"
|
||||
'((emacs "24.5"))
|
||||
:commit "c97ea72285f2428ed61b519269274d27f2b695f9" :authors
|
||||
:commit "29b61fe1f4d5268d750b666a7ffc1269e22c6477" :authors
|
||||
'(("Oleh Krehel" . "ohwoeowho@gmail.com"))
|
||||
:maintainer
|
||||
'("Oleh Krehel" . "ohwoeowho@gmail.com")
|
||||
|
||||
@@ -277,8 +277,8 @@ Example:
|
||||
(cl-subseq recentf-list 0 20))
|
||||
|
||||
(ivy-set-sources
|
||||
'counsel-locate
|
||||
'((small-recentf)
|
||||
\\='counsel-locate
|
||||
\\='((small-recentf)
|
||||
(original-source)))"
|
||||
(setq ivy--sources-list
|
||||
(plist-put ivy--sources-list cmd sources)))
|
||||
@@ -433,7 +433,9 @@ the restoring themselves.")
|
||||
(end (region-end))
|
||||
(eol (save-excursion (goto-char beg) (line-end-position))))
|
||||
(buffer-substring-no-properties beg (min end eol))))
|
||||
((thing-at-point 'url))
|
||||
((let ((url (thing-at-point 'url)))
|
||||
;; Work around `https://bugs.gnu.org/58091'.
|
||||
(and (stringp url) url)))
|
||||
((and (eq (ivy-state-collection ivy-last) #'read-file-name-internal)
|
||||
(let ((inhibit-message t)
|
||||
(ffap-machine-p-known 'reject))
|
||||
@@ -1822,7 +1824,7 @@ Possible choices: `ivy--regex', `regexp-quote',
|
||||
`ivy--regex-plus', `ivy--regex-fuzzy', `ivy--regex-ignore-order'.
|
||||
|
||||
If a function returns a list, it should format like this:
|
||||
'((\"matching-regexp\" . t) (\"non-matching-regexp\") ...).
|
||||
\\='((\"matching-regexp\" . t) (\"non-matching-regexp\") ...).
|
||||
|
||||
The matches will be filtered in a sequence, you can mix the
|
||||
regexps that should match and that should not match as you
|
||||
@@ -2202,18 +2204,18 @@ customizations apply to the current completion session."
|
||||
(ivy-call)))
|
||||
|
||||
(defun ivy--update-history (hist)
|
||||
(let ((item
|
||||
(if (or (string= ivy-text "")
|
||||
(eq
|
||||
(plist-get (ivy-state-extra-props ivy-last) :caller)
|
||||
'ivy-completing-read)
|
||||
(eq (ivy-state-history ivy-last) 'file-name-history))
|
||||
(ivy-state-current ivy-last)
|
||||
ivy-text)))
|
||||
(cond ((equal item ""))
|
||||
((stringp item)
|
||||
(set hist (cons (propertize item 'ivy-index ivy--index)
|
||||
(delete item (symbol-value hist))))))))
|
||||
(unless (eq hist t)
|
||||
(let ((item
|
||||
(if (or (string= ivy-text "")
|
||||
(eq (plist-get (ivy-state-extra-props ivy-last) :caller)
|
||||
#'ivy-completing-read)
|
||||
(eq (ivy-state-history ivy-last) 'file-name-history))
|
||||
(ivy-state-current ivy-last)
|
||||
ivy-text)))
|
||||
(cond ((equal item ""))
|
||||
((stringp item)
|
||||
(set hist (cons (propertize item 'ivy-index ivy--index)
|
||||
(delete item (symbol-value hist)))))))))
|
||||
|
||||
(defun ivy--cleanup ()
|
||||
;; Fixes a bug in ESS, #1660
|
||||
@@ -3205,10 +3207,11 @@ parts beyond their respective faces `ivy-confirm-face' and
|
||||
(sort (copy-sequence collection) sort)
|
||||
collection)))
|
||||
|
||||
(defcustom ivy-magic-slash-non-match-action 'ivy-magic-slash-non-match-cd-selected
|
||||
"Action to take when a slash is added to the end of a non existing directory.
|
||||
Possible choices are 'ivy-magic-slash-non-match-cd-selected,
|
||||
'ivy-magic-slash-non-match-create, or nil"
|
||||
(defcustom ivy-magic-slash-non-match-action
|
||||
'ivy-magic-slash-non-match-cd-selected
|
||||
"Action to take when a slash is appended to a nonexistent directory.
|
||||
Possible choices are `ivy-magic-slash-non-match-cd-selected',
|
||||
`ivy-magic-slash-non-match-create', or nil"
|
||||
:type '(choice
|
||||
(const :tag "Use currently selected directory"
|
||||
ivy-magic-slash-non-match-cd-selected)
|
||||
@@ -4846,7 +4849,7 @@ This list can be rotated with `ivy-rotate-preferred-builders'."
|
||||
|
||||
(defun ivy--label-and-delete-dups (entries)
|
||||
"Label ENTRIES with history indices."
|
||||
(let ((ht (make-hash-table :test 'equal))
|
||||
(let ((ht (and entries (make-hash-table :test #'equal)))
|
||||
(idx 0)
|
||||
entry
|
||||
accum)
|
||||
@@ -4857,22 +4860,21 @@ This list can be rotated with `ivy-rotate-preferred-builders'."
|
||||
(cl-incf idx))
|
||||
(nreverse accum)))
|
||||
|
||||
(defvar ivy--reverse-i-search-symbol nil
|
||||
"Store the history symbol.")
|
||||
(defvar ivy--reverse-i-search-history nil
|
||||
"Store the minibuffer history variable.")
|
||||
|
||||
(defun ivy-reverse-i-search-kill ()
|
||||
"Remove the current item from history"
|
||||
"Remove the current item from minibuffer history."
|
||||
(interactive)
|
||||
(if (not (eolp))
|
||||
(ivy-kill-line)
|
||||
(let ((current (ivy-state-current ivy-last)))
|
||||
(if (symbolp ivy--reverse-i-search-symbol)
|
||||
(set
|
||||
ivy--reverse-i-search-symbol
|
||||
(delete current (symbol-value ivy--reverse-i-search-symbol)))
|
||||
(ring-remove
|
||||
ivy--reverse-i-search-symbol
|
||||
(ring-member ivy--reverse-i-search-symbol (ivy-state-current ivy-last)))))
|
||||
(let ((current (ivy-state-current ivy-last))
|
||||
(history ivy--reverse-i-search-history))
|
||||
(cond ((booleanp history))
|
||||
((symbolp history)
|
||||
(set history (delete current (symbol-value history))))
|
||||
((ring-p history)
|
||||
(ring-remove history (ring-member history current)))))
|
||||
(ivy--kill-current-candidate)))
|
||||
|
||||
(defvar ivy-reverse-i-search-map
|
||||
@@ -4883,20 +4885,17 @@ This list can be rotated with `ivy-rotate-preferred-builders'."
|
||||
(defun ivy-history-contents (history)
|
||||
"Copy contents of HISTORY.
|
||||
A copy is necessary so that we don't clobber any string attributes.
|
||||
Also set `ivy--reverse-i-search-symbol' to HISTORY."
|
||||
(setq ivy--reverse-i-search-symbol history)
|
||||
(cond ((symbolp history)
|
||||
(ivy--label-and-delete-dups
|
||||
(copy-sequence (symbol-value history))))
|
||||
((ring-p history)
|
||||
(ivy--label-and-delete-dups
|
||||
(when (> (ring-size history) 0)
|
||||
(ring-elements history))))
|
||||
((sequencep history)
|
||||
(ivy--label-and-delete-dups
|
||||
(copy-sequence history)))
|
||||
(t
|
||||
(error "Expected a symbol, ring, or sequence: %S" history))))
|
||||
Also set `ivy--reverse-i-search-history' to HISTORY."
|
||||
(prog1 (ivy--label-and-delete-dups
|
||||
(cond ((booleanp history) ())
|
||||
((symbolp history)
|
||||
(copy-sequence (symbol-value history)))
|
||||
((ring-p history)
|
||||
(ring-elements history))
|
||||
((sequencep history)
|
||||
(copy-sequence history))
|
||||
((error "Expected a symbol, ring, or sequence: %S" history))))
|
||||
(setq ivy--reverse-i-search-history history)))
|
||||
|
||||
(defun ivy-reverse-i-search ()
|
||||
"Enter a recursive `ivy-read' session using the current history.
|
||||
@@ -4966,6 +4965,7 @@ buffer would modify `ivy-last'.")
|
||||
(define-key map (kbd "q") 'quit-window)
|
||||
(define-key map (kbd "R") 'read-only-mode)
|
||||
(ivy-define-key map (kbd "C-d") 'ivy-occur-delete-candidate)
|
||||
(ivy-define-key map (kbd "F") 'ivy-occur-flush-lines)
|
||||
map)
|
||||
"Keymap for Ivy Occur mode.")
|
||||
|
||||
@@ -5067,6 +5067,12 @@ When `ivy-calling' isn't nil, call `ivy-occur-press'."
|
||||
(delete-region (line-beginning-position)
|
||||
(1+ (line-end-position)))))
|
||||
|
||||
(defun ivy-occur-flush-lines ()
|
||||
"Delete lines matching regex."
|
||||
(interactive)
|
||||
(let ((inhibit-read-only t))
|
||||
(call-interactively 'flush-lines)))
|
||||
|
||||
(define-derived-mode ivy-occur-grep-mode grep-mode "Ivy-Occur"
|
||||
"Major mode for output from \\[ivy-occur].
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
This is ivy.info, produced by makeinfo version 6.7 from ivy.texi.
|
||||
This is ivy.info, produced by makeinfo version 7.0.1 from ivy.texi.
|
||||
|
||||
Ivy manual, version 0.13.4
|
||||
|
||||
@@ -1917,53 +1917,53 @@ File: ivy.info, Node: Keystroke Index, Prev: Variable Index, Up: Top
|
||||
|
||||
|
||||
Tag Table:
|
||||
Node: Top1192
|
||||
Node: Introduction3103
|
||||
Node: Installation5626
|
||||
Node: Installing from Emacs Package Manager6076
|
||||
Node: Installing from the Git repository7324
|
||||
Node: Getting started8144
|
||||
Node: Basic customization8451
|
||||
Node: Key bindings9046
|
||||
Node: Global key bindings9238
|
||||
Node: Minibuffer key bindings11712
|
||||
Node: Key bindings for navigation12944
|
||||
Node: Key bindings for single selection action then exit minibuffer14151
|
||||
Node: Key bindings for multiple selections and actions keep minibuffer open16835
|
||||
Node: Key bindings that alter the minibuffer input19456
|
||||
Node: Other key bindings21403
|
||||
Node: Hydra in the minibuffer21781
|
||||
Node: Saving the current completion session to a buffer24199
|
||||
Node: Completion Styles25611
|
||||
Node: ivy--regex-plus27369
|
||||
Node: ivy--regex-ignore-order28855
|
||||
Node: ivy--regex-fuzzy29223
|
||||
Node: Customization29720
|
||||
Node: Faces29906
|
||||
Node: Defcustoms32335
|
||||
Node: Actions33694
|
||||
Node: What are actions?34020
|
||||
Node: How can different actions be called?34838
|
||||
Node: How to modify the actions list?35409
|
||||
Node: Example - add two actions to each command36069
|
||||
Node: How to undo adding the two actions37028
|
||||
Node: How to add actions to a specific command37480
|
||||
Node: Example - define a new command with several actions37896
|
||||
Node: Test the above function with ivy-occur38833
|
||||
Node: Packages39675
|
||||
Node: Commands40640
|
||||
Node: File Name Completion40825
|
||||
Node: Using TRAMP42782
|
||||
Node: Buffer Name Completion44284
|
||||
Node: Counsel commands44899
|
||||
Node: API45546
|
||||
Node: Required arguments for ivy-read46144
|
||||
Node: Optional arguments for ivy-read46663
|
||||
Node: Example - counsel-describe-function50089
|
||||
Node: Example - counsel-locate53073
|
||||
Node: Example - ivy-read-with-extra-properties56942
|
||||
Node: Variable Index58220
|
||||
Node: Keystroke Index65344
|
||||
Node: Top1194
|
||||
Node: Introduction3105
|
||||
Node: Installation5628
|
||||
Node: Installing from Emacs Package Manager6078
|
||||
Node: Installing from the Git repository7326
|
||||
Node: Getting started8146
|
||||
Node: Basic customization8453
|
||||
Node: Key bindings9048
|
||||
Node: Global key bindings9240
|
||||
Node: Minibuffer key bindings11714
|
||||
Node: Key bindings for navigation12946
|
||||
Node: Key bindings for single selection action then exit minibuffer14153
|
||||
Node: Key bindings for multiple selections and actions keep minibuffer open16837
|
||||
Node: Key bindings that alter the minibuffer input19458
|
||||
Node: Other key bindings21405
|
||||
Node: Hydra in the minibuffer21783
|
||||
Node: Saving the current completion session to a buffer24201
|
||||
Node: Completion Styles25613
|
||||
Node: ivy--regex-plus27371
|
||||
Node: ivy--regex-ignore-order28857
|
||||
Node: ivy--regex-fuzzy29225
|
||||
Node: Customization29722
|
||||
Node: Faces29908
|
||||
Node: Defcustoms32337
|
||||
Node: Actions33696
|
||||
Node: What are actions?34022
|
||||
Node: How can different actions be called?34840
|
||||
Node: How to modify the actions list?35411
|
||||
Node: Example - add two actions to each command36071
|
||||
Node: How to undo adding the two actions37030
|
||||
Node: How to add actions to a specific command37482
|
||||
Node: Example - define a new command with several actions37898
|
||||
Node: Test the above function with ivy-occur38835
|
||||
Node: Packages39677
|
||||
Node: Commands40642
|
||||
Node: File Name Completion40827
|
||||
Node: Using TRAMP42784
|
||||
Node: Buffer Name Completion44286
|
||||
Node: Counsel commands44901
|
||||
Node: API45548
|
||||
Node: Required arguments for ivy-read46146
|
||||
Node: Optional arguments for ivy-read46665
|
||||
Node: Example - counsel-describe-function50091
|
||||
Node: Example - counsel-locate53075
|
||||
Node: Example - ivy-read-with-extra-properties56944
|
||||
Node: Variable Index58222
|
||||
Node: Keystroke Index65346
|
||||
|
||||
End Tag Table
|
||||
|
||||
|
||||
Reference in New Issue
Block a user