From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#64339: 29.0.50; incorrect org-mode dynamic blocks docs Date: Thu, 29 Jun 2023 07:58:50 +0300 Message-ID: <83v8f6uanp.fsf@gnu.org> References: <87leg3pbnz.fsf@yandex.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="897"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 64339@debbugs.gnu.org To: pva-outdoor@yandex.ru Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Jun 29 06:59:19 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qEjkU-000AVo-DW for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 29 Jun 2023 06:59:18 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qEjkG-00076l-Pg; Thu, 29 Jun 2023 00:59:04 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qEjkE-00076V-8e for bug-gnu-emacs@gnu.org; Thu, 29 Jun 2023 00:59:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qEjkD-000328-VT for bug-gnu-emacs@gnu.org; Thu, 29 Jun 2023 00:59:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qEjkD-0002zf-M2 for bug-gnu-emacs@gnu.org; Thu, 29 Jun 2023 00:59:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 29 Jun 2023 04:59:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 64339 X-GNU-PR-Package: emacs Original-Received: via spool by 64339-submit@debbugs.gnu.org id=B64339.168801471411469 (code B ref 64339); Thu, 29 Jun 2023 04:59:01 +0000 Original-Received: (at 64339) by debbugs.gnu.org; 29 Jun 2023 04:58:34 +0000 Original-Received: from localhost ([127.0.0.1]:52020 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qEjjl-0002yv-Ri for submit@debbugs.gnu.org; Thu, 29 Jun 2023 00:58:34 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:39390) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qEjjh-0002ye-Ny for 64339@debbugs.gnu.org; Thu, 29 Jun 2023 00:58:31 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qEjjc-0002sq-8t; Thu, 29 Jun 2023 00:58:24 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=hv4ZcmeEbO+wMpvXHIQvdudFDTuHPlVWsKVZm7bT3vw=; b=O0gku/qKa6XqL6h5ZTz6 5wesyMJKm8k7gJKuMKjQhSdCkz8mFSDtpz8NnnmO0eXRuczphXHysNHTmwNR6CktFktaRgWmqo3E4 y956bOh63IxPK+Y99FzVxxkrJIUv8qLQ4yE90/VmEiB+kFKSQx6H1EfNMkR6/5eCMscGWEep1vyiL 559UOrJ2N1PXXKRMie98ls3qWac4FCKcyLvddg5HwjsyfzTmb+DLk1HzL/WXTYbsXdiJ6kltTXhHb 5rUOw1gfiaXPJvVz3YFz8VlvAfkL5bb2WQ9fxxcfwQ0RG7/cwOXEWUMrZ4XQZKQPwXEW1RMZ++/h7 fqZuF961zeCPlg==; Original-Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qEjjb-0007jS-CG; Thu, 29 Jun 2023 00:58:23 -0400 In-Reply-To: <87leg3pbnz.fsf@yandex.ru> (pva-outdoor@yandex.ru) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:264252 Archived-At: > From: pva-outdoor@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.