[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/nix-mode beb96dce67 3/7: Introduce nix-store-path-omit-sel
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/nix-mode beb96dce67 3/7: Introduce nix-store-path-omit-self |
Date: |
Fri, 17 Mar 2023 22:00:06 -0400 (EDT) |
branch: elpa/nix-mode
commit beb96dce671f59d229ac9859a88d307f65c64d38
Author: Daniel Nagy <danielnagy@posteo.de>
Commit: Daniel Nagy <danielnagy@posteo.de>
Introduce nix-store-path-omit-self
It can sometimes be considered useless information if, for example, a
store path lists itself within the requisites or output section. This
customization option is supposed to help with removing this unintended
behavior.
---
CHANGELOG.md | 4 ++++
nix-store.el | 8 +++++++-
2 files changed, 11 insertions(+), 1 deletion(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 8d6c75c7d3..0790202d74 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,9 @@
# Changelog
+## Unreleased (1.6.0)
+
+* Introduce nix-store-path-omit-self customization option.
+
## 1.5.0
* Removed json-mode dependency, using js instead.
diff --git a/nix-store.el b/nix-store.el
index aa4600eff1..7f95203f11 100644
--- a/nix-store.el
+++ b/nix-store.el
@@ -21,6 +21,10 @@
"Nix-store customizations."
:group 'nix)
+(defcustom nix-store-path-omit-self t
+ "Do not list the current entry itself within sections of
nix-store-path-mode."
+ :package-version '(nix-mode . "1.6.0"))
+
(defun nix-store-realise (path)
"Realise a path asynchronously.
PATH the path within /nix/store to realise"
@@ -112,7 +116,9 @@ information."
"Helper macro for inserting a list as a magit-section.
TYPE and VALUE will be used as the type and value of the section
respectively. The LABEL is the text displayed."
- `(let ((value ,value))
+ `(let ((value (cl-remove
+ (and nix-store-path-omit-self (nix-store-path-path
nix-buffer-store-path))
+ ,value :test #'equal)))
(when (and (listp value) (> (length value) 0))
(magit-insert-section (,type value)
(magit-insert-heading ,label)
- [nongnu] elpa/nix-mode updated (c18a24e9ac -> 43bb31e6e0), ELPA Syncer, 2023/03/17
- [nongnu] elpa/nix-mode beb96dce67 3/7: Introduce nix-store-path-omit-self,
ELPA Syncer <=
- [nongnu] elpa/nix-mode e6a37d2a07 1/7: Add lexical-binding declaration to nix-drv-mode, ELPA Syncer, 2023/03/17
- [nongnu] elpa/nix-mode c3ffcafd7d 4/7: Annotate defcustoms and minor refactorings, ELPA Syncer, 2023/03/17
- [nongnu] elpa/nix-mode bfef9f1166 5/7: chore(deps): bump cachix/install-nix-action from 18 to 20, ELPA Syncer, 2023/03/17
- [nongnu] elpa/nix-mode ad882d77ba 2/7: Fix typos and indentation mismatch, ELPA Syncer, 2023/03/17
- [nongnu] elpa/nix-mode 43bb31e6e0 7/7: Merge pull request #182 from NixOS/dependabot/github_actions/cachix/install-nix-action-20, ELPA Syncer, 2023/03/17
- [nongnu] elpa/nix-mode e06fbfd62b 6/7: Merge pull request #181 from nagy/master, ELPA Syncer, 2023/03/17