From 39cf7cf374e7988c678ba1dc5daa26996758b6b0 Mon Sep 17 00:00:00 2001 From: rearman Date: Thu, 16 Mar 2023 10:28:25 -0400 Subject: [PATCH] Add change to org-emphasis-regexp Hopefully this will finally fix the issue with org's "verbatim" blocks --- init.org | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/init.org b/init.org index 301be9c..0904e04 100644 --- 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 -- 2.39.5