emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Skip Collins <skip.collins@gmail.com>
To: emacs-org list <emacs-orgmode@gnu.org>
Subject: buffer displays incorrectly after capture
Date: Fri, 1 Apr 2022 15:46:43 -0400	[thread overview]
Message-ID: <CABUh-74xzKdCkpv5MutcaAjiMQd4Kx9ztWBdC-+BL3C0niSCWA@mail.gmail.com> (raw)

I think there is a bug in updating an org buffer window after capture
appends an entry. When the previously final entry, terminated with a
newline, is folded, the newly captured entry that is appended does not
show correctly in the buffer. Here is an example capture template:
("a" "Actions" entry
      (file "~/Documents/org/capture.org")
      "* TODO %^{action} :action:" :immediate-finish t)

There is a single existing entry in capture.org:
* TODO foo :action:
some text[newline]

I fold the entry so that it appears in the buffer like this:
* TODO foo :action:...

Then from any buffer I type 'C-c c' and choose 'a' from the capture
template dispatcher. I type 'bar<enter>'. I would expect a new
headline to be visible at the end of capture.org. Instead, nothing
changes in the buffer. When I expand foo, it looks like this
* TODO foo :action:
some text...

No amount of tabbing causes the bar entry to display. The ellipsis at
the end of 'some text...' only gets expanded when I <backtab> to cycle
global visibility, resulting in a correct display:
* TODO foo :action:
some text
* TODO bar :action:

Another manifestation of the problem shows up when using
auto-revert-mode. Starting with the single headline in a folded state
as above, when I execute the following command in a shell,
echo "* TODO bar :action:" >>capture.org
then the capture.org buffer looks like this:
* TODO foo :action:...* TODO bar :action:

TAB unfolding the first headline shows up like this:
* TODO foo :action:
some text...* TODO bar :action:

GNU Emacs 27.2 (build 1, aarch64-apple-darwin21.3.0, Carbon Version
165 AppKit 2113.3) of 2022-02-24
Org mode version 9.5.2 (release_9.5.2-423-g6d73cd)


             reply	other threads:[~2022-04-01 19:56 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-01 19:46 Skip Collins [this message]
2022-04-04 15:25 ` buffer displays incorrectly after capture Skip Collins
2022-04-07 23:26   ` [BUG] " Skip Collins
2022-04-26 22:52     ` [BUG] buffer folds incorrectly Skip Collins
2022-04-27  8:49     ` [BUG] buffer displays incorrectly after capture Ihor Radchenko
2022-04-27 15:58       ` Skip Collins
2022-04-27 23:37         ` Ihor Radchenko

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=CABUh-74xzKdCkpv5MutcaAjiMQd4Kx9ztWBdC-+BL3C0niSCWA@mail.gmail.com \
    --to=skip.collins@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).