From f43116752ae0405d46159617a849d98bcfcc578c Mon Sep 17 00:00:00 2001 From: Jacopo De Simoi Date: Mon, 18 Mar 2024 11:55:36 -0400 Subject: [PATCH] Fix icalendar export --- global.org | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/global.org b/global.org index 1f63dc3..f090754 100644 --- a/global.org +++ b/global.org @@ -2027,11 +2027,34 @@ (org-narrow-to-subtree) (let ((org-icalendar-scheduled-summary-prefix "") (org-icalendar-use-scheduled '(event-if-todo)) - (org-icalendar-include-todo) nil) + (org-icalendar-include-todo nil)) (shell-command (concat "~/scripts/push-to-nextcloud-cal.sh " (org-icalendar-export-to-ics)))) (widen)) #+end_src +*** Make reftex work in org-edit + RefTeχ refuses to work when the buffer is not visiting a file. + Here is a tentative workaround: + - extract the file we are tangling to + - use it as TeX-master + - hijack ~buffer-file-name~ to return something non-nil; I would + rather hijack it locally (using cl-letf rather than advising the + function since other things would be confused by the advice) + #+begin_src emacs-lisp + (defun hijack-buffer-file-name (orig-fun &rest args) + (if (not (boundp 'reftex-workaround-enabled)) + (apply orig-fun args) + (cl-letf (((symbol-function 'buffer-file-name) (lambda (&optional buffer) "fragment.tex"))) + (apply orig-fun args)))) + + (advice-add 'reftex-label :around + #'hijack-buffer-file-name) + (advice-add 'reftex-reference :around + #'hijack-buffer-file-name) + + + #+end_src + ** elisp *** Paredit #+begin_src emacs-lisp