update packages

This commit is contained in:
2022-01-04 21:35:17 +01:00
parent 1d5275c946
commit 8de00e5202
700 changed files with 42441 additions and 85378 deletions

View File

@@ -16,14 +16,15 @@
;; along with this program. If not, see <https://www.gnu.org/licenses/>.
;;; Commentary:
;;; Integrates treemacs with bookmark.el.
;;; NOTE: This module is lazy-loaded.
;; Integrates treemacs with bookmark.el.
;; NOTE: This module is lazy-loaded.
;;; Code:
(require 'bookmark)
(require 'dash)
(require 'f)
(require 'treemacs-follow-mode)
(require 'treemacs-interface)
(require 'treemacs-scope)
@@ -48,18 +49,19 @@ fashion to `treemacs-find-file'.
With a prefix argument ARG treemacs will also open the bookmarked location."
(interactive "P")
(treemacs-block
(bookmark-maybe-load-default-file)
(-let [bookmarks
(cl-loop
for b in bookmark-alist
for name = (car b)
for location = (bookmark-location b)
when (or (f-file? location) (f-directory? location))
for location = (treemacs-canonical-path (bookmark-location b))
when (or (file-regular-p location) (file-directory-p location))
collect (propertize name 'location location))]
(treemacs-error-return-if (null bookmarks)
"Didn't find any bookmarks pointing to files.")
(let* ((bookmark (completing-read "Bookmark: " bookmarks))
(location (f-long (get-text-property 0 'location (--first (string= it bookmark) bookmarks))))
(dir (if (f-directory? location) location (f-dirname location)))
(location (treemacs-canonical-path (get-text-property 0 'location (--first (string= it bookmark) bookmarks))))
(dir (if (file-directory-p location) location (treemacs--parent-dir location)))
(project (treemacs--find-project-for-path dir)))
(treemacs-error-return-if (null project)
"Bookmark at %s does not fall under any project in the workspace."
@@ -196,7 +198,8 @@ treemacs node is pointing to a valid buffer position."
(-let [name (treemacs--read-string "Bookmark name: ")]
(bookmark-store name `((filename . ,(treemacs-button-get current-btn :path))) nil)))
('tag-node
(-let [(tag-buffer . tag-pos) (treemacs--extract-position (treemacs-button-get current-btn :marker))]
(-let [(tag-buffer . tag-pos)
(treemacs--extract-position (treemacs-button-get current-btn :marker) nil)]
(if (buffer-live-p tag-buffer)
(bookmark-store
(treemacs--read-string "Bookmark name: ")