emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [PATCH] lisp/ox-latex.el: make org-latex-prefer-user-labels safe file local
@ 2024-02-02 12:23 gerard.vermeulen
  2024-02-02 13:51 ` Ihor Radchenko
  0 siblings, 1 reply; 2+ messages in thread
From: gerard.vermeulen @ 2024-02-02 12:23 UTC (permalink / raw)
  To: Emacs orgmode, Ihor Radchenko

[-- Attachment #1: Type: text/plain, Size: 369 bytes --]

Hi,

I think that it is inconsistent that `org-latex-reference-command'
is a safe file local variable while `org-latex-prefer-user-labels' is
not (it makes no sense to set the first at file scope, while the second
is nil at global scope). Furthermore, `org-html-prefer-user-labels'
is also a safe file local variable.

The attached patch fixes this.

Regards -- Gerard

[-- Attachment #2: 0001-lisp-ox-latex.el-make-org-latex-prefer-user-labels-s.patch --]
[-- Type: application/octet-stream, Size: 1000 bytes --]

From dd3b45399b985942e356e0e5c8dfc4f0a070e449 Mon Sep 17 00:00:00 2001
From: Gerard Vermeulen <gerard.vermeulen@posteo.net>
Date: Fri, 2 Feb 2024 13:06:29 +0100
Subject: [PATCH] lisp/ox-latex.el: make org-latex-prefer-user-labels safe file
 local

* lisp/ox-latex.el (org-latex-prefer-user-labels): make it a safe file
local variable for consistency with `org-latex-reference-command' and
`org-html-prefer-user-labels' being also safe file local variables.
---
 lisp/ox-latex.el | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lisp/ox-latex.el b/lisp/ox-latex.el
index d06b3e9ac..2b44679c7 100644
--- a/lisp/ox-latex.el
+++ b/lisp/ox-latex.el
@@ -401,7 +401,8 @@ references."
   :group 'org-export-latex
   :type 'boolean
   :version "26.1"
-  :package-version '(Org . "8.3"))
+  :package-version '(Org . "8.3")
+  :safe #'booleanp)
 
 (defcustom org-latex-reference-command "\\ref{%s}"
   "Format string that takes a reference to produce a LaTeX reference command.
-- 
2.42.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] lisp/ox-latex.el: make org-latex-prefer-user-labels safe file local
  2024-02-02 12:23 [PATCH] lisp/ox-latex.el: make org-latex-prefer-user-labels safe file local gerard.vermeulen
@ 2024-02-02 13:51 ` Ihor Radchenko
  0 siblings, 0 replies; 2+ messages in thread
From: Ihor Radchenko @ 2024-02-02 13:51 UTC (permalink / raw)
  To: gerard.vermeulen; +Cc: Emacs orgmode

gerard.vermeulen@posteo.net writes:

> I think that it is inconsistent that `org-latex-reference-command'
> is a safe file local variable while `org-latex-prefer-user-labels' is
> not (it makes no sense to set the first at file scope, while the second
> is nil at global scope). Furthermore, `org-html-prefer-user-labels'
> is also a safe file local variable.
>
> The attached patch fixes this.

Thanks!
Applied, onto main.
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=71fa0014d

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-02-02 13:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-02 12:23 [PATCH] lisp/ox-latex.el: make org-latex-prefer-user-labels safe file local gerard.vermeulen
2024-02-02 13:51 ` Ihor Radchenko

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).