[Emacs Lisp] Personal ~/.emacs.d/ configuration folder.
`pp-buffer` on certain Org source code blocks.
smart-documents.org
@@ -1726,11 +1726,15 @@
1726
1726
*** Fix indentation
1727
1727
1728
1728
#+BEGIN_SRC emacs-lisp :tangle yes
1729
Removed:
(defun sd-indent-buffer ()
1729
Added:
(defun sd-indent-buffer
1730
Added:
()
1730
1731
"Indent entire buffer."
1731
1732
(interactive)
1732
1733
(save-excursion
1733
Removed:
(indent-region (point-min) (point-max) nil)))
1734
Added:
(indent-region
1735
Added:
(point-min)
1736
Added:
(point-max)
1737
Added:
nil)))
1734
1738
#+END_SRC
1735
1739
1736
1740
*** Beautify
@@ -1738,7 +1742,8 @@
1738
1742
**** All types of buffers
1739
1743
1740
1744
#+BEGIN_SRC emacs-lisp :tangle yes
1741
Removed:
(defun sd-beautify-buffer ()
1745
Added:
(defun sd-beautify-buffer
1746
Added:
()
1742
1747
"Clean up buffer in the most general sense.
1743
1748
1744
1749
This means performing the following actions:
@@ -1753,10 +1758,10 @@
1753
1758
((string-equal major-mode "org-mode")
1754
1759
(sd-org-fix-headlines-spacing))
1755
1760
((string-equal major-mode "python-mode")
1756
Removed:
(or (shell-command (concat "~/.local/bin/black " buffer-file-name))
1757
Removed:
(message "Could not find black Python formatter.")))))
1758
Removed:
1759
Removed:
1761
Added:
(or
1762
Added:
(shell-command
1763
Added:
(concat "~/.local/bin/black " buffer-file-name))
1764
Added:
(message "Could not find black Python formatter.")))))
1760
1765
#+END_SRC
1761
1766
1762
1767
**** TODO COMMENT For Org mode, specifically
@@ -1777,7 +1782,7 @@
1777
1782
1778
1783
** Smart quitting
1779
1784
:PROPERTIES:
1780
Removed:
:test: t
1785
Added:
:test: t
1781
1786
:END:
1782
1787
1783
1788
*** Window
@@ -1794,10 +1799,15 @@
1794
1799
*** Frame
1795
1800
1796
1801
#+BEGIN_SRC emacs-lisp :tangle yes
1797
Removed:
(defun sd-delete-frame-or-kill-emacs ()
1798
Removed:
(interactive)
1802
Added:
(defun sd-delete-frame-or-kill-emacs
1803
Added:
()
1799
1804
"Delete frame; if sole frame, kill Emacs."
1800
Removed:
(if (> (length (frame-list)) 1)
1805
Added:
(interactive)
1806
Added:
(if
1807
Added:
(>
1808
Added:
(length
1809
Added:
(frame-list))
1810
Added:
1)
1801
1811
(delete-frame)
1802
1812
(save-buffers-kill-terminal)))
1803
1813
#+END_SRC