emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: "Jakob Schöttl" <jschoett@gmail.com>
To: emacs-orgmode@gnu.org
Subject: [Bug] org-update-dblock randomly broken for more than 10 columns and larger files
Date: Tue, 1 Aug 2023 11:41:25 +0200	[thread overview]
Message-ID: <755dc4e2-0ac7-bf27-c716-e83a3295c076@gmail.com> (raw)

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


I have an org file, about 3k lines with nested headings and property 
drawers.

org-update-dblock on this line inserts a table but only yields a subset 
of the actual headings:

#+BEGIN: columnview :hlines 1 :id bc3cd73e-bb35-46ac-8ab3-3e8bc33be9d1 
:maxlevel 3 :format "%50ITEM(Box) %TODO %TAGS %batch %hwversion 
%ausgeliefert %reinigungsmittel %evaporator_sensor_defekt 
%neuer_innenlüfter %med_netzteil %os"

Whereas this line works:

#+BEGIN: columnview :hlines 1 :id bc3cd73e-bb35-46ac-8ab3-3e8bc33be9d1 
:maxlevel 3 :format "%50ITEM(Box) %TODO %TAGS %batch %hwversion 
%ausgeliefert %reinigungsmittel %evaporator_sensor_defekt 
%neuer_innenlüfter %med_netzteil"

The only difference is that the first version includes 11 (or more) 
fields and the second version only includes 10 fields.

Also, when I repeat org-update-dblock, it yields different results every 
other time and the table is slowly growing, see attached screenshots. I 
also noticed that org-update-dblock seems to randomly add trailing 
whitespaces to headings or lines like ":END:"

The structure of the org file is attached. I tried for two hours to 
provide a minimal example org file but – like randomly – when I shorten 
the file radically or remove fields from the colmunview it works. I 
can't figure out what exactly makes org mode struggling.

Even if I delete all content in the file where lines do not start with 
regex /^\*/ or /^:[a-zA-Z]/, the inserted table is incomplete.

Can someone help to debug this further?

- Jakob


[-- Attachment #2: structure.org --]
[-- Type: text/org, Size: 527 bytes --]

* Table

https://orgmode.org/manual/Capturing-column-view.html

#+BEGIN: columnview :hlines 1 :id bc3cd73e-bb35-46ac-8ab3-3e8bc33be9d1 :maxlevel 3 :format "%50ITEM(Box) %TODO %TAGS %batch %hwversion %ausgeliefert %reinigungsmittel %evaporator_sensor_defekt %neuer_innenlüfter %med_netzteil %kein_scd30_adapter %os %sd_karte_getauscht"
#+END:

* Customers and products
:PROPERTIES:
:ID: bc3cd73e-bb35-46ac-8ab3-3e8bc33be9d1
:END:
**  <customer>
*** <product>
:PROPERTIES:
:prop1: val
[...]
:END:
**** <some sub headings>
[...]

[-- Attachment #3: 1.png --]
[-- Type: image/png, Size: 168387 bytes --]

[-- Attachment #4: 2.png --]
[-- Type: image/png, Size: 240839 bytes --]

[-- Attachment #5: 4.png --]
[-- Type: image/png, Size: 372241 bytes --]

[-- Attachment #6: 3.png --]
[-- Type: image/png, Size: 351619 bytes --]

             reply	other threads:[~2023-08-01  9:43 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-01  9:41 Jakob Schöttl [this message]
2023-08-01 11:27 ` [Bug] org-update-dblock randomly broken for more than 10 columns and larger files Ihor Radchenko
2023-08-07  7:56   ` Jakob Schöttl
2023-08-19 18:18   ` Jakob Schöttl
2023-08-20  6:56     ` Ihor Radchenko
2023-08-20  8:29       ` Jakob Schöttl
2023-08-20  8:37       ` Jakob Schöttl
2023-08-20  8:57         ` Ihor Radchenko
2023-08-21  7:50           ` Jakob Schöttl

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=755dc4e2-0ac7-bf27-c716-e83a3295c076@gmail.com \
    --to=jschoett@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).