GNU bug report logs - #2058
23.0.60; bewildering behavior when visit new file throw.pdf

Previous Next

Package: emacs;

Reported by: "Drew Adams" <drew.adams <at> oracle.com>

Date: Sun, 25 Jan 2009 23:15:03 UTC

Severity: normal

Done: Tassilo Horn <tassilo <at> member.fsf.org>

Bug is archived. No further changes may be made.

Full log


Message #30 received at submit <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Tassilo Horn <tassilo <at> member.fsf.org>
To: Alan Mackenzie <acm <at> muc.de>
Cc: 2058 <at> debbugs.gnu.org, Drew Adams <drew.adams <at> oracle.com>,
        emacs-pretest-bug <at> gnu.org
Subject: Re: bug#2058: 23.0.60; bewildering behavior when visit new file throw.pdf
Date: Tue, 27 Jan 2009 13:43:46 +0100
Alan Mackenzie <acm <at> muc.de> writes:

Hi Alan,

>> > I did C-x C-f throw.pdf, with no existing file throw.pdf. The
>> > ensuing messages and interaction were bewildering.
>
>> Is that really a use-case?
>
> No, it's an error case.  The user wanted to visit throw.ldf, which is
> a text based document format used only in his own company.  But he
> mistyped it.  He also knows nothing about png images, and really
> doesn't want to have to learn.

But how should I know that.  The best I can do is to handle non-existing
and empty files.

>> > But the new, empty file throw.pdf appeared to be visited with no
>> > problem. I tried to type into it. That threw me back to the previous
>> > buffer I had been in (Dired), and crazy error msgs were displayed.
>
>> The buffer was in doc-view-mode which has its own keymap, and most
>> probably you've hit k or q, which kills/buries the buffer.
>
> What on earth is doc-view-mode?  Hmm.  C-h f doc-view-mode <CR>.  ;-(

Emacs 23.

>> Sure.  So what's your advice how to handle this situation?  Check if
>> the file is existent (and non-empty) and if not, print a message and
>> fallback to fundamental mode?
>
> Whatever is done, don't force the poor bewildered user to make a
> decision.  Perform whatever error handling is appropriate and display
> a message, and let her get out without further ado.

The message is no problem, but what to do with the open request.  Open
the (presumably) mistyped file in fundamental-mode?

> "... to switch to an editing mode " is particularly bad.  It should be
> less vague, stating the mode (text mode?).

Well, it's ps-mode for PostScript files and fundamental-mode for PDF and
DVI files.  Making that explicit would enlarge the message even more...

> "... to open a buffer showing the doc as text" would be better as "to
> show the doc as text".

Will be fixed as soon as I come to it.

Bye,
Tassilo




This bug report was last modified 16 years and 167 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.