all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Jambunathan K <kjambunathan@gmail.com>
To: "Drew Adams" <drew.adams@oracle.com>
Cc: 13197@debbugs.gnu.org
Subject: bug#13197: 24.3.50; org-odt.el code that kills modified buffers
Date: Sun, 16 Dec 2012 10:07:29 +0530	[thread overview]
Message-ID: <87a9te629i.fsf@gmail.com> (raw)
In-Reply-To: <C9588B14DC424E78AFF493C991492266@us.oracle.com> (Drew Adams's message of "Sat, 15 Dec 2012 14:35:45 -0800")

"Drew Adams" <drew.adams@oracle.com> writes:

> I was grepping some source files to see how other code handles this kind
> of thing, and I came across this in org-odt.el (in
> `org-odt-cleanup-xml-buffers'):
>  
> (mapc (lambda (file)
>         (let ((buf (find-file-noselect
>                      (expand-file-name file org-odt-zip-dir) t)))
>           (when (buffer-name buf)
>             (set-buffer-modified-p nil)
>             (kill-buffer buf))))
>       xml-files)
>  
> I don't see how that can work properly, since `find-file-noselect' does
> not make the visited-file buffer current, and `set-buffer-modified-p'
> acts only on the current buffer.
>  
> Am I missing something here, or is that a bug?

It looks like a slip on my part.  In all other places in org-odt.el, I
do

    (with-current-buffer (find-file-noselect )

      )

When an error is thrown during the export process, the buffer will be in
modified but unsaved state.  I forcibly mark the buffer as modified
before killing it.

Let me put in a fix in Org repo.  Next merge will take care of this
issue.
-- 





  reply	other threads:[~2012-12-16  4:37 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-15 22:35 bug#13197: 24.3.50; org-odt.el code that kills modified buffers Drew Adams
2012-12-16  4:37 ` Jambunathan K [this message]
2012-12-16 23:15   ` Bastien
2012-12-20 15:07     ` Bastien

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=87a9te629i.fsf@gmail.com \
    --to=kjambunathan@gmail.com \
    --cc=13197@debbugs.gnu.org \
    --cc=drew.adams@oracle.com \
    /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.