From: Barry Margolin <barmar@alum.mit.edu>
To: help-gnu-emacs@gnu.org
Subject: Re: buffer variable values
Date: Sat, 25 Aug 2012 14:08:29 -0400 [thread overview]
Message-ID: <barmar-033E08.14082925082012@news.eternal-september.org> (raw)
In-Reply-To: mailman.7566.1345906894.855.help-gnu-emacs@gnu.org
In article <mailman.7566.1345906894.855.help-gnu-emacs@gnu.org>,
"Drew Adams" <drew.adams@oracle.com> wrote:
> > Was insert-buffer ever meant to be called non-interactively,
> > though? The newer insert-buffer has this in its documentation:
> >
> > "This function is meant for the user to run interactively.
> > Don't call it from programs: use `insert-buffer-substring' instead!"
>
> Barry M. gave the short answer:
>
> "Just because it's not *meant* to be used from programs
> doesn't mean it shouldn't work reasonably when it is."
>
> "Shouldn't" could be "couldn't" here. It was a design choice to make it
> "work
> reasonably" for a buffer-name argument, for convenience.
>
> That short answer is repeated as #2 here:
>
> 1. "Meant to be" is pretty loose in Lisp. What you see in a doc string does
> not
> necessarily convey all possibilities and situations. It is intended as
> general
> guidance, to help you. This is not the Napoleon code.
>
> You will sometimes see imperative directives such as "Don't...", like here.
> Take them as if they were polite guidance/advice, in the spirit of "You
> probably
> don't want to..." They are generally just trying to remind you that this is
> something that you probably do not want to do here.
Another issue is backward compatibility. Perhaps at one time the
function was commonly used from programs, but when the preferred
alternative was added they put that warning into the documentation. But
the function still has to work properly for all the old code that was
calling it before this.
--
Barry Margolin, barmar@alum.mit.edu
Arlington, MA
*** PLEASE post questions in newsgroups, not directly to me ***
next prev parent reply other threads:[~2012-08-25 18:08 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-25 7:33 buffer variable values drain
2012-08-25 7:52 ` PJ Weisberg
2012-08-25 8:14 ` drain
2012-08-25 15:01 ` Drew Adams
[not found] ` <mailman.7557.1345882485.855.help-gnu-emacs@gnu.org>
2012-08-25 14:38 ` Barry Margolin
[not found] ` <mailman.7566.1345906894.855.help-gnu-emacs@gnu.org>
2012-08-25 18:08 ` Barry Margolin [this message]
2012-08-25 19:40 ` 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=barmar-033E08.14082925082012@news.eternal-september.org \
--to=barmar@alum.mit.edu \
--cc=help-gnu-emacs@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.