emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ox-publish: Some starting problems


From: Max Nikulin
Subject: Re: ox-publish: Some starting problems
Date: Tue, 15 Mar 2022 20:04:13 +0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0

On 09/03/2022 23:39, c.buhtz@posteo.jp wrote:
Am 09.03.2022 16:32 schrieb Max Nikulin:

Do you mean that (setq org-export-with-broken-links 'mark) is the same as :with-broken-links mark? This are just two different ways to set the same thing?
How do I know as a newbie? ;)

I suggested you to have a look at the `org-export-options-alist' definition in ox.el in another thread. It is reasonable to have a per-file setting (that you do not like), a per-project one, and a global variable that determines behavior when neither project nor file specify desired value.

I recommended to set only one of them (at the beginning) to avoid confusion due to e.g. typos when it is uncertain which value is really active.

Why using custom-set variables here? Is there something wrong with just doing
(org-export-with-broken-links t)

Likely you mean

   (setq org-export-with-broken-links t)

You were trying to set incorrect value with quotes around "mark". Easy customization interface helps to avoid such problems. There are custom variables with :set attribute that may behave incorrectly with `setq'.

There is a known problem with id links. They may be broken if they
lead to another file:
inkbottle. org-id with ox-html. Sat, 14 Aug 2021 00:28:35 +0200
https://list.orgmode.org/4617246.m1MCmUpgFQ@pluto/

Back to the bug.
The bug-thread is hard for me to understand because of a lot of internal details. What is the current essence? Currently there is no way to use ox-publish with org-roam-v2 generated org files which use IDs as links?
But as I told sometimes the links are generated.

I can say nothing concerning org-roam. I can reproduce the problem with pure org-publish, but I have not tried to find a workaround. I am using CUSTOM_ID links with some mnemonics in anchors (and I am aware that such links become broken when a heading is refiled to another file).

Btw: Also in my minimal working example I was not able to surly reproduce the problem. Sometimes it works sometimes not. I also deleted ~/.emacs.d/org-roam.db, ~/.org-timestamps and ~/.emacs-d/.orgid-indexes (I forget the correct name for the latter).

Org-publish regenerates files only for the sources that were modified (by default). Unchanged files may have links to the updated ones. Originally ox (org-export) assigns random anchors, but org-publish caches them in some file to avoid broken links after partial updates. It may affect behavior for consecutive runs.

org-mode is a mode, ox-publish maybe a package (actually unsure).
I thought it was a separate thing because of "(require ox-publish)". Again: How do I as a newbie know?

org-mode as a major mode consists of a lot of packages. See e.g. https://www.gnu.org/software/emacs/manual/html_node/emacs/Modes.html

That page specifies related global variable, so you can try
`describe-variable' C-h v with the related name.

I know that and I did. But this is waste of time when I have to do this for each of the variable in that big list.

When you are reading info "(org) Publishing options" https://orgmode.org/manual/Publishing-options.html, it is assumed that you are already familiar with info "(org) Export Settings" https://orgmode.org/manual/Export-Settings.html earlier section. When you are reading the manual inside Emacs, you can hit C-h v having cursor on the variable name. The only issue is that the package should be loaded (M-x load-library RET ox RET).

6.
Is there a way to integrated backlinks into output?

Do you mean something specific to org-roam?

I am not sure but maybe yes. ;)
I can do C-c n l which invokes org-roam-buffer-toogle and shows me an extra buffer with a list of all nodes (org-files?) which are linking to the current open node.

It is better to discuss with the org-roam community or the developers.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]