From 6501c20c404c169a3e165793197890ee64c1476a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20=C3=81ngel=20Moreno?= Date: Wed, 31 May 2023 11:20:30 +0200 Subject: [PATCH] rde: emacs-dired: Replace default switches with extra switches. Makes more sense as the only default switch should be -l, which must be present as per dired-listing-switches. --- src/rde/features/emacs-xyz.scm | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/src/rde/features/emacs-xyz.scm b/src/rde/features/emacs-xyz.scm index 7ab00e16..3781c0c5 100644 --- a/src/rde/features/emacs-xyz.scm +++ b/src/rde/features/emacs-xyz.scm @@ -1110,11 +1110,11 @@ path /sudo:HOST:/path if the user in sudoers."))) (emacs-dired-rsync emacs-dired-rsync) (kill-when-opening-new-buffer? #f) (group-directories-first? #f) - (default-switches "-l -h")) + (extra-switches "-h")) (ensure-pred boolean? kill-when-opening-new-buffer?) (ensure-pred boolean? group-directories-first?) (ensure-pred file-like? emacs-dired-rsync) - (ensure-pred string? default-switches) + (ensure-pred maybe-string? extra-switches) (define emacs-f-name 'dired) (define f-name (symbol-append 'emacs- emacs-f-name)) @@ -1130,13 +1130,18 @@ path /sudo:HOST:/path if the user in sudoers."))) "(dired \"" (car (cdr (command-line))) "\")"))) (define dired-listing-switches (string-join - (list default-switches + (append + (list "-l" + (if group-directories-first? + "--group-directories-first" + "")) + (if extra-switches + (append + (list extra-switches) (if (get-value 'emacs-advanced-user? config) - "-A --time-style=long-iso" - "-a") - (if group-directories-first? - "--group-directories-first" - "")) + (list "-A --time-style=long-iso") + (list "-a"))) + '())) " ")) (define zip (get-value 'zip config (@ (gnu packages compression) zip))) (define rsync (get-value 'rsync config (@ (gnu packages rsync) rsync))) -- 2.45.2