[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/nix-mode d2f4a629a8 258/500: Only show derivations in nix
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/nix-mode d2f4a629a8 258/500: Only show derivations in nix store |
Date: |
Sat, 29 Jan 2022 08:27:12 -0500 (EST) |
branch: elpa/nix-mode
commit d2f4a629a846e1f0d2fd4dbe67e127719ff3c238
Author: Matthew Bauer <mjbauer95@gmail.com>
Commit: Matthew Bauer <mjbauer95@gmail.com>
Only show derivations in nix store
---
nix-drv-mode.el | 26 ++++++++++++++------------
1 file changed, 14 insertions(+), 12 deletions(-)
diff --git a/nix-drv-mode.el b/nix-drv-mode.el
index fdbc4f82f9..b9e184270f 100644
--- a/nix-drv-mode.el
+++ b/nix-drv-mode.el
@@ -25,22 +25,24 @@
(defun nix-drv-mode ()
"Pretty print Nix’s .drv files."
(interactive)
- (let ((inhibit-read-only t))
+ (when (string-match (format "^%s/" nix-store-dir) (buffer-file-name))
(if nix-drv-mode
(progn
(erase-buffer)
(insert-file-contents (buffer-file-name))
- (setq nix-drv-mode nil))
- (setq nix-drv-mode t)
- (erase-buffer)
- (insert (shell-command-to-string
- (format "%s show-derivation \"%s\""
- nix-executable
- (buffer-file-name))))
- (json-mode)
- (set-buffer-modified-p nil))
- (set-buffer-modified-p nil)
- (read-only-mode 1)))
+ (setq nix-drv-mode nil)
+ (set-buffer-modified-p nil)
+ (read-only-mode nil))
+ (let ((inhibit-read-only t))
+ (setq nix-drv-mode t)
+ (erase-buffer)
+ (insert (shell-command-to-string
+ (format "%s show-derivation \"%s\""
+ nix-executable
+ (buffer-file-name))))
+ (json-mode)
+ (set-buffer-modified-p nil)
+ (read-only-mode 1)))))
(provide 'nix-drv-mode)
;;; nix-drv-mode.el ends here
- [nongnu] elpa/nix-mode 4a5b6d5d2c 177/500: Add travis and Makefile, (continued)
- [nongnu] elpa/nix-mode 4a5b6d5d2c 177/500: Add travis and Makefile, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode af35742d55 198/500: Merge pull request #39 from purcell/master, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode 1b3424ade0 190/500: Don't ignore errors when loading nix-format / nix-shebang, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode 93a59d9acb 179/500: Use cl-lib instead of cl., ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode 7c732faf3a 183/500: Handle smartparens in nix-mode., ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode 7716e6d1e4 208/500: fix (cond) usage, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode 236318101e 217/500: Cleanup global-nix-mode, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode 857d963d1e 219/500: Add nix-system function, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode 58325164ca 232/500: Update README.md, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode 36070654c8 243/500: Don’t autoload nix-instantiate., ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode d2f4a629a8 258/500: Only show derivations in nix store,
ELPA Syncer <=
- [nongnu] elpa/nix-mode d0eb92e97a 263/500: Package linting, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode 38061187ca 265/500: Add nix-read-file & nix-read-attr, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode 7d65288c72 266/500: Fix erroneous use of function as variable, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode 8b3a9927e7 270/500: Add dependency on json-mode, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode 7a7f600133 288/500: travis: Add travis badge, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode da16900326 293/500: tests: Add a testcase with broken identation to have as a check if it indents at all, ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode aa43b72a45 014/500: Revert "Use warning font lock for upper case vars", ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode 5a2674592f 033/500: Don't save-excursion for nix-indent-line., ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode 233bf03b96 040/500: Add nixfmt command., ELPA Syncer, 2022/01/29
- [nongnu] elpa/nix-mode ff550f9bbd 036/500: Add comments., ELPA Syncer, 2022/01/29