all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* PATCH: Add tip to integrate spellchecking with #+LANGUAGE:
@ 2024-07-30  6:18 Pedro A. Aranda
  2024-07-30  8:52 ` Pedro Andres Aranda Gutierrez
  0 siblings, 1 reply; 3+ messages in thread
From: Pedro A. Aranda @ 2024-07-30  6:18 UTC (permalink / raw)
  To: Org Mode List


  doc/org-manual.org: Add tip to integrate spellchecking with #+LANGUAGE:

* doc/org-manual.org: Show how to watch ~org-export-default-language~ in
your ELISP code to automatically adjust your spell-checker.

---

  doc/org-manual.org | 12 ++++++++++++
  1 file changed, 12 insertions(+)

diff --git a/doc/org-manual.org b/doc/org-manual.org
index 6cf51ebca..020fd061f 100644
--- a/doc/org-manual.org
+++ b/doc/org-manual.org
@@ -14075,6 +14075,18 @@ general options (see [[*Export Settings]]).
                 '("AUTO" "polyglossia" t ("xelatex" "lualatex")))
    #+end_src

+  *TIP*: you can watch this variable in your ELISP code to interface
+  with your spellchecker:
+
+  #+begin_src emacs-lisp
+    (defun org-export-default-language-watcher (_ newval _ _)
+      ;; newval will hold the value defined in #+LANGUAGE:
+      )
+
+    (add-variable-watcher 'org-export-default-language
+                          #'org-export-default-language-watcher))
+  #+end_src
+
  - =LATEX_CLASS= ::

    #+cindex: @samp{LATEX_CLASS}, keyword
--
2.34.1



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

* Re: PATCH: Add tip to integrate spellchecking with #+LANGUAGE:
  2024-07-30  6:18 PATCH: Add tip to integrate spellchecking with #+LANGUAGE: Pedro A. Aranda
@ 2024-07-30  8:52 ` Pedro Andres Aranda Gutierrez
  2024-08-07 19:50   ` Ihor Radchenko
  0 siblings, 1 reply; 3+ messages in thread
From: Pedro Andres Aranda Gutierrez @ 2024-07-30  8:52 UTC (permalink / raw)
  To: Org Mode List

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

Hi,

put his on hold FTMB, please. I don't yet understand why I get 'en'
regardless the language I state in org 9.7.x

However, "evaluating" #+LANGUAGE: at startup may be a nice feature for the
future, in the sense of reducing the amount of lines to setup Emacs for a
specific document.

Best, /PA

On Tue, 30 Jul 2024 at 08:18, Pedro A. Aranda <paaguti@gmail.com> wrote:

>
>   doc/org-manual.org: Add tip to integrate spellchecking with #+LANGUAGE:
>
> * doc/org-manual.org: Show how to watch ~org-export-default-language~ in
> your ELISP code to automatically adjust your spell-checker.
>
> ---
>
>   doc/org-manual.org | 12 ++++++++++++
>   1 file changed, 12 insertions(+)
>
> diff --git a/doc/org-manual.org b/doc/org-manual.org
> index 6cf51ebca..020fd061f 100644
> --- a/doc/org-manual.org
> +++ b/doc/org-manual.org
> @@ -14075,6 +14075,18 @@ general options (see [[*Export Settings]]).
>                  '("AUTO" "polyglossia" t ("xelatex" "lualatex")))
>     #+end_src
>
> +  *TIP*: you can watch this variable in your ELISP code to interface
> +  with your spellchecker:
> +
> +  #+begin_src emacs-lisp
> +    (defun org-export-default-language-watcher (_ newval _ _)
> +      ;; newval will hold the value defined in #+LANGUAGE:
> +      )
> +
> +    (add-variable-watcher 'org-export-default-language
> +                          #'org-export-default-language-watcher))
> +  #+end_src
> +
>   - =LATEX_CLASS= ::
>
>     #+cindex: @samp{LATEX_CLASS}, keyword
> --
> 2.34.1
>
>

-- 
Fragen sind nicht da, um beantwortet zu werden,
Fragen sind da um gestellt zu werden
Georg Kreisler

Headaches with a Juju log:
unit-basic-16: 09:17:36 WARNING juju.worker.uniter.operation we should run
a leader-deposed hook here, but we can't yet

[-- Attachment #2: Type: text/html, Size: 3093 bytes --]

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

* Re: PATCH: Add tip to integrate spellchecking with #+LANGUAGE:
  2024-07-30  8:52 ` Pedro Andres Aranda Gutierrez
@ 2024-08-07 19:50   ` Ihor Radchenko
  0 siblings, 0 replies; 3+ messages in thread
From: Ihor Radchenko @ 2024-08-07 19:50 UTC (permalink / raw)
  To: Pedro Andres Aranda Gutierrez; +Cc: Org Mode List

Pedro Andres Aranda Gutierrez <paaguti@gmail.com> writes:

> put his on hold FTMB, please. I don't yet understand why I get 'en'
> regardless the language I state in org 9.7.x

Because Org mode never changes that custom option by itself. It is user
who sets it. Variable watches make no sense there.

Canceled.

> However, "evaluating" #+LANGUAGE: at startup may be a nice feature for the
> future, in the sense of reducing the amount of lines to setup Emacs for a
> specific document.

Overwriting the user customization is not a good practice, even though
we historically do such things in some cases.

-- 
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] 3+ messages in thread

end of thread, other threads:[~2024-08-07 20:30 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-30  6:18 PATCH: Add tip to integrate spellchecking with #+LANGUAGE: Pedro A. Aranda
2024-07-30  8:52 ` Pedro Andres Aranda Gutierrez
2024-08-07 19:50   ` Ihor Radchenko

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.