help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: require basic stuff from specific packages


From: Emanuel Berg
Subject: Re: require basic stuff from specific packages
Date: Tue, 05 Jul 2016 02:44:57 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux)

Lars Magne Ingebrigtsen <lmi@gnus.org> writes:

>> (erc-trim-string string) ; here
>
> Use `string-trim' instead.
>
> `erc-trim-string' demonstrates why having
> compat functions strewn around various packages
> is unhelpful for users trying to navigate the
> Emacs code base.

Yes, `string-trim' in in subr-x does it!

How are you supposed to find it tho?

Now I asked here. It isn't a bad way. But if we
exclude that as well as greping the web, I mean.

Because what I did was using `apropos'.
The reason it found the ERC stuff and not the
subr-x is because I had ERC loaded as my
IRC client, and subr-x wasn't even loaded!

Here is another example:

    (defun buffer-names ()
      "Get a list of all `buffer-name's."
      (mapcar #'buffer-name (buffer-list)) )

If I write two or more packs that both/all use
it, where do I put it? I don't want to put the
same thing in every one. But I don't want to
require it either because the packs are
one-file and I don't want to have the user have
to install yet another package to use them.
Especially since it would amount to countless
such packages... Perhaps I should put all into
one helper-pack and have just one (require
'mannys-utils) in all the rest!

-- 
underground experts united .... http://user.it.uu.se/~embe8573
Emacs Gnus Blogomatic ......... http://user.it.uu.se/~embe8573/blogomatic
                   - so far: 56 Blogomatic articles -                   


reply via email to

[Prev in Thread] Current Thread [Next in Thread]