Changes incorporated from Emacs for Writers

This commit is contained in:
Howard Abrams 2024-03-06 20:11:32 -08:00
parent 988c0dac2e
commit 27ce047521
2 changed files with 43 additions and 7 deletions

View file

@ -54,6 +54,23 @@ The =org-indent-indentation-per-level=, which defaults to =2= doesnt really w
;; :straight (:type built-in)
:custom-face (org-indent ((t (:inherit fixed-pitch)))))
#+end_src
** Markup View
The variable, =org-hide-emphasis-markers=, is key to pretending that Emacs can be a word processor, however, since the org markup controls arent viewable, I find it challenging at times, to change that. The [[https://github.com/awth13/org-appear][org-appear project]] seeks to fix this by showing the markup when the point is nearby:
#+begin_src emacs-lisp
(use-package org-appear
:straight (:type git :host github :repo "awth13/org-appear")
:init (setq org-appear-trigger 'manual)
:hook
((org-mode . (lambda ()
(add-hook 'evil-insert-state-entry-hook
#'org-appear-manual-start nil t)
(add-hook 'evil-insert-state-exit-hook
#'org-appear-manual-stop nil t)))
(org-mode . org-appear-mode)))
#+end_src
This makes the emphasis markers appear only in Evils insert mode.
** Typographic Quotes
According to [[http://endlessparentheses.com/prettify-your-quotation-marks.html][Artur Malabarba]] of [[http://endlessparentheses.com/prettify-you-apostrophes.html][Endless Parenthesis]] blog, I type either a /straight single or double quote/, ", Emacs actually inserts Unicode rounded quotes, like “this”. This idea isnt how a file is /displayed/, but actually how the file is /made/. Time will tell if this idea works with my auxiliary functions on my phone, like [[https://play.google.com/store/apps/details?id=com.orgzly&hl=en_US&gl=US][Orgzly]] and [[https://github.com/amake/orgro][Orgro]].
@ -274,8 +291,10 @@ The [[https://github.com/minad/org-modern][org-modern]] project attempts to do a
(use-package org-modern
:straight (:host github :repo "minad/org-modern")
:hook
((org-mode . org-modern-mode)
(org-agenda-finalize . org-modern-agenda)))
((org-mode . global-org-modern-mode)
(org-agenda-finalize . org-modern-agenda))
:custom
(org-modern-table nil))
#+end_src
I like the smaller code blocks as well as the <2022-06-16 Thu> timestamps.
* Checkboxes

View file

@ -3,7 +3,7 @@
#+date: 2020-09-18
#+tags: emacs org
#+startup: inlineimages
#+lastmod: [2024-03-05 Tue]
#+lastmod: [2024-03-06 Wed]
A literate programming file for configuring org-mode and those files.
@ -63,14 +63,24 @@ Begin by initializing these org variables:
org-startup-indented t ; Visually show paragraphs indented
org-list-indent-offset 2
org-edit-src-content-indentation 2 ; Doom Emacs sets this to 0,
; but uses a trick to make it
; appear indented.
; but uses a trick to make it
; appear indented.
org-imenu-depth 4
sentence-end-double-space nil ; I jump around by sentences, but seldom have two spaces.
org-html-validation-link nil
org-export-with-sub-superscripts nil
org-export-with-drawers nil
org-export-with-author nil
org-export-with-email nil
org-export-with-date nil
org-export-with-todo-keywords nil
org-export-with-broken-links t
org-export-with-toc nil ; Only for my hamacs publishing
org-export-with-smart-quotes t
org-export-date-timestamp-format "%e %B %Y"
org-html-validation-link nil
org-directory "~/personal"
org-default-notes-file "~/personal/general-notes.txt"
@ -85,14 +95,21 @@ Begin by initializing these org variables:
org-agenda-span 'day ; Default is 'week
org-confirm-babel-evaluate nil
org-src-fontify-natively t
org-src-tab-acts-natively t)
org-src-tab-acts-natively t
;; Updates the lastmod: when set in the file:
time-stamp-active t
time-stamp-start "#\\+lastmod:[ \t]*"
time-stamp-end "$"
time-stamp-format "[%04Y-%02m-%02d %a]")
#+end_src
* Configuration Section
I pretend that my org files are word processing files that wrap automatically:
#+name: visual-hook
#+begin_src emacs-lisp :tangle no
(add-hook 'org-mode-hook #'visual-line-mode)
(add-hook 'org-mode-hook #'visual-line-mode)
(add-hook 'before-save-hook 'time-stamp nil)
#+end_src
Files that end in =.txt= are still org files to me: