unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#64339: 29.0.50; incorrect org-mode dynamic blocks docs
@ 2023-06-28 20:36 pva-outdoor
  2023-06-29  4:58 ` Eli Zaretskii
  0 siblings, 1 reply; 2+ messages in thread
From: pva-outdoor @ 2023-06-28 20:36 UTC (permalink / raw)
  To: 64339


Hello, team!

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



In GNU Emacs 29.0.50 (build 4, x86_64-pc-linux-gnu, GTK+ Version 3.24.34, cairo version 1.17.6)
 of 2022-07-15 built on pva-msi
Repository revision: ed4ba79ea8f2be2d01f6447910e2c8319908d0d6
Repository branch: master
Windowing system distributor 'The X.Org Foundation', version 11.0.12101008
System Description: Arch Linux

Configured features:
ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG
JSON LCMS2 LIBOTF LIBSYSTEMD LIBXML2 M17N_FLT MODULES NOTIFY INOTIFY
PDUMPER PNG RSVG SECCOMP SOUND SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS
WEBP X11 XDBE XIM XINPUT2 XPM GTK3 ZLIB

-- 
Best reqards,
Andrey Petrov.





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

end of thread, other threads:[~2023-06-29  4:58 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-06-28 20:36 bug#64339: 29.0.50; incorrect org-mode dynamic blocks docs pva-outdoor
2023-06-29  4:58 ` Eli Zaretskii

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.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).