update packages

This commit is contained in:
2025-11-25 19:52:03 +01:00
parent 14ba373378
commit dbbae92267
280 changed files with 13451 additions and 11207 deletions

View File

@@ -5,6 +5,7 @@
** current master
*** Added ~treemacs-buffer-name-function~
*** Added ~treemacs-file-follow-ignore-functions~
*** Added ~treemacs-buffer-name-prefix~
** v3.1
- Deprecated ~treemacs-window-background-color~ in favour of ~treemacs-window-background-face~ and
~treemacs-hl-line-face~

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

View File

@@ -196,16 +196,19 @@ treemacs node is pointing to a valid buffer position."
(pcase (treemacs-button-get current-btn :state)
((or 'file-node-open 'file-node-closed 'dir-node-open 'dir-node-closed)
(-let [name (treemacs--read-string "Bookmark name: ")]
(bookmark-store name `((filename . ,(treemacs-button-get current-btn :path))) nil)))
(when 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) nil)]
(if (buffer-live-p tag-buffer)
(bookmark-store
(treemacs--read-string "Bookmark name: ")
`((filename . ,(buffer-file-name tag-buffer))
(position . ,tag-pos))
nil)
(-let [name (treemacs--read-string "Bookmark name: ")]
(when name
(bookmark-store
name
`((filename . ,(buffer-file-name tag-buffer))
(position . ,tag-pos))
nil)))
(treemacs-log-failure "Tag info can not be saved because it is not pointing to a live buffer."))))
((or 'tag-node-open 'tag-node-closed)
(treemacs-pulse-on-failure "There is nothing to bookmark here.")))))

View File

@@ -83,7 +83,7 @@ For all other cases ORIGINAL-FN is called with original ARGS."
(with-eval-after-load 'winum
(when (boundp 'winum-ignored-buffers-regexp)
(add-to-list 'winum-ignored-buffers-regexp (regexp-quote treemacs--buffer-name-prefix))))
(add-to-list 'winum-ignored-buffers-regexp (regexp-quote treemacs-buffer-name-prefix))))
(with-eval-after-load 'ace-window
(when (boundp 'aw-ignored-buffers)

View File

@@ -205,8 +205,6 @@ PATH: File Path"
(file-name-directory)
(treemacs--unslash)))))
(defconst treemacs--buffer-name-prefix " *Treemacs-Buffer-")
(defconst treemacs-dir
;; locally we're in src/elisp, installed from melpa we're at the package root
(-let [dir (-> (if load-file-name
@@ -434,7 +432,7 @@ extensions and special names like this."
"Return t when WINDOW is showing a treemacs buffer."
(declare (side-effect-free t))
(inline-quote
(->> ,window (window-buffer) (buffer-name) (s-starts-with? treemacs--buffer-name-prefix))))
(->> ,window (window-buffer) (buffer-name) (s-starts-with? treemacs-buffer-name-prefix))))
(define-inline treemacs--next-neighbour-of (btn)
"Get the next same-level neighbour of BTN, if any."
@@ -523,7 +521,7 @@ In practice this means expand PATH and remove its final slash."
(define-inline treemacs-is-treemacs-window-selected? ()
"Return t when the treemacs window is selected."
(declare (side-effect-free t))
(inline-quote (s-starts-with? treemacs--buffer-name-prefix (buffer-name))))
(inline-quote (s-starts-with? treemacs-buffer-name-prefix (buffer-name))))
(defun treemacs--reload-buffers-after-rename (old-path new-path)
"Reload buffers and windows after OLD-PATH was renamed to NEW-PATH."
@@ -1043,7 +1041,7 @@ Will return t when FILE
(let ((last (aref ,file (1- (length ,file)))))
(or (string-prefix-p ".#" ,file)
(and (eq ?# last) (eq ?# (aref ,file 0)))
(eq ?~ last)
(backup-file-name-p ,file)
(string-equal ,file ".")
(string-equal ,file "..")
(and treemacs-hide-dot-git-directory

View File

@@ -32,7 +32,8 @@ def main():
shell=True,
stdout=PIPE,
bufsize=100,
encoding='utf-8'
encoding='utf-8',
env={"LC_ALL": "C"}
).communicate()[0][:-1]
if unread == "0":

View File

@@ -131,6 +131,16 @@ indentation will be a space INTEGER pixels wide."
(const :tag "" px)))
:group 'treemacs)
(defcustom treemacs-buffer-name-prefix " *Treemacs-Buffer-"
"The static prefix that is added to every treemacs buffer name.
Can only be set immediately after treemacs is loaded as its value is used for
compatibility with other packages like winum.
See also: `treemacs-buffer-name-function'."
:type 'string
:group 'treemacs)
(defcustom treemacs-buffer-name-function #'treemacs-default-buffer-name
"The function used to create the name of a treemacs buffer.
@@ -140,7 +150,7 @@ current frame, however with packages like `treemacs-persp' it is also possible
for it to be the current perspective.
In addition, the buffer name will *always* be prefixed with
`treemacs--buffer-name-prefix', which is necessary to properly recognise
`treemacs-buffer-name-prefix', which is necessary to properly recognise
treemacs buffers and maintain compatibility with some packages like winum."
:type 'function
:group 'treemacs)
@@ -152,7 +162,7 @@ must be matched with `string-match-p'.
Regexp-quoting the items in this list is *not* necessary, the quoting will
happen automatically when needed."
:type 'list
:type '(list string)
:group 'treemacs)
(defcustom treemacs-read-string-input
@@ -315,7 +325,7 @@ This controls the matching behaviour of `treemacs-toggle-show-dotfiles'."
"Indicates whether the .git directory should be hidden.
When this is non-nil the .git dir will be hidden regardless of current setting
of `treemacs-toggle-show-dotfiles'."
:type 'list
:type 'boolean
:group 'treemacs)
(defcustom treemacs-sorting 'alphabetic-asc
@@ -392,7 +402,7 @@ instead modified with functions like `add-to-list'.
Additionally `treemacs--mac-ignore-file-predicate' is also included on
Mac-derived operating systems (when `system-type' is `darwin')."
:type 'list
:type '(list function)
:group 'treemacs)
(defcustom treemacs-pre-file-insert-predicates nil
@@ -419,7 +429,7 @@ map map as follows: (the pattern is derived from \\='git status --porcelain\\=')
Otherwise the behaviour is the same as `treemacs-ignored-file-predicates', in
that any one function returning t for a file means that this file will not
be rendered."
:type 'list
:type '(list function)
:group 'treemacs)
(defcustom treemacs-file-event-delay 2000

View File

@@ -360,8 +360,10 @@ will likewise be updated."
(treemacs-error-return-if (not (file-exists-p old-path))
"The file to be renamed does not exist.")
(let* ((old-name (treemacs--filename old-path))
(new-name (treemacs--read-string
"New name: " (file-name-nondirectory old-path)))
(new-name (--if-let (treemacs--read-string
"New name: " (file-name-nondirectory old-path))
it
(treemacs-return nil)))
(dir (treemacs--parent-dir old-path))
(new-path (treemacs-join-path dir new-name))
(parent (treemacs-button-get btn :parent)))

View File

@@ -37,7 +37,7 @@ def main():
for root in roots:
if exists(root + "/.git"):
proc = Popen(GIT_CMD, shell=True, stdout=PIPE, bufsize=100, cwd=root)
proc = Popen(GIT_CMD, shell=True, stdout=PIPE, bufsize=100, cwd=root, env={"LC_ALL": "C"})
procs.append((root, proc))
STDOUT.write(b"(")

View File

@@ -63,7 +63,7 @@ not visible."
(treemacs-canonical-path (dired-current-directory))))))
(when (and treemacs-window
current-file
(not (s-starts-with? treemacs--buffer-name-prefix buffer-name))
(not (s-starts-with? treemacs-buffer-name-prefix buffer-name))
(file-exists-p current-file)
(not (string= buffer-name "COMMIT_EDITMSG"))
(--none?

View File

@@ -5,7 +5,7 @@ GIT_BIN = sys.argv[1]
STATUS_CMD = "{} status -sb".format(GIT_BIN)
def main():
proc = Popen(STATUS_CMD, shell=True, stdout=PIPE, bufsize=100)
proc = Popen(STATUS_CMD, shell=True, stdout=PIPE, bufsize=100, env={"LC_ALL": "C"})
if (proc.wait() != 0):
sys.exit(2)

View File

@@ -1,5 +1,5 @@
from subprocess import Popen, PIPE
from os import listdir, environ
from os import listdir
from os.path import isdir, islink
from posixpath import join
import sys
@@ -54,8 +54,7 @@ def find_recursive_entries(path, state):
def main():
global output, ht_size
# Don't lock Git when updating status.
environ["GIT_OPTIONAL_LOCKS"] = "0"
proc = Popen(GIT_CMD, shell=True, stdout=PIPE, bufsize=100)
proc = Popen(GIT_CMD, shell=True, stdout=PIPE, bufsize=100, env={"LC_ALL": "C", "GIT_OPTIONAL_LOCKS": "0"})
dirs_added = {}
for item in proc.stdout:

View File

@@ -335,6 +335,7 @@ Necessary since root icons are not rectangular."
(treemacs-create-icon :file "go.png" :extensions ("go"))
(treemacs-create-icon :file "systemd.png" :extensions ("service" "timer"))
(treemacs-create-icon :file "php.png" :extensions ("php"))
(treemacs-create-icon :file "powershell.png" :extensions ("ps1" "psc1" "psm1" "psd1" "ps1xml" "pssc" "psrc" "cdxml"))
(treemacs-create-icon :file "js.png" :extensions ("js" "jsx"))
(treemacs-create-icon :file "babel.png" :extensions ("babel"))
(treemacs-create-icon :file "hy.png" :extensions ("hy"))

View File

@@ -1,5 +1,5 @@
;; -*- no-byte-compile: t; lexical-binding: nil -*-
(define-package "treemacs" "20250707.2001"
(define-package "treemacs" "20250907.1320"
"A tree style file explorer package."
'((emacs "26.1")
(cl-lib "0.5")
@@ -11,7 +11,7 @@
(ht "2.2")
(cfrs "1.3.2"))
:url "https://github.com/Alexander-Miller/treemacs"
:commit "246d9505edf86c25a08cfbd131c441c8d402f8c3"
:revdesc "246d9505edf8"
:commit "05333cc23ca4349cd839cf1c18e1eaef1f6b70ec"
:revdesc "05333cc23ca4"
:authors '(("Alexander Miller" . "alexanderm@web.de"))
:maintainers '(("Alexander Miller" . "alexanderm@web.de")))

View File

@@ -794,7 +794,7 @@ FORCE-EXPAND: Boolean"
(when ,force-expand
(funcall (alist-get (treemacs-button-get btn :state) treemacs-TAB-actions-config))))
(-when-let (dom-node (treemacs-find-in-dom ,path))
(setf (treemacs-dom-node->refresh-flag dom-node) t)))))))
(setf (treemacs-dom-node->refresh-flag dom-node) nil)))))))
(defun treemacs-update-node (path &optional force-expand)
"Update the node identified by its PATH.

View File

@@ -201,7 +201,7 @@ NEW-SCOPE-TYPE: T: treemacs-scope"
(treemacs--find-workspace (buffer-file-name)))
(treemacs-scope-shelf->kill-buffer shelf)
(let* ((name (format "%s%s"
treemacs--buffer-name-prefix
treemacs-buffer-name-prefix
(or (funcall treemacs-buffer-name-function scope)
(treemacs-default-buffer-name scope))))
(buffer (get-buffer-create name)))
@@ -211,7 +211,7 @@ NEW-SCOPE-TYPE: T: treemacs-scope"
(defun treemacs-default-buffer-name (scope)
"Default buffer name implementation for a given SCOPE.
Appends the name of the given scope to the mandatory
`treemacs--buffer-name-prefix'."
`treemacs-buffer-name-prefix'."
(or (treemacs-scope->current-scope-name treemacs--current-scope-type scope)
(prin1-to-string scope)))
@@ -257,7 +257,7 @@ Returns nil if no treemacs buffer is visible."
(--first (->> it
(window-buffer)
(buffer-name)
(s-starts-with? treemacs--buffer-name-prefix)))))
(s-starts-with? treemacs-buffer-name-prefix)))))
(define-inline treemacs-current-visibility ()
"Return whether the current visibility state of the treemacs buffer.

View File

@@ -90,14 +90,14 @@ def main():
print(elisp_alist)
def add_git_processes(status_listings, path):
ignored_proc = Popen(IS_IGNORED_CMD + path, shell=True, stdout=DEVNULL, stderr=DEVNULL)
tracked_proc = Popen(IS_TRACKED_CMD + path, shell=True, stdout=DEVNULL, stderr=DEVNULL)
changed_proc = Popen(IS_CHANGED_CMD + path, shell=True, stdout=PIPE, stderr=DEVNULL)
ignored_proc = Popen(IS_IGNORED_CMD + path, shell=True, stdout=DEVNULL, stderr=DEVNULL, env={"LC_ALL": "C"})
tracked_proc = Popen(IS_TRACKED_CMD + path, shell=True, stdout=DEVNULL, stderr=DEVNULL, env={"LC_ALL": "C"})
changed_proc = Popen(IS_CHANGED_CMD + path, shell=True, stdout=PIPE, stderr=DEVNULL, env={"LC_ALL": "C"})
status_listings.append((path, ignored_proc, tracked_proc, changed_proc))
def determine_file_git_state():
proc = Popen(FILE_STATE_CMD + FILE, shell=True, stdout=PIPE, stderr=DEVNULL)
proc = Popen(FILE_STATE_CMD + FILE, shell=True, stdout=PIPE, stderr=DEVNULL, env={"LC_ALL": "C"})
line = proc.stdout.readline()
if line:
state = line.lstrip().split(b" ")[0]

View File

@@ -176,7 +176,6 @@ PATH: String"
('always-ask
(treemacs--select-workspace-by-name))))))))
;; TODO(2020/11/25): NAME
(define-inline treemacs--find-project-for-buffer (&optional buffer-file)
"In the current workspace find the project current buffer's file falls under.
Optionally supply the BUFFER-FILE in case it is not available by calling the
@@ -703,7 +702,8 @@ Returns t when the name is invalid.
NAME: String"
(declare (pure t) (side-effect-free t))
(or (s-blank-str? name)
(or (null name)
(s-blank-str? name)
(s-contains? "\n" name)
(not (s-matches? (rx (1+ (or space (syntax word) (syntax symbol) (syntax punctuation)))) name))))

View File

@@ -5,8 +5,8 @@
;; Author: Alexander Miller <alexanderm@web.de>
;; Package-Requires: ((emacs "26.1") (cl-lib "0.5") (dash "2.11.0") (s "1.12.0") (ace-window "0.9.0") (pfuture "1.7") (hydra "0.13.2") (ht "2.2") (cfrs "1.3.2"))
;; Homepage: https://github.com/Alexander-Miller/treemacs
;; Package-Version: 20250707.2001
;; Package-Revision: 246d9505edf8
;; Package-Version: 20250907.1320
;; Package-Revision: 05333cc23ca4
;; This program is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by