From: Stefan Monnier <monnier@IRO.UMontreal.CA>
To: emacs-devel@gnu.org
Cc: Richard Stallman <rms@gnu.org>
Subject: Re: doc-view compilation warnings
Date: Tue, 23 Oct 2007 17:53:46 -0400 [thread overview]
Message-ID: <jwvprz5pl3t.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <871wblzjn3.fsf@baldur.tsdh.de> (Tassilo Horn's message of "Tue\, 23 Oct 2007 22\:00\:16 +0200")
>>>> > +(push '("\\.[eE]?[pP][sS]\\'" . doc-view-mode-maybe) auto-mode-alist)
>>>> > +(push '("\\.[Dd][Vv][Ii]\\'" . doc-view-mode-maybe) auto-mode-alist)
>>>> > +(push '("\\.[Pp][Dd][Ff]\\'" . doc-view-mode-maybe) auto-mode-alist)
>>>>
>>>> In general loading a file should not have side effects like this.
>>>> IMHO, it is not idea to do things this way...
>>
>>> So what would you suggest? A function `doc-view-initialize' that
>>> does this?
>>
>> You could put it directly into files.el.
> That would load doc-view unconditionally when a user opens a pdf/ps/dvi
> file. That's ok with me, but others might think different.
> But someone should decide: Is loading doc-view when opening ps/pdf/dvi
> files ok?
It doesn't look like a problem to me, as long as it doesn't show PS files
using doc-view by default.
Note that it may be simpler to setup auto-mode-alist to map *.ps to ps-mode
and dvi and pdf files to doc-view-mode and then change ps-mode to activate
doc-view-minor-mode explicitly and unconditionally. That will save you from
defining doc-view-mode-maybe.
I'd also be very happy to get rid of the doc-view-clean-auto-mode-alist
monstrosity by just saying "if you're not using doc-view-minor-mode, then
toggling off doc-view puts you in fundamental-mode", or if you want to be
fancier, then save the previous major-mode when entering doc-view-mode (when
possible) and reuse that value when exiting it (like picture-mode does).
Stefan
next prev parent reply other threads:[~2007-10-23 21:53 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-21 2:38 doc-view compilation warnings Miles Bader
2007-10-21 8:55 ` Tassilo Horn
2007-10-22 9:00 ` Richard Stallman
2007-10-23 13:32 ` Tassilo Horn
2007-10-23 14:30 ` Dan Nicolaescu
2007-10-23 15:54 ` Tassilo Horn
2007-10-23 16:07 ` Dan Nicolaescu
2007-10-23 17:50 ` Tassilo Horn
2007-10-23 18:35 ` Dan Nicolaescu
2007-10-23 18:41 ` Tassilo Horn
2007-10-23 19:00 ` Stefan Monnier
2007-10-23 20:00 ` Tassilo Horn
2007-10-23 21:53 ` Stefan Monnier [this message]
2007-10-24 7:59 ` Tassilo Horn
2007-10-24 11:40 ` Tassilo Horn
2007-10-24 15:24 ` Tassilo Horn
2007-10-26 10:52 ` doc-view.patch waiting for installation (was: doc-view compilation warnings) Tassilo Horn
2007-10-29 1:52 ` doc-view.patch waiting for installation Glenn Morris
2007-10-29 9:36 ` Tassilo Horn
2007-10-30 6:33 ` Glenn Morris
2007-10-30 18:07 ` Case folding for auto-mode-alist (was: doc-view.patch waiting for installation) Reiner Steib
2007-10-30 19:00 ` Case folding for auto-mode-alist Stefan Monnier
2007-10-31 7:47 ` Richard Stallman
2007-10-31 15:19 ` Stefan Monnier
2007-10-31 15:30 ` David Kastrup
2007-10-31 16:17 ` Stefan Monnier
2007-10-24 13:55 ` doc-view compilation warnings Stefan Monnier
2007-10-24 14:32 ` Tassilo Horn
2007-10-24 8:33 ` Richard Stallman
2007-10-24 8:32 ` Richard Stallman
2007-10-24 8:32 ` Richard Stallman
2007-10-24 8:32 ` Richard Stallman
2007-10-24 2:49 ` Richard Stallman
2007-10-24 2:49 ` Richard Stallman
2007-10-24 8:11 ` Tassilo Horn
2007-10-24 8:19 ` David Kastrup
2007-10-25 2:10 ` Richard Stallman
2007-10-25 8:09 ` Tassilo Horn
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=jwvprz5pl3t.fsf-monnier+emacs@gnu.org \
--to=monnier@iro.umontreal.ca \
--cc=emacs-devel@gnu.org \
--cc=rms@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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).