                                              (plain-list-item . nil))
                                                                 "Removes gap when you add a new heading.")
 
-
   (org-catch-invisible-edits              'error)
   (org-descriptive-links                  nil                    "Do not decorate hyperlinks.")
   (org-ellipsis                           " ⤵"                  "Use this ellipsis string.")


;; Adapted from https://www.emacswiki.org/emacs/UnfillRegion
(defun my/unfill-region (beg end)
  "Unfill the region from BEG to END, joining text paragraphs into a single logical line."
  (interactive "*r")
  (let ((fill-column (point-max)))
    (fill-region beg end)))

;; ======================================================================
;; Act IV
;; 1st party Emacs packages
;; ======================================================================

(use-package apropos
  :ensure nil

  (interactive)
  (equal system-type 'windows-nt))

(defun my/markdownlint-clean ()
  "Perform some cleaning in Markdown files, for markdownlint-cli to be happy."
  (interactive)

  ;; No polluting tabs
  (untabify (point-min) (point-max))

  ;; No trailing white space
  (delete-trailing-whitespace)

  ;; No consecutive newlines but just one
  (query-replace-regexp "^

+" "
")

  ;; No spaces/tabs before headings
  (query-replace-regexp "^[ 	]+\\(#+.*\\)" "\\1")

  ;; Headings are always followed by a newline
  (query-replace-regexp "\\(##+ .*\\)
\\([^
]+\\)" "\\1

\\2")

  ;; Timestamps titles are H2
  (query-replace-regexp "^# 202" "## 202")

  ;; Isolated **emphasis** on a single line after a newline should really be H3
  (query-replace-regexp "

\\*\\*\\(.*\\)\\*\\*$" "

### \\1
")

  ;; No empty list items
  (query-replace-regexp " *- *$" "")

  ;; Lists must start with an empty line:
;;  (query-replace-regexp "^\\( *-.*\\)
;;\\(- .*\\)" "\\1
;;
;;\\2")

  ;; And, to apply this regex to multiple files, you can mark the
  ;; files in Dired and type Q to do a query-replace-regexp on all the
  ;; marked files
  )

(defun my/oblique-strategy ()  "Draw and message an oblique strategy."
  (interactive)
  (message (oblique-strategy)))
