Use powershell for interactive shell buffers
Misc formatting
This commit is contained in:
@@ -79,6 +79,12 @@
|
||||
;;
|
||||
;; You can also try 'gd' (or 'C-c c d') to jump to their definition and see how
|
||||
;; they are implemented.
|
||||
|
||||
;; Use PowerShell for interactive shell buffers.
|
||||
(setq explicit-shell-file-name "pwsh.exe")
|
||||
(setq shell-file-name "pwsh.exe")
|
||||
(setq shell-command-switch "-Command")
|
||||
|
||||
(after!
|
||||
org (setq org-hide-emphasis-markers t) (setq org-log-done 'time)
|
||||
|
||||
@@ -107,7 +113,6 @@
|
||||
:commands (elisp-autofmt-mode elisp-autofmt-buffer)
|
||||
:hook (emacs-lisp-mode . elisp-autofmt-mode))
|
||||
|
||||
|
||||
;; Based off https://github.com/alphapapa/unpackaged.el#ensure-blank-lines-between-headings-and-before-contents
|
||||
;;;###autoload
|
||||
(defun org-format (&optional prefix)
|
||||
@@ -115,7 +120,8 @@
|
||||
With prefix, operate on whole buffer. Ensures that blank lines
|
||||
exist after each headings's drawers."
|
||||
(interactive "P")
|
||||
(org-map-entries (lambda ()
|
||||
(org-map-entries
|
||||
(lambda ()
|
||||
(org-with-wide-buffer
|
||||
;; `org-map-entries' narrows the buffer, which prevents us from seeing
|
||||
;; newlines before the current heading, so we do this part widened.
|
||||
@@ -125,8 +131,7 @@ exist after each headings's drawers."
|
||||
(let ((end (org-entry-end-position)))
|
||||
;; Insert blank lines before entry content
|
||||
(forward-line)
|
||||
(while (and (org-at-planning-p)
|
||||
(< (point) (point-max)))
|
||||
(while (and (org-at-planning-p) (< (point) (point-max)))
|
||||
;; Skip planning lines
|
||||
(forward-line))
|
||||
(while (re-search-forward org-drawer-regexp end t)
|
||||
@@ -139,10 +144,12 @@ exist after each headings's drawers."
|
||||
(org-at-heading-p)
|
||||
(looking-at-p "\n"))
|
||||
(insert "\n"))))
|
||||
t (if prefix
|
||||
t
|
||||
(if prefix
|
||||
nil
|
||||
'tree)))
|
||||
|
||||
|
||||
;; For elisp-autofmt
|
||||
;; Local variables:
|
||||
;; elisp-autofmt-load-packages-local: ("use-package" "use-package-core")
|
||||
|
||||
Reference in New Issue
Block a user