emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Bug: Folding problem with markdown source block
@ 2022-08-06 21:10 Jack Kamm
  2022-08-07  9:07 ` Jeremie Juste
  2022-08-07 10:38 ` Ihor Radchenko
  0 siblings, 2 replies; 3+ messages in thread
From: Jack Kamm @ 2022-08-06 21:10 UTC (permalink / raw)
  To: emacs-orgmode

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

Hello,

I found that Org entries containing markdown source blocks don't get
properly folded on the main development branch, when markdown-mode is
also loaded.

To reproduce:

1. Download markdown-mode from MELPA or Github. [1]
2. Fix the paths in the attached init.el.
3. emacs -Q -l init.el test.org
4. Shift-tab to collapse the visibility

Output should look like this:

* Headline 1...

But instead I observe this:

* Headline 1... ```
... ```
...

If markdown-mode isn't loaded, then the problem goes away. I think the
problem might have to do with the fontification that markdown-mode
applies to the back-quoted code block.

Versions:
GNU Emacs 28.1 (build 2, x86_64-pc-linux-gnu, X toolkit, cairo version 1.17.6, Xaw3d scroll bars) of 2022-07-10
Org mode version 9.5.4 (release_9.5.4-717-g9cc60d @ /home/jack/dev/org-mode/lisp/)

[1] https://github.com/jrblevin/markdown-mode


[-- Attachment #2: init.el --]
[-- Type: text/plain, Size: 142 bytes --]


(add-to-list 'load-path "~/.emacs.d/elpa/markdown-mode-20220708.6")
(require 'markdown-mode)

(add-to-list 'load-path "~/dev/org-mode/lisp")

[-- Attachment #3: test.org --]
[-- Type: text/plain, Size: 179 bytes --]


* Headline 1
** Headline 1a

#+begin_src markdown
  Some source code:

  ```
  echo hello world
  ```

  A list:

  ,* Item 1
  ,* Item 2
#+end_src

** Headline 1b

Lorem ipsum.

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

* Re: Bug: Folding problem with markdown source block
  2022-08-06 21:10 Bug: Folding problem with markdown source block Jack Kamm
@ 2022-08-07  9:07 ` Jeremie Juste
  2022-08-07 10:38 ` Ihor Radchenko
  1 sibling, 0 replies; 3+ messages in thread
From: Jeremie Juste @ 2022-08-07  9:07 UTC (permalink / raw)
  To: Jack Kamm; +Cc: emacs-orgmode


Hello Jack,

Thanks for reporting. I can reproduce the bug.

Best regards,
Jeremie


On Saturday,  6 Aug 2022 at 14:10, Jack Kamm wrote:
> Hello,
>
> I found that Org entries containing markdown source blocks don't get
> properly folded on the main development branch, when markdown-mode is
> also loaded.
>
> To reproduce:
>
> 1. Download markdown-mode from MELPA or Github. [1]
> 2. Fix the paths in the attached init.el.
> 3. emacs -Q -l init.el test.org
> 4. Shift-tab to collapse the visibility
>
> Output should look like this:
>
> * Headline 1...
>
> But instead I observe this:
>
> * Headline 1... ```
> ... ```
> ...
>
> If markdown-mode isn't loaded, then the problem goes away. I think the
> problem might have to do with the fontification that markdown-mode
> applies to the back-quoted code block.
>
> Versions:
> GNU Emacs 28.1 (build 2, x86_64-pc-linux-gnu, X toolkit, cairo version 1.17.6, Xaw3d scroll bars) of 2022-07-10
> Org mode version 9.5.4 (release_9.5.4-717-g9cc60d @ /home/jack/dev/org-mode/lisp/)
>
> [1] https://github.com/jrblevin/markdown-mode
>
>
> (add-to-list 'load-path "~/.emacs.d/elpa/markdown-mode-20220708.6")
> (require 'markdown-mode)
>
> (add-to-list 'load-path "~/dev/org-mode/lisp")
>
>
> * Headline 1
> ** Headline 1a
>
> #+begin_src markdown
>   Some source code:
>
>   ```
>   echo hello world
>   ```
>
>   A list:
>
>   ,* Item 1
>   ,* Item 2
> #+end_src
>
> ** Headline 1b
>
> Lorem ipsum.


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

* Re: Bug: Folding problem with markdown source block
  2022-08-06 21:10 Bug: Folding problem with markdown source block Jack Kamm
  2022-08-07  9:07 ` Jeremie Juste
@ 2022-08-07 10:38 ` Ihor Radchenko
  1 sibling, 0 replies; 3+ messages in thread
From: Ihor Radchenko @ 2022-08-07 10:38 UTC (permalink / raw)
  To: Jack Kamm; +Cc: emacs-orgmode

Jack Kamm <jackkamm@tatersworld.org> writes:

> I found that Org entries containing markdown source blocks don't get
> properly folded on the main development branch, when markdown-mode is
> also loaded.
>
> To reproduce:
>
> 1. Download markdown-mode from MELPA or Github. [1]
> 2. Fix the paths in the attached init.el.
> 3. emacs -Q -l init.el test.org
> 4. Shift-tab to collapse the visibility

Thanks for reporting!

Fixed on main via 00adad935.
https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=00adad9357b9123a7b11ecf12c148a5196debcb7


-- 
Ihor Radchenko,
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:[~2022-08-07 10:38 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-08-06 21:10 Bug: Folding problem with markdown source block Jack Kamm
2022-08-07  9:07 ` Jeremie Juste
2022-08-07 10:38 ` Ihor Radchenko

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