Function: treemacs--sort-value-selection
treemacs--sort-value-selection is a byte-compiled function defined in
treemacs-core-utils.el.
Signature
(treemacs--sort-value-selection)
Documentation
Interactive selection for a new treemacs-sorting value.
Returns a cons cell of a descriptive string name and the sorting symbol.
Source Code
;; Defined in ~/.emacs.d/elpa/treemacs-20251226.1307/treemacs-core-utils.el
(defun treemacs--sort-value-selection ()
"Interactive selection for a new `treemacs-sorting' value.
Returns a cons cell of a descriptive string name and the sorting symbol."
(declare (side-effect-free t))
(let* ((sort-names '(("Sort Alphabetically Ascending" . alphabetic-asc)
("Sort Alphabetically Descending" . alphabetic-desc)
("Sort Alphabetically and Numerically Ascending" . alphabetic-numeric-asc)
("Sort Alphabetically and Numerically Descending" . alphabetic-numeric-desc)
("Sort Case Insensitive Alphabetically Ascending" . alphabetic-case-insensitive-asc)
("Sort Case Insensitive Alphabetically Descending" . alphabetic-case-insensitive-desc)
("Sort Case Insensitive Alphabetically and Numerically Ascending" . alphabetic-numeric-case-insensitive-asc)
("Sort Case Insensitive Alphabetically and Numerically Descending" . alphabetic-numeric-case-insensitive-desc)
("Sort by Size Ascending" . size-asc)
("Sort by Size Descending" . size-desc)
("Sort by Modification Date Ascending" . mod-time-asc)
("Sort by Modification Date Descending" . mod-time-desc)))
(selected-value (completing-read (format "Sort Method (current is %s)" treemacs-sorting)
(-map #'car sort-names))))
(--first (s-equals? (car it) selected-value) sort-names)))