From: Tassilo Horn <tassilo@member.fsf.org>
To: Alan Mackenzie <acm@muc.de>
Cc: emacs-pretest-bug@gnu.org, 2058@emacsbugs.donarmstrong.com
Subject: bug#2058: 23.0.60; bewildering behavior when visit new file throw.pdf
Date: Tue, 27 Jan 2009 15:46:59 +0100 [thread overview]
Message-ID: <871vuoajrw.fsf@thinkpad.tsdh.de> (raw)
In-Reply-To: <20090127144220.GA6134@muc.de> (Alan Mackenzie's message of "Tue, 27 Jan 2009 14:42:20 +0000")
Alan Mackenzie <acm@muc.de> writes:
Hi Alan,
>> But how should I know that. The best I can do is to handle
>> non-existing and empty files.
>
> Does an empty/non-existent file have any meaning in this mode?
No, they'll break it as Drew pointed out.
> Is doc-view-mode an editing mode as well as a viewing mode?
Only viewing, although you can toggle between viewing in doc-view-mode
and editing (fundamental-mode or ps-mode with doc-view-minor-mode) with
C-c C-c.
>> > What on earth is doc-view-mode? Hmm. C-h f doc-view-mode <CR>. ;-(
>
>> Emacs 23.
>
> Yes, I know. :-) I was looking at the doc string in doc-view.el from
> 2009-01-05. Here's the output from that C-h f:
>
> doc-view-mode is an interactive autoloaded Lisp function in
> `doc-view.el'.
>
> (doc-view-mode)
>
> Major mode in DocView buffers.
> You can use
> Uses keymap "doc-view-mode-map", which is not currently defined.
> M-x doc-view-toggle-display to
> toggle between displaying the document or editing it as text.
>
> Uses keymap "doc-view-mode-map", which is not currently defined.
>
> It doesn't work well before the `doc-view-mode-map' keymap is loaded.
> But mainly, it doesn't say at all what doc-view-mode is for. Could you
> maybe put something about the mode's purpose into the doc string?
> Possibly this comment from doc-view.el:
>
> ;; DocView is a document viewer for Emacs. It converts PDF, PS and DVI files
> ;; to a set of PNG files, one PNG for each page, and displays the PNG images
> ;; inside an Emacs buffer. This buffer uses `doc-view-mode' which provides
> ;; convenient key bindings for browsing the document.
>
> , or more succinctly:
>
> Doc View Mode is an Emacs document viewer. It displays PDF, PS and
> DVI files (as PNG images) in Emacs buffers.
Yes, I'll fix that. The current doc-string is really awful. ;-)
>> >> 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?
>
> That's more or less what the .gzip mode (can't remember it's exact name)
> does - it displays the raw unintelligible file.
Ok, I will make it so.
>> > "... 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...
>
> Er, "... to switch to ps-mode" and "... to switch to fundamental mode"
> are shorter. Surely you can determine the exact prompt at run time?
Thanks for your confidence in me. But yes, it can be done easily. ;-)
> Bis später!
Jawollja!
next prev parent reply other threads:[~2009-01-27 14:46 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <mailman.5816.1232925816.26697.bug-gnu-emacs@gnu.org>
2009-01-27 9:55 ` bug#2058: 23.0.60; bewildering behavior when visit new file throw.pdf Tassilo Horn
2009-01-27 12:02 ` Alan Mackenzie
2009-01-27 12:43 ` Tassilo Horn
2009-01-27 14:42 ` Alan Mackenzie
2009-01-27 14:46 ` Tassilo Horn [this message]
2009-01-27 16:03 ` Tassilo Horn
2009-01-27 16:20 ` Drew Adams
2009-01-28 8:48 ` Kevin Rodgers
[not found] ` <mailman.6064.1233133417.26697.bug-gnu-emacs@gnu.org>
2009-01-28 20:28 ` Tassilo Horn
2009-01-27 15:44 ` Drew Adams
2009-01-27 22:58 ` Richard M Stallman
2009-01-28 7:45 ` Tassilo Horn
2009-01-25 23:09 Drew Adams
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=871vuoajrw.fsf@thinkpad.tsdh.de \
--to=tassilo@member.fsf.org \
--cc=2058@emacsbugs.donarmstrong.com \
--cc=acm@muc.de \
--cc=emacs-pretest-bug@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 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.