emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [BUG] org-lint: Spurious warning from 'misplaced-heading lint-checke


From: Suhail Singh
Subject: Re: [BUG] org-lint: Spurious warning from 'misplaced-heading lint-checker [9.7.2 (release_N/A-N/A-88dd2c @ /home/user/.emacs.d/elpa/org-9.7.2/)]
Date: Sat, 08 Jun 2024 10:41:40 -0400
User-agent: Gnus/5.13 (Gnus v5.13)

Suhail Singh <suhailsingh247@gmail.com> writes:

> Ihor Radchenko <yantar92@posteo.net> writes:
>
>> Oops.
>> I amended the fix now.
>> https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=6c862699a
>
> It's better, but not quite there.  For instance, tangle the block below
> into an org file and observe the reported warning.
>
> #+begin_src org :tangle /tmp/misplaced-heading-mre-2.org
>   - Some words
>     ,#+RESULTS:
>     : this is a line with asterisks** in the middle
>
> #+end_src

Thinking some more about it, I am of the opinion that instead of
allowing some select elements (as is currently done for comment-block,
example-block, export-block, src-block), it might be better to *only*
trigger the warning for select elements from org-element-all-elements.
E.g., paragraph.  For instance, it seems silly to trigger the warning in
a table-row, or a babel-call etc.

#+begin_src org :tangle /tmp/misplaced-heading-mre-3.org
  | Blah | Hello** world |
  |      |               |

  #+call: blah :var foo="hello** world"
#+end_src

On a related note, what specific situation(s) was this checker intended
to help the user in?  I.e., what are the situations that could result in
misplaced headings?

While the checker seems to be similar to the 'misplaced-planning-info
checker in spirit, the difference (in reality) is that the regular
expression to detect possibly misplaced headings is much easier to get
false positives for.

-- 
Suhail



reply via email to

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