all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Lars Hansen <larsh@math.ku.dk>
Cc: emacs-devel@gnu.org
Subject: Re: Moving handlers out of desktop.el
Date: Tue, 13 Apr 2004 15:01:49 +0200	[thread overview]
Message-ID: <407BE4BD.4010308@math.ku.dk> (raw)
In-Reply-To: <87zn9ggpx4.fsf@mail.jurta.org>

Juri Linkov wrote:

>I think moving the desktop functions AS IS to respective packages is
>not good, because these packages shouldn't depend on the desktop package.
>  
>
IMHO one module ought not "hack into" another module because such hacks 
are difficult to understand and may be broken unintentionally. OTOH it 
is OK and unavoidable that a module use "general services". I know very 
well that terms like "module", "hack into" and "general service" may be 
understood differently by different developers.
In my view, desktop "hacks into" four other modules, dired, rmail, mh 
and info. And I view desktop as a "general service".

Consider the following scenario. Actually, it is from real life (the 
user is me):
A user have made a module foo implementing foo-mode. He wants desktop 
saving for foo buffers but they do not visit a file. Thus he has to 
write a function `desktop-buffer-foo' and add it to 
`desktop-buffer-handlers' in his .emacs file. He wants the foo module to 
play together with Emacs out-of-the-box, so he cannot put 
`desktop-buffer-foo' into desktop.el. Instead he puts it into foo.el, 
which is natural since it is a foo related function. Now desktop is 
independent of foo, but foo depends on desktop since it uses desktop 
services. The only problem is that foo has to be loaded from .emacs to 
make `desktop-buffer-foo' available to the desktop module.

My question is: Why should `desktop-buffer-foo' be placed _outside_ 
desktop.el but the handlers for dired, rmail, mh and info _inside_ 
desktop.el?

>Making general functions (with an autoload cookie) from them would be
>good.  Such functions could have general arguments and be useful
>for other purposes as well.
>  
>
I don't think I understand what kind of functions you mean.

>This could be done independently from the first item.
>  
>
Yes, but I see no point in doing it.

  parent reply	other threads:[~2004-04-13 13:01 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-04-06 11:47 Moving handlers out of desktop.el Lars Hansen
2004-04-08  9:43 ` Juri Linkov
2004-04-10 21:31   ` Lars Hansen
2004-04-10 22:32     ` Juri Linkov
2004-04-11  8:04       ` Lars Hansen
2004-04-11  8:16         ` Lars Hansen
2004-04-13 11:48 ` Juri Linkov
2004-04-13 12:51   ` Stefan Monnier
2004-04-13 13:01   ` Lars Hansen [this message]
2004-04-13 15:12     ` Juri Linkov
2004-04-13 20:46       ` Juri Linkov
2004-04-21 21:28         ` Lars Hansen
2004-04-13 13:05   ` David Kastrup
2004-04-13 15:15     ` Juri Linkov

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=407BE4BD.4010308@math.ku.dk \
    --to=larsh@math.ku.dk \
    --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.