all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Juri Linkov <juri@jurta.org>
To: emacs-devel@gnu.org
Subject: Re: mailcap viewers in dired; gnus-dired.el, mailcap.el
Date: Thu, 11 Oct 2007 02:43:23 +0300	[thread overview]
Message-ID: <877iluv99o.fsf@jurta.org> (raw)
In-Reply-To: <v9tzoyzmxf.fsf@marauder.physik.uni-ulm.de> (Reiner Steib's message of "Wed\, 10 Oct 2007 23\:20\:44 +0200")

> In Emacs 22 (branch), ...
> emacs22 -Q -l mailcap -l gnus-dired -f dired -f turn-on-gnus-dired-mode
> ... loads more than 50 gnusy packages...
>
> ELISP> (length '(gnus-dired gnus-msg gnus-art mm-uu mml2015 pgg
>   pgg-parse pgg-def mm-view gnus-sum nnoo gnus-group gnus-undo nnmail
>   mail-source format-spec gnus-start gnus-spec gnus-int gnus-range
>   gnus-win message rfc822 mml mml-sec mml-smime smime dig mm-decode
>   mm-bodies mm-encode mailabbrev gmm-utils mailheader canlock sha1
>   hex-util gnus nnheader gnus-util netrc mail-utils gnus-ems dired
>   regexp-opt mailcap mail-parse rfc2231 rfc2047 rfc2045 qp ietf-drums
>   mm-util mule-util time-date mail-prsvr))
> ==> 56
>
> With these changes, only mailcap and gnus-dired are loaded.

Most of these packages get loaded only for the function `gnus-dired-attach'
in gnus-dired.el which is unrelated to running programs using the mailcap
mechanism.  When I manually eval `gnus-dired-find-file-mailcap' without
loading gnus-dired.el, then the list of loaded packages is much smaller,
maybe only the necessary packages get loaded.

>> Thanks.  Do you see any problems with this?
>
> I did only very limited testing.  I tested that
> `gnus-dired-find-file-mailcap' still works without loading unnecessary
> gnusy packages.  See the preliminary patches (against Gnus trunk)
> below.

I think the goal is not to fix gnus-dired.el to not load unnecessary
packages when only one function is needed from this file, because this
file is already ad-hoc and contains unrelated commands.  I think we should
only look at this file as an example of using the mailcap mechanism and
create a more general commands not in the gnus directory.

> Not a problem, but a TODO: `mailcap-mime-data' should be splitted.
> IMHO, it should be composed of...
>
> (a) entries from a customizable variable
>
> (b) the data from MAILCAPS (`mailcap-parse-mailcaps')
>
> (c) Emacs-wide fallback entries for external viewers (e.g. for
>     Windows), cf. `mailcap-poor-system-types'.
>
> Of course, mailcap.el should prefer (a) over (b), and (b) over (c).

I agree.  This would be a good priority system.

>> gnus-dired.el has a function `gnus-dired-attach' that is Gnus-specific.
>
> I think it could work with any message composition package that
> supports using MML (Emacs MIME).  I don't know if any other exists
> beside (Gnus) Message mode.  But it's MML-specific, yes.

`gnus-dired-attach' already works well for attaching files to the Gnus
messages, so I see no reason to change gnus-dired.el.  What is more useful to
do is to see whether calling mailcap-related functions (not in gnus-dired.el)
will load too many packages.

>> So I think it would be better to leave gnus-dired.el alone, and implement
>> new commands in dired.el or dired-aux.el
>
> I don't use dired often, so I don't have a strong opinion how to
> integrate mailcap functionality there.

`gnus-dired-find-file-mailcap' has a serious deficiency: it always starts
the program that happens to be the first in the list of equal mailcap
alternatives without allowing the user to select the preferable program
and possibly edit its command line.

> I think the other functions `gnus-dired-attach' and `gnus-dired-print'
> could be useful as well (cf. (info "(gnus)Other modes")).  But they
> surely need to be modified for if no other Gnus features should be
> loaded.

`P' (`dired-do-print') could provide a list of available printing commands
from the mailcap file.

>> (and maybe take into account the command guessing behaviour of ! in
>> dired-x.el).
>
> `!' (`dired-do-shell-command') is not exactly what
> `gnus-dired-find-file-mailcap' does.  In mailcap.el you can also
> specify Emacs-internal handling, IIRC.

This is an interesting problem.  It seems that Emacs-internal handling in
mailcap-mime-data mostly duplicates auto-mode-alist, isn't it?

-- 
Juri Linkov
http://www.jurta.org/emacs/

  reply	other threads:[~2007-10-10 23:43 UTC|newest]

Thread overview: 98+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-02  9:15 Please install: Some improvements to doc-view.el Tassilo Horn
2007-10-02 13:04 ` Davis Herring
2007-10-02 14:42   ` Tassilo Horn
2007-10-02 16:49   ` Tassilo Horn
2007-10-02 17:33     ` Andreas Schwab
2007-10-02 18:19       ` Tassilo Horn
2007-10-03 18:37     ` Richard Stallman
2007-10-03 23:29       ` Michaël Cadilhac
2007-10-04  7:53       ` Tassilo Horn
2007-10-05 16:13         ` Richard Stallman
2007-10-05 16:43           ` Tassilo Horn
2007-10-06 14:16             ` Tassilo Horn
2007-10-06 23:54               ` Juri Linkov
2007-10-08 15:26                 ` Sascha Wilde
2007-10-08 15:51                   ` Tassilo Horn
2007-10-08 19:34                     ` Juri Linkov
2007-10-09  9:02                       ` Tassilo Horn
2007-10-09 21:55                         ` Juri Linkov
2007-10-11  1:28                           ` Doc-view as default viewer for pdf, ps and dvi files (was: Please install: Some improvements to doc-view.el) Tassilo Horn
2007-10-12  2:46                             ` Richard Stallman
2007-10-12 13:09                               ` Doc-view as default viewer for pdf, ps and dvi files Tassilo Horn
2007-10-13  0:18                                 ` Richard Stallman
2007-10-13  8:25                                   ` Tassilo Horn
2007-10-13 19:48                                     ` Richard Stallman
2007-10-17 23:34                             ` Juri Linkov
2007-10-18  6:47                               ` Tassilo Horn
2007-10-18  8:28                               ` Tassilo Horn
2007-10-07 13:10               ` Please install: Some improvements to doc-view.el Richard Stallman
2007-10-08 19:42                 ` Juri Linkov
2007-10-09 20:03                   ` Richard Stallman
2007-10-09 21:30                     ` Tassilo Horn
2007-10-15 18:31                       ` Richard Stallman
2007-10-15 20:58                         ` Tassilo Horn
2007-10-17 23:49                           ` Scrolling in doc-view Chong Yidong
2007-10-18  6:27                             ` Tassilo Horn
2007-10-18  8:29                             ` Tassilo Horn
2007-10-09 21:54                     ` Please install: Some improvements to doc-view.el Juri Linkov
2007-10-09 22:17                       ` mailcap viewers in dired; gnus-dired.el, mailcap.el (was: Please install: Some improvements to doc-view.el) Reiner Steib
2007-10-09 22:47                         ` Juri Linkov
2007-10-10 21:20                           ` mailcap viewers in dired; gnus-dired.el, mailcap.el Reiner Steib
2007-10-10 23:43                             ` Juri Linkov [this message]
2007-10-15  1:37                             ` Richard Stallman
2007-10-15 23:46                               ` Juri Linkov
2007-10-16  6:49                                 ` Tassilo Horn
2007-10-18 17:48                               ` Lars Magne Ingebrigtsen
2007-10-19  5:40                                 ` Richard Stallman
2007-10-15  1:37                       ` Please install: Some improvements to doc-view.el Richard Stallman
2007-10-15 23:45                         ` Juri Linkov
2007-10-16 19:09                           ` Richard Stallman
2007-10-16 19:26                             ` Leo
2007-10-17  5:03                               ` Richard Stallman
2007-10-17 10:15                                 ` Leo
2007-10-17 20:49                                   ` Richard Stallman
2007-10-17 21:12                                     ` Leo
2007-10-19  5:40                                       ` Richard Stallman
2007-10-17 22:04                                     ` doc-view and mailcap (was: Please install: Some improvements to doc-view.el) Reiner Steib
2007-10-17 23:35                                       ` doc-view and mailcap Juri Linkov
2007-10-18  7:31                                         ` Reiner Steib
2007-11-25 22:53                                           ` Reiner Steib
2007-11-26 11:16                                             ` Tassilo Horn
2007-12-01 18:26                                               ` Tassilo Horn
2007-12-01 19:50                                                 ` Reiner Steib
2007-12-03  0:33                                                   ` Juri Linkov
2007-12-03  7:41                                                     ` Reiner Steib
2007-12-03  8:18                                                       ` Tassilo Horn
2007-12-03 18:42                                                         ` Richard Stallman
2007-12-03 22:16                                                           ` Tassilo Horn
2007-12-03 22:55                                                       ` Juri Linkov
2007-12-04  9:20                                                         ` Tassilo Horn
2007-12-04 18:22                                                           ` Reiner Steib
2007-12-04 22:45                                                             ` Juri Linkov
2007-12-05 10:08                                                               ` Tassilo Horn
2007-12-05 20:02                                                                 ` Reiner Steib
2007-12-05 22:45                                                                   ` Juri Linkov
2007-10-16 20:43                             ` doc-view and mailcap (was: Please install: Some improvements to doc-view.el) Reiner Steib
2007-10-17  1:16                               ` doc-view and mailcap Stefan Monnier
2007-10-17 14:10                                 ` Richard Stallman
2007-10-17 14:39                                   ` Stefan Monnier
2007-10-17 16:55                                     ` Reiner Steib
2007-10-17 23:36                                       ` Juri Linkov
2007-10-18  5:02                                     ` Richard Stallman
2007-10-17  5:03                               ` doc-view and mailcap (was: Please install: Some improvements to doc-view.el) Richard Stallman
2007-10-17 17:59                                 ` doc-view and mailcap Reiner Steib
2007-10-17 20:32                                   ` Tassilo Horn
2007-10-17 21:45                                     ` Reiner Steib
2007-10-18  4:19                                       ` Stefan Monnier
2007-10-18  7:33                                         ` Reiner Steib
2007-10-18  8:24                                           ` Tassilo Horn
2007-10-18  6:24                                       ` Tassilo Horn
2007-10-18 20:08                                     ` Richard Stallman
2007-10-18 20:30                                       ` Reiner Steib
2007-10-18 21:22                                         ` Tassilo Horn
2007-10-19  0:42                                           ` Juri Linkov
2007-10-19 17:42                                           ` Richard Stallman
2007-10-16 23:52                             ` Please install: Some improvements to doc-view.el Juri Linkov
2007-10-06 21:47             ` Stefan Monnier
2007-10-07 13:10               ` Richard Stallman
2007-10-07  0:30             ` Richard Stallman

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=877iluv99o.fsf@jurta.org \
    --to=juri@jurta.org \
    --cc=emacs-devel@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.