emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* fuzzy link can't be exported when \begin{foo} is there
@ 2021-03-26 23:55 James Powell
  2021-03-30  4:45 ` Kyle Meyer
  0 siblings, 1 reply; 3+ messages in thread
From: James Powell @ 2021-03-26 23:55 UTC (permalink / raw)
  To: emacs-orgmode

First time poster, long time user.  Glad to be here.

This seems to a bug.

- Org mode version 9.4.4
- GNU Emacs 25.3.1

If I write in a little table like this:

: In Table [[tableOne]] I show that this site has AADT 143925, by 
TVT_Detailed_2019.xlsx.
:
: #+NAME: tableOne
: #+CAPTION: Site 26016 has AADT 143925.
: | SITE_ID | LRM      |  BEGMP |  ENDMP | CLASS_01 | [...] |   AADT | 
K_FACTOR | D_FACTOR | Ton_Factor |
: |   26016 | 00100I00 | 297.31 | 298.93 |     0.11 | [...] | 143925 
|      7.5 |       52 |          4 |

It should be org-lint clean and export as a link when I export to 
latex.  And it is and it does.

So far so good.   When I add some latex in the middle:
<<start>>
In Table [[tableOne]] I show that this site has AADT 143925, by 
TVT_Detailed_2019.xlsx.

\begin{landscape}
#+NAME: tableOne
#+CAPTION: Site 26016 has AADT 143925.
| SITE_ID | LRM      |  BEGMP |  ENDMP | CLASS_01 | [...] |   AADT | 
K_FACTOR | D_FACTOR | Ton_Factor |
|   26016 | 00100I00 | 297.31 | 298.93 |     0.11 | [...] | 143925 
|      7.5 |       52 |          4 |
\end{landscape}
<<end>>
I expect it to keep on working.  But instead, now I get

:      1 high  Unknown fuzzy location "tableOne"
in org-lint.  Latex export reports "BROKEN LINK".

If you wish, you may paste the text from <<start>> to <<end>> 
noninclusive above in this email to reproduce.  The manual says that it 
should work: "The following snippets will be identified as LaTeX source 
code [...] Environments of any kind" ( *info* (org) LaTeX fragments).  I 
searched the mailing list for help, I see lots of comments about 
org-lint but not so much on this.  I scanned the open bugs at 
https://updates.orgmode.org/#bugs and nothing seemed relevant.

Incidentally I started this bug report with org-mode 9.3.6.  Back in
9.3.6, it was worse: not only would org-lint report 'unknown fuzzy'
and latex export say "BROKEN LINK" but also C-c C-o
(org-open-at-point) would fail to find the target and make the jump.

Many thanks.

- JP


--
James E. Powell, MS
Pronouns: he/him/his
Applied Physics PhD Candidate
Department of Physics
Portland State University
Home page: http://web.pdx.edu/~powellj
Office: SRTC 409B Phone: +1-503-725-8515



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

* Re: fuzzy link can't be exported when \begin{foo} is there
  2021-03-26 23:55 fuzzy link can't be exported when \begin{foo} is there James Powell
@ 2021-03-30  4:45 ` Kyle Meyer
  2021-03-31 19:56   ` James Powell
  0 siblings, 1 reply; 3+ messages in thread
From: Kyle Meyer @ 2021-03-30  4:45 UTC (permalink / raw)
  To: James Powell; +Cc: emacs-orgmode

James Powell writes:

> First time poster, long time user.  Glad to be here.

Welcome.

> This seems to a bug.
[...]
> When I add some latex in the middle:
> <<start>>
> In Table [[tableOne]] I show that this site has AADT 143925, by 
> TVT_Detailed_2019.xlsx.
>
> \begin{landscape}
> #+NAME: tableOne
> #+CAPTION: Site 26016 has AADT 143925.
> | SITE_ID | LRM      |  BEGMP |  ENDMP | CLASS_01 | [...] |   AADT | 
> K_FACTOR | D_FACTOR | Ton_Factor |
> |   26016 | 00100I00 | 297.31 | 298.93 |     0.11 | [...] | 143925 
> |      7.5 |       52 |          4 |
> \end{landscape}
> <<end>>
> I expect it to keep on working.  But instead, now I get
>
> :      1 high  Unknown fuzzy location "tableOne"
> in org-lint.  Latex export reports "BROKEN LINK".

I believe the above text is sent as is (i.e. that won't be processed as
an Org table).  Calling org-element-at-point on it reports that it's a
latex-environment.

Perhaps you want

--8<---------------cut here---------------start------------->8---
#+LATEX: \begin{landscape}
#+NAME: tableOne
#+CAPTION: Site 26016 has AADT 143925.
| SITE_ID | LRM      |  BEGMP |  ENDMP | CLASS_01 | [...] |   AADT | K_FACTOR | D_FACTOR | Ton_Factor |
|   26016 | 00100I00 | 297.31 | 298.93 |     0.11 | [...] | 143925 |      7.5 |       52 |          4 |
#+LATEX: \end{landscape}
--8<---------------cut here---------------end--------------->8---

> Incidentally I started this bug report with org-mode 9.3.6.  Back in
> 9.3.6, it was worse: not only would org-lint report 'unknown fuzzy'
> and latex export say "BROKEN LINK" but also C-c C-o
> (org-open-at-point) would fail to find the target and make the jump.

The type error was guarded against with 3bb073b63 (ol: Fix type error in
org-link-search corner case, 2020-11-30).  There's no name here, so it
then falls back to fuzzy search.
Compare

  (org-element-property :name (org-element-at-point))

in with point on the table in your original snippet and the suggested
one above.


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

* Re: fuzzy link can't be exported when \begin{foo} is there
  2021-03-30  4:45 ` Kyle Meyer
@ 2021-03-31 19:56   ` James Powell
  0 siblings, 0 replies; 3+ messages in thread
From: James Powell @ 2021-03-31 19:56 UTC (permalink / raw)
  To: Kyle Meyer; +Cc: emacs-orgmode

Thank you Kyle.  I can see how using the latex environments the way I 
did caused the table part to not be org-mode at all any more.  I didn't 
realize org behaved that way, and the workaround of using #+LATEX works 
wonderfully.

Incidentally would not org-mode benefit from a bug tracker? Ordinarily 
here I would say "close the bug" but this is close enough I hope?

- JP

On 3/29/21 9:45 PM, Kyle Meyer wrote:
> James Powell writes:
>
>> First time poster, long time user.  Glad to be here.
> Welcome.
>
>> This seems to a bug.
> [...]
>> When I add some latex in the middle:
>> <<start>>
>> In Table [[tableOne]] I show that this site has AADT 143925, by
>> TVT_Detailed_2019.xlsx.
>>
>> \begin{landscape}
>> #+NAME: tableOne
>> #+CAPTION: Site 26016 has AADT 143925.
>> | SITE_ID | LRM      |  BEGMP |  ENDMP | CLASS_01 | [...] |   AADT |
>> K_FACTOR | D_FACTOR | Ton_Factor |
>> |   26016 | 00100I00 | 297.31 | 298.93 |     0.11 | [...] | 143925
>> |      7.5 |       52 |          4 |
>> \end{landscape}
>> <<end>>
>> I expect it to keep on working.  But instead, now I get
>>
>> :      1 high  Unknown fuzzy location "tableOne"
>> in org-lint.  Latex export reports "BROKEN LINK".
> I believe the above text is sent as is (i.e. that won't be processed as
> an Org table).  Calling org-element-at-point on it reports that it's a
> latex-environment.
>
> Perhaps you want
>
> --8<---------------cut here---------------start------------->8---
> #+LATEX: \begin{landscape}
> #+NAME: tableOne
> #+CAPTION: Site 26016 has AADT 143925.
> | SITE_ID | LRM      |  BEGMP |  ENDMP | CLASS_01 | [...] |   AADT | K_FACTOR | D_FACTOR | Ton_Factor |
> |   26016 | 00100I00 | 297.31 | 298.93 |     0.11 | [...] | 143925 |      7.5 |       52 |          4 |
> #+LATEX: \end{landscape}
> --8<---------------cut here---------------end--------------->8---
>
>> Incidentally I started this bug report with org-mode 9.3.6.  Back in
>> 9.3.6, it was worse: not only would org-lint report 'unknown fuzzy'
>> and latex export say "BROKEN LINK" but also C-c C-o
>> (org-open-at-point) would fail to find the target and make the jump.
> The type error was guarded against with 3bb073b63 (ol: Fix type error in
> org-link-search corner case, 2020-11-30).  There's no name here, so it
> then falls back to fuzzy search.
> Compare
>
>    (org-element-property :name (org-element-at-point))
>
> in with point on the table in your original snippet and the suggested
> one above.

-- 
James E. Powell, MS
Pronouns: he/him/his
Applied Physics PhD Candidate
Department of Physics
Portland State University
Home page: http://web.pdx.edu/~powellj
Office: SRTC 409B Phone: +1-503-725-8515



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

end of thread, other threads:[~2021-03-31 19:58 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-26 23:55 fuzzy link can't be exported when \begin{foo} is there James Powell
2021-03-30  4:45 ` Kyle Meyer
2021-03-31 19:56   ` James Powell

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).