emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Michael Dauer <mick.dauer@gmail.com>
To: Ihor Radchenko <yantar92@gmail.com>
Cc: emacs-orgmode@gnu.org
Subject: Re: BUG?: Link to inline-task not working
Date: Fri, 3 Dec 2021 15:20:11 +0100	[thread overview]
Message-ID: <CAP7OBxLGmKBPkqrVM5VrA7s71t2uUPv+5iCeL918b+HqqSEraA@mail.gmail.com> (raw)
In-Reply-To: <875ys6m05b.fsf@localhost>

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

Ihor, thank you for the quick workaround.

Unfortunately storing links is not much of an issue for me. The real issue
is how I can get the internal links working in the exported html.

I could not find the right places to deactivate and
re-activate inline-tasks during export.

I have a custom org-html-format-inlinetask-function. If I
deactivate inline-tasks outside this formatter is never called, otherwise
the links are not generated.

Where are the links/href are built? There should be the error that excludes
inline-tasks.

thx,
m

Am Fr., 3. Dez. 2021 um 11:50 Uhr schrieb Ihor Radchenko <yantar92@gmail.com
>:

> Michael Dauer <mick.dauer@gmail.com> writes:
>
> > Before (require 'org-inlinetask) all is fine. But after executing
> (require
> > 'org-inlinetask) the following happens:
> > 1. With point on/in t1 (org-store-link) stores *h2.
> > 2. The manually created link below h1 works in the buffer. But it is
> > exported as BROKEN LINK.
>
> Confirmed.
>
> > Any ideas how to get fully working links to inline-tasks?
>
> I have the following in my config to mitigate this problem:
>
> (defun org-inlinetask-store-link (oldfun &rest args)
>   "Store link to inlinetask at point."
>   (if (and (derived-mode-p 'org-mode)
>            (org-inlinetask-in-task-p))
>       (let ((org-inlinetask-min-level 1000))
>         (apply oldfun args))
>     (apply oldfun args)))
>
> (advice-add 'org-store-link :around #'org-inlinetask-store-link)
>
> Best,
> Ihor
>

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

  reply	other threads:[~2021-12-03 14:21 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-03  8:30 BUG?: Link to inline-task not working Michael Dauer
2021-12-03 10:51 ` Ihor Radchenko
2021-12-03 14:20   ` Michael Dauer [this message]
2021-12-04  3:19     ` Ihor Radchenko
2021-12-06 13:14       ` Michael Dauer
2021-12-06 13:47         ` Ihor Radchenko
2022-10-05  3:23           ` [org-export] Linking inlinetasks (was: BUG?: Link to inline-task not working) Ihor Radchenko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAP7OBxLGmKBPkqrVM5VrA7s71t2uUPv+5iCeL918b+HqqSEraA@mail.gmail.com \
    --to=mick.dauer@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=yantar92@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).