From fdb3202b35d43839d4217f606a314b3b7fd908b9 Mon Sep 17 00:00:00 2001 From: xeruf <27jf@pm.me> Date: Sun, 23 Jan 2022 23:40:51 +0100 Subject: [PATCH] config: fix edgecase oversights --- .config/doom/config.el | 3 ++- .local/bin/scripts/ex | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.config/doom/config.el b/.config/doom/config.el index dc8734e..9f0e9f0 100644 --- a/.config/doom/config.el +++ b/.config/doom/config.el @@ -65,7 +65,7 @@ Version 2019-11-04 2021-02-16" (defun dragon (&optional @file) "Share file from current buffer via dragon." (interactive) - (shell-command (concat "dragon-drag-and-drop -a -x " (if (not (string-blank-p @file)) @file buffer-file-name))) + (shell-command (concat "dragon-drag-and-drop -a -x " (or @file buffer-file-name))) ) ;; rebing C-u - https://emacs.stackexchange.com/a/58320 @@ -453,6 +453,7 @@ Version 2019-11-04 2021-02-16" (use-package! ox-context :after ox) + (use-package! ox-extra :after ox :config (ox-extras-activate '(ignore-headlines)) ;; use tag :ignore: to export content without headline diff --git a/.local/bin/scripts/ex b/.local/bin/scripts/ex index d7a15a4..6cd0486 100755 --- a/.local/bin/scripts/ex +++ b/.local/bin/scripts/ex @@ -30,7 +30,7 @@ for arg do (*) echo "'$arg' cannot be extracted by ex" >&2;; esac test "$(basename "$PWD")" = "$namepart" && - if test "$(ls -U | wc -l)" -lt 3 + if test $# -lt 2 && "$(ls -U | wc -l)" -lt 3 then mv * .. && cd .. && rm -d "$namepart" else cd .. && mv "$namepart" "$name" fi