GNU bug report logs - #64339
29.0.50; incorrect org-mode dynamic blocks docs

Previous Next

Package: emacs;

Reported by: pva-outdoor <at> yandex.ru

Date: Wed, 28 Jun 2023 20:36:02 UTC

Severity: normal

Found in version 29.0.50

Full log


Message #8 received at 64339 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: pva-outdoor <at> yandex.ru
Cc: 64339 <at> debbugs.gnu.org
Subject: Re: bug#64339: 29.0.50; incorrect org-mode dynamic blocks docs
Date: Thu, 29 Jun 2023 07:58:50 +0300
> From: pva-outdoor <at> yandex.ru
> Date: Thu, 29 Jun 2023 01:36:00 +0500
> 
> Please check the following documentation (or implementation) of org-mode
> dynamic blocks:
> 
> 1. It seems that dynamic blocks can't have inner headlines (the
> org-dblock-write:xxx should not produce them). Otherwise the block will
> be parsed incorrectly (not mentioned in docs for org-mode).
> 
> Example: Create the following 1.org and export it to unicode text (press
> C-c C-e t U). You will see "#+BEGIN: block2" as text.
> 
>   * Block2
>   
>   #+BEGIN: block2
>   ** Section 1
>   asdasdsad
>   #+END:
>   
> 2. Org-mode info file says:
> 
>      Dynamic blocks, like any other block, can be narrowed with
>   ‘org-narrow-to-block’.
> 
> That would not work because of implementation of org-narrow-to-block:
> 
> (defun org-narrow-to-block ()
>   "Narrow buffer to the current block."
>   (interactive)
>   (let* ((case-fold-search t)
> 	 (blockp (org-between-regexps-p "^[ \t]*#\\+begin_.*"  <----
> 					"^[ \t]*#\\+end_.*")))
>     (if blockp
> 	(narrow-to-region (car blockp) (cdr blockp))
>       (user-error "Not in a block"))))
> 
> 
> 
> There is also a minor bug in org-mode (sould I report it
> in it's own mail?):
> 
> If you press C-c C-, [RET] [RET] You'll get:
> 
> #+begin_
> #+end_nil
> 
> while one could expect either begin_nil or end_. 

Could you please report this to the Org developers first?  It sounds
like a problem in Org or its documentation.

Thanks.




This bug report was last modified 1 year and 359 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.