diff --git a/.bash_aliases b/.bash_aliases index 9e40d15..796a0a4 100644 --- a/.bash_aliases +++ b/.bash_aliases @@ -1,3 +1,5 @@ +test -n "$PS1" || return 0 + export LESS="--RAW-CONTROL-CHARS --ignore-case --LONG-PROMPT --jump-target=5 $(test $(less --version | head -1 | cut -f2 -d' ') -ge 590 && echo --incsearch)" bind '"\ek":history-search-backward' bind '"\ej":history-search-forward' diff --git a/.config/doom/config.el b/.config/doom/config.el index 061f895..660439d 100644 --- a/.config/doom/config.el +++ b/.config/doom/config.el @@ -228,7 +228,7 @@ Version 2019-11-04 2021-02-16" :config ; the value does not matter, see https://emacs.stackexchange.com/questions/71774/pass-default-value-to-org-set-property/71777#71777 - (add-to-list 'org-global-properties-fixed '("ID_ALL" . "id")) + ;(add-to-list 'org-global-properties-fixed '("ID_ALL" . "id")) (map! :map org-mode-map :leader "\\" 'org-ctrl-c-ctrl-c @@ -247,7 +247,8 @@ Version 2019-11-04 2021-02-16" "lk" 'counsel-org-link "gR" 'org-mode-restart :desc "Set ID property" "lI" (lambda () (interactive) (org-set-property "ID" - (org-read-property-value "ID" nil (downcase (s-replace-regexp "[^[:alnum:][:digit:]]\+" "-" (org-get-heading t t t t)))))) + (let ((heading (org-get-heading t t t t))) + (if heading (org-read-property-value "ID" nil (downcase (s-replace-regexp "[^[:alnum:][:digit:]]\+" "-" (heading)))) (file-name-sans-extension (file-name-nondirectory buffer-file-name)))))) :desc "Set Roam Aliases" "la" (lambda () (interactive) (org-set-property "ROAM_ALIASES" nil)) :desc "Add tag" "mt" 'org-roam-tag-add :desc "Remove tag" "mT" 'org-roam-tag-remove