[PATCH]: add #+latex... and #+beamer...

Just in case, I'm adding a small patch to add the missing keywords I miss
when editing org to export to latex and beamer.

Best, /PA

On Sat, 5 Apr 2025 at 07:35, Pedro Andres Aranda Gutierrez <
paag...@gmail.com> wrote:

> Hi,
>
> when working on the font stuff I have started noticing that
> (pcomplete-completiosn-at-point) is apparently not providing completions
> for the #+LATEX... directives, as oppposed to #STARTUP, #+OPTIONS,,
> #+BEGIN_... and #END_... Is this a bug or just a perception of mine?
>
> Thx, /PA
> --
> Fragen sind nicht da, um beantwortet zu werden,
> Fragen sind da um gestellt zu werden
> Georg Kreisler
>
> Sagen's Paradeiser, write BE!
> Year 1 of the New Koprocracy
>
>
Best, /PA
-- 
Fragen sind nicht da, um beantwortet zu werden,
Fragen sind da um gestellt zu werden
Georg Kreisler

Sagen's Paradeiser, write BE!
Year 1 of the New Koprocracy
* lisp/org-pcomplete.el: Add completions for #+LATEX... and #+BEAMER...

diff --git a/lisp/org-pcomplete.el b/lisp/org-pcomplete.el
index 8fdd96826..02b19417a 100644
--- a/lisp/org-pcomplete.el
+++ b/lisp/org-pcomplete.el
@@ -219,6 +219,26 @@ When completing for #+STARTUP, for example, this function returns
 		    org-options-keywords)
 	    (mapcar (lambda (keyword) (concat keyword ": "))
 		    org-element-affiliated-keywords)
+            ;;
+            ;; Add the #+BEAMER_...: stuff
+            ;;
+            (let (beamer-names)
+              (dolist (name
+                       '("FONT_THEME" "INNER_THEME"
+                         "HEADER" "OUTER_THEME" "THEME")
+                       beamer-names)
+                (push (concat "BEAMER_" name ": ") beamer-names))
+              beamer-names)
+            ;;
+            ;; Add the #+LATEX_...: stuff
+            ;;
+            (let (latex-names)
+              (dolist (name
+                       '("CLASS" "CLASS_OPTIONS" "COMPILER"
+                         "HEADER" "HEADER_EXTRA")
+                       latex-names)
+                (push (concat "LATEX_" name ": ") latex-names))
+              latex-names)
 	    (let (block-names)
 	      (dolist (name
 		       '("CENTER" "COMMENT" "EXAMPLE" "EXPORT" "QUOTE" "SRC"

Reply via email to