all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stephen Berman <stephen.berman@gmx.net>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: emacs-devel@gnu.org
Subject: Re: Question about handling file deletion
Date: Fri, 28 Jun 2013 10:36:56 +0200	[thread overview]
Message-ID: <87d2r6zl5j.fsf@rosalinde.fritz.box> (raw)
In-Reply-To: jwv38s48h5u.fsf-monnier+emacs@gnu.org

On Wed, 26 Jun 2013 21:42:19 -0400 Stefan Monnier <monnier@iro.umontreal.ca> wrote:

>> But while the user presumably knows the file is missing, Todo mode
>> doesn't, and that can lead to errors, especially if a live buffer is
>> still holding the content of the deleted file and the user calls
>> a Todo command to manipulate the buffer.
>
> What kind of errors?

E.g. bug#14688.  If you have debug-on-error enabled, you get the two
backtraces Leo reported (wrong-type-argument due to (find-file-noselect
nil), followed by file-error "Removing old name" "no such file or
directory" due to calling delete-file on the file that was already
deleted).  But if debug-on-error is disabled, you just get "Removing old
name: no such file or directory, /data/steve/.emacs.d/todo/Todo.todo" in
the echo area and above it a buffer in Todo mode whose name is the todo
file you just created.  If you try to add a category, you get
"find-file-noselect: Wrong type argument: stringp, nil".  If you
mistakenly think there is a category and try to navigate with `f' or
`b', you get "todo-forward-category: Arithmetic error"; if you try to
insert an item with e.g. `i i' you get prompted but after typing the
item text and hitting RET, you get "todo-basic-insert-item: Args out of
range: 1, 2".  Similar errors and other odd behavior can occur if you
leave the Todo mode buffer live after deleting the file, and can arise
later, after adding more todo files and using other commands.  So I
guess I have to bite the bullet and make Todo mode catch these errors.

Steve Berman



  reply	other threads:[~2013-06-28  8:36 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-26 12:22 Question about handling file deletion Stephen Berman
2013-06-26 14:33 ` Stefan Monnier
2013-06-26 22:36   ` Stephen Berman
2013-06-27  1:42     ` Stefan Monnier
2013-06-28  8:36       ` Stephen Berman [this message]
2013-06-28 22:40         ` Stefan Monnier
2013-06-29 13:37 ` Timur Aydin
2013-06-29 22:44   ` Stephen Berman

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=87d2r6zl5j.fsf@rosalinde.fritz.box \
    --to=stephen.berman@gmx.net \
    --cc=emacs-devel@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    /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.