all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Vasilij Schneidermann <v.schneidermann@gmail.com>
To: npostavs@users.sourceforge.net
Cc: 25656@debbugs.gnu.org
Subject: bug#25656: [PATCH] 25.1; remember-notes-mode makes every temporary buffer created from it unkillable
Date: Sat, 25 Feb 2017 13:12:49 +0100	[thread overview]
Message-ID: <20170225121249.GB669@odonien.localdomain> (raw)
In-Reply-To: <87innzf4tp.fsf@users.sourceforge.net>

OK, I think I've figured out what's going on.  I'm calling a command in
a remember-notes buffer that happens to hold an org file.  It's set up
to be unkillable by having a locally added `kill-buffer-query-functions`
hook that returns nil.  Now, my command calls a number of things
including `org-table-export` which does a zillion of things, eventually
cloning the buffer it's working on with the
`org-export-with-buffer-copy` macro.  This macro is so good at cloning
buffers it preserves its buffer-local variables, including
`kill-buffer-query-functions`.  Although it tries killing the buffer
afterwards, it fails doing so because the hook forbids it.

The result of this avalanche of failures is that for every table cell,
an unkillable buffer is created.  The lesson from this is to be careful
with using Org's APIs, while some of them look reusable, most aren't.
While I could patch `remember-notes--kill-buffer-query` to work around
this problem, I'll just customize `remember-notes-bury-on-kill` and
raise an issue with Org's bug tracker.  Thanks for responding to this,
Noam!





  parent reply	other threads:[~2017-02-25 12:12 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-08 23:12 bug#25656: 25.1; remember-notes-mode makes every temporary buffer created from it unkillable Vasilij Schneidermann
2017-02-24  7:40 ` bug#25656: [PATCH] " Vasilij Schneidermann
2017-02-25  1:16   ` npostavs
2017-02-25  9:47     ` Vasilij Schneidermann
2017-02-25 12:12     ` Vasilij Schneidermann [this message]
2017-02-25 12:15 ` Vasilij Schneidermann

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

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

  git send-email \
    --in-reply-to=20170225121249.GB669@odonien.localdomain \
    --to=v.schneidermann@gmail.com \
    --cc=25656@debbugs.gnu.org \
    --cc=npostavs@users.sourceforge.net \
    /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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.