pkg update and first config fix

org-brain not working, add org-roam
This commit is contained in:
2022-12-19 23:02:34 +01:00
parent 02b3e07185
commit 82f05baffe
885 changed files with 356098 additions and 36993 deletions

View File

@@ -49,8 +49,8 @@
(not diff-hl-mode)
(eq diff-hl-flydiff-modified-tick (buffer-chars-modified-tick))
(not buffer-file-name)
(not (file-exists-p buffer-file-name))
(file-remote-p default-directory))
(file-remote-p default-directory)
(not (file-exists-p buffer-file-name)))
(diff-hl-update)))
(defun diff-hl-flydiff/modified-p (_state)

View File

@@ -247,7 +247,7 @@ is closed."
(when (< (diff-hl-inline-popup--compute-content-height 99) 2)
(user-error "There is no enough vertical space to show the inline popup"))
(let* ((the-point (or point (point-at-eol)))
(let* ((the-point (or point (line-end-position)))
(the-buffer (current-buffer))
(overlay (make-overlay the-point the-point the-buffer)))
(overlay-put overlay 'phantom t)

View File

@@ -1,7 +1,7 @@
(define-package "diff-hl" "20211106.2353" "Highlight uncommitted changes using VC"
(define-package "diff-hl" "20221007.2147" "Highlight uncommitted changes using VC"
'((cl-lib "0.2")
(emacs "25.1"))
:commit "6fa3af0843093f44e028584a93eef091ec7e79d2" :authors
:commit "68fb280b300c5d8460cc7b9183e29fb3ec604136" :authors
'(("Dmitry Gutov" . "dgutov@yandex.ru"))
:maintainer
'("Dmitry Gutov" . "dgutov@yandex.ru")

View File

@@ -179,7 +179,9 @@ Returns a list with the buffer and the line number of the clicked line."
;; Highlight the clicked line
(goto-char point-in-buffer)
(setq line-overlay (make-overlay (point-at-bol) (min (point-max) (1+ (point-at-eol)))))
(setq line-overlay (make-overlay (line-beginning-position)
(min (point-max)
(1+ (line-end-position)))))
;; diff-mode
(diff-mode)

View File

@@ -5,7 +5,7 @@
;; Author: Dmitry Gutov <dgutov@yandex.ru>
;; URL: https://github.com/dgutov/diff-hl
;; Keywords: vc, diff
;; Version: 1.8.8
;; Version: 1.9.0
;; Package-Requires: ((cl-lib "0.2") (emacs "25.1"))
;; This file is part of GNU Emacs.
@@ -106,6 +106,11 @@
:group 'diff-hl
:type 'boolean)
(defcustom diff-hl-disable-on-remote nil
"Non-nil will disable `diff-hl' in remote buffers."
:group 'diff-hl
:type 'boolean)
(defcustom diff-hl-ask-before-revert-hunk t
"Non-nil to ask for confirmation before revert a hunk."
:group 'diff-hl
@@ -274,6 +279,7 @@ the current version of the file)."
(t (intern (format "diff-hl-bmp-%s" type)))))
(defvar vc-svn-diff-switches)
(defvar vc-fossil-diff-switches)
(defmacro diff-hl-with-diff-switches (body)
`(let ((vc-git-diff-switches
@@ -288,6 +294,7 @@ the current version of the file)."
vc-git-diff-switches))))
(vc-hg-diff-switches nil)
(vc-svn-diff-switches nil)
(vc-fossil-diff-switches '("-c" "0"))
(vc-diff-switches '("-U0"))
,@(when (boundp 'vc-disable-async-diff)
'((vc-disable-async-diff t))))
@@ -751,10 +758,10 @@ Only supported with Git."
(diff-hl-update)))))
(defun diff-hl-unstage-file ()
(interactive)
"Unstage all changes in the current file.
Only supported with Git."
(interactive)
(unless buffer-file-name
(user-error "No current file"))
(diff-hl--ensure-staging-supported)
@@ -802,7 +809,8 @@ The value of this variable is a mode line template as in
;; saved, in order not to fetch it twice.
'find-file-hook)
'diff-hl-update-once t t)
(add-hook 'vc-checkin-hook 'diff-hl-update nil t)
;; Never removed because it acts globally.
(add-hook 'vc-checkin-hook 'diff-hl-after-checkin)
(add-hook 'after-revert-hook 'diff-hl-after-revert nil t)
;; Magit does call `auto-revert-handler', but it usually
;; doesn't do much, because `buffer-stale--default-function'
@@ -816,13 +824,25 @@ The value of this variable is a mode line template as in
(remove-hook 'after-save-hook 'diff-hl-update t)
(remove-hook 'after-change-functions 'diff-hl-edit t)
(remove-hook 'find-file-hook 'diff-hl-update t)
(remove-hook 'vc-checkin-hook 'diff-hl-update t)
(remove-hook 'after-revert-hook 'diff-hl-update t)
(remove-hook 'magit-revert-buffer-hook 'diff-hl-update t)
(remove-hook 'magit-not-reverted-hook 'diff-hl-update t)
(remove-hook 'text-scale-mode-hook 'diff-hl-maybe-redefine-bitmaps t)
(diff-hl-remove-overlays)))
(defun diff-hl-after-checkin ()
(let ((fileset (vc-deduce-fileset t)))
(dolist (file (nth 1 fileset))
(let ((buf (find-buffer-visiting file)))
(when buf
(with-current-buffer buf
(when diff-hl-mode
(diff-hl-update))))))))
(defvar diff-hl-repeat-exceptions '(diff-hl-show-hunk
diff-hl-show-hunk-previous
diff-hl-show-hunk-next))
(when (require 'smartrep nil t)
(let (smart-keys)
(cl-labels ((scan (map)
@@ -830,7 +850,8 @@ The value of this variable is a mode line template as in
(lambda (event binding)
(if (consp binding)
(scan binding)
(when (characterp event)
(when (and (characterp event)
(not (memq binding diff-hl-repeat-exceptions)))
(push (cons (string event) binding) smart-keys))))
map)))
(scan diff-hl-command-map)
@@ -842,7 +863,8 @@ The value of this variable is a mode line template as in
;; chances of it being put into GNU ELPA are slim too.
(map-keymap
(lambda (_key cmd)
(put cmd 'repeat-map 'diff-hl-command-map))
(unless (memq cmd diff-hl-repeat-exceptions)
(put cmd 'repeat-map 'diff-hl-command-map)))
diff-hl-command-map)
(declare-function magit-toplevel "magit-git")
@@ -851,10 +873,14 @@ The value of this variable is a mode line template as in
(defvar diff-hl--magit-unstaged-files nil)
(defun diff-hl-magit-pre-refresh ()
(setq diff-hl--magit-unstaged-files (magit-unstaged-files t)))
(unless (and diff-hl-disable-on-remote
(file-remote-p default-directory))
(setq diff-hl--magit-unstaged-files (magit-unstaged-files t))))
(defun diff-hl-magit-post-refresh ()
(let* ((topdir (magit-toplevel))
(unless (and diff-hl-disable-on-remote
(file-remote-p default-directory))
(let* ((topdir (magit-toplevel))
(modified-files
(mapcar (lambda (file) (expand-file-name file topdir))
(delete-consecutive-dups
@@ -884,7 +910,7 @@ The value of this variable is a mode line template as in
(diff-hl-update))
((not (memq (vc-state file backend) unmodified-states))
(vc-state-refresh file backend)
(diff-hl-update))))))))))
(diff-hl-update)))))))))))
(defun diff-hl-dir-update ()
(dolist (pair (if (vc-dir-marked-files)
@@ -1017,7 +1043,9 @@ CONTEXT-LINES is the size of the unified diff context, defaults to 0."
"Turn on `diff-hl-mode' or `diff-hl-dir-mode' in a buffer if appropriate."
(cond
(buffer-file-name
(diff-hl-mode 1))
(unless (and diff-hl-disable-on-remote
(file-remote-p buffer-file-name))
(diff-hl-mode 1)))
((eq major-mode 'vc-dir-mode)
(diff-hl-dir-mode 1))))