]> git.earman.xyz Git - emacsinit.git/commitdiff
Add change to org-emphasis-regexp
authorrearman <rearman@r717.net>
Thu, 16 Mar 2023 14:28:25 +0000 (10:28 -0400)
committerrearman <rearman@r717.net>
Thu, 16 Mar 2023 14:28:25 +0000 (10:28 -0400)
Hopefully this will finally fix the issue with org's "verbatim" blocks

init.org

index 301be9ce5a535c7d7adf3057936037d2fa201f4e..0904e042c32654586248918ce22604746022689b 100644 (file)
--- a/init.org
+++ b/init.org
@@ -315,7 +315,7 @@ Overwrite selection when active, like every other editor since Sam.
 (delete-selection-mode t)
 #+END_SRC
 
-Don't disable any functions
+Don't disable any functions.
 #+BEGIN_SRC emacs-lisp
 (setq  disabled-command-function nil)
 #+END_SRC
@@ -328,8 +328,7 @@ Save pastes from elsewhere into the kill-ring, and don't ask me about killing pr
 
 **** Scrolling
 #+BEGIN_SRC emacs-lisp
-(setq scroll-conservatively 101
-      scroll-preserve-screen-position t)
+(setq scroll-preserve-screen-position t)
 #+END_SRC
 
 **** Windmove
@@ -449,6 +448,7 @@ Use =recycle bin=, DON'T use AltGr, and tell emacs where diff is.
 #+END_SRC
 ** org configuration
 I had this in a use-package declaration, but I find this a little nicer.
+
 *** Basics
 Just some basic stuff.  I don't think I've seen too many configs that don't have at least most of these.
 #+BEGIN_SRC emacs-lisp
@@ -464,8 +464,7 @@ Just some basic stuff.  I don't think I've seen too many configs that don't have
 
 *** Bindings
 
-The usual bindings, aside from my special case of using C-' in place of =
-C-u.  I have unbound C-' in org-mode.
+The usual bindings, aside from my special case of using =C-'= in place of =C-u=.  I have unbound =C-'= in org-mode.
 
 #+BEGIN_SRC emacs-lisp
 (global-set-key (kbd "C-c l") 'org-store-link)
@@ -567,6 +566,15 @@ Stolen from https://github.com/larstvei/dot-emacs."
 (add-hook 'after-save-hook 'tangle-init)
 #+END_SRC
 
+*** Emphasis Regexp
+For some reason, the org people decided that =verbatim= doesn't actually mean =verbatim=!  This fixes that.  I found this solution at [[https://emacs.stackexchange.com/questions/13820/inline-verbatim-and-code-with-quotes-in-org-mode][stackexchange]].
+#+BEGIN_SRC emacs-lisp
+  (require 'org)
+  (setcar (nthcdr 2 org-emphasis-regexp-components) " \t\r\n,")
+  (org-set-emph-re 'org-emphasis-regexp-components org-emphasis-regexp-components)
+  (org-element--set-regexps)
+#+END_SRC
+
 ** Dired configuration
 Make dired use the same switches I prefer for =ls=, give me a simpler listing, and default to using its current buffer for visiting a file rather than creating a new one.
 #+BEGIN_SRC emacs-lisp