GNU bug report logs - #17872
24.4.50; "primitive" in (elisp) `Advising Functions' and similar nodes

Previous Next

Package: emacs;

Reported by: Drew Adams <drew.adams <at> oracle.com>

Date: Sun, 29 Jun 2014 14:37:01 UTC

Severity: minor

Tags: notabug

Found in version 24.4.50

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 17872 in the body.
You can then email your comments to 17872 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#17872; Package emacs. (Sun, 29 Jun 2014 14:37:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Drew Adams <drew.adams <at> oracle.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Sun, 29 Jun 2014 14:37:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Drew Adams <drew.adams <at> oracle.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 24.4.50; "primitive" in (elisp) `Advising Functions' and similar nodes
Date: Sun, 29 Jun 2014 07:35:37 -0700 (PDT)
Please use some other term than "primitive" for what is intended here.
The term "primitive" already has a different meaning in Emacs, which you
can find by using `i primitive RET' in the Elisp manual:

 "primitive"
     A function which is callable from Lisp but is actually written in
     C.  Primitives are also called "built-in functions", or "subrs".
     Examples include functions like `car' and `append'.  In addition,
     all special forms (see below) are also considered primitives.

     Usually, a function is implemented as a primitive because it is a
     fundamental part of Lisp (e.g., `car'), or because it provides a
     low-level interface to operating system services, or because it
     needs to run fast.  Unlike functions defined in Lisp, primitives
     can be modified or added only by changing the C sources and
     recompiling Emacs.  See *note Writing Emacs Primitives::.

The things being referred to in node `Advising Functions' and other
nodes (its children, at least) as "primitives", are NOT primitives.
They are either macros (e.g. `add-function') or ordinary Lisp functions
(e.g. `advice-add').  This confuses rather than helps Emacs users.

In GNU Emacs 24.4.50.1 (i686-pc-mingw32)
 of 2014-06-17 on ODIEONE
Bzr revision: 117359 monnier <at> iro.umontreal.ca-20140617193358-2t1nl1te9gc2mqrx
Windowing system distributor `Microsoft Corp.', version 6.1.7601
Configured using:
 `configure --prefix=/c/Devel/emacs/snapshot/trunk
 --enable-checking=yes,glyphs 'CFLAGS=-O0 -g3'
 LDFLAGS=-Lc:/Devel/emacs/lib 'CPPFLAGS=-DGC_MCHECK=1
 -Ic:/Devel/emacs/include''




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#17872; Package emacs. (Sun, 04 Aug 2019 11:57:02 GMT) Full text and rfc822 format available.

Message #8 received at 17872 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Drew Adams <drew.adams <at> oracle.com>
Cc: 17872 <at> debbugs.gnu.org
Subject: Re: bug#17872: 24.4.50; "primitive" in (elisp) `Advising Functions'
 and similar nodes
Date: Sun, 04 Aug 2019 13:56:45 +0200
Drew Adams <drew.adams <at> oracle.com> writes:

> Please use some other term than "primitive" for what is intended here.
> The term "primitive" already has a different meaning in Emacs, which you
> can find by using `i primitive RET' in the Elisp manual:
>
>  "primitive"
>      A function which is callable from Lisp but is actually written in
>      C.  Primitives are also called "built-in functions", or "subrs".
>      Examples include functions like `car' and `append'.  In addition,
>      all special forms (see below) are also considered primitives.

Are you referring to (for instance) this text?

---
Emacs's advice system provides two sets of primitives for that: the core set,
for function values held in variables and object fields (with the corresponding
primitives being @code{add-function} and @code{remove-function}) and another
set layered on top of it for named functions (with the main primitives being
@code{advice-add} and @code{advice-remove}).
---

Nowhere in this node (and the subsequent nodes) is the word "primitive"
used in reference to a function or the like, but in the phrase "Core
Advising Primitives" or similar.  I don't think there's much scope for
confusion with the other use of the word, so I'm closing this bug report.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Added tag(s) notabug. Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Sun, 04 Aug 2019 11:57:02 GMT) Full text and rfc822 format available.

bug closed, send any further explanations to 17872 <at> debbugs.gnu.org and Drew Adams <drew.adams <at> oracle.com> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Sun, 04 Aug 2019 11:57:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#17872; Package emacs. (Mon, 05 Aug 2019 00:57:02 GMT) Full text and rfc822 format available.

Message #15 received at 17872 <at> debbugs.gnu.org (full text, mbox):

From: Drew Adams <drew.adams <at> oracle.com>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 17872 <at> debbugs.gnu.org
Subject: RE: bug#17872: 24.4.50; "primitive" in (elisp) `Advising Functions'
 and similar nodes
Date: Sun, 4 Aug 2019 17:56:16 -0700 (PDT)
> > Please use some other term than "primitive" for what is intended
> > here.  The term "primitive" already has a different meaning
> > in Emacs, which you can find by using `i primitive RET' in the
> > Elisp manual:
> >
> >  "primitive"
> >      A function which is callable from Lisp but is actually written
> >      in C.  Primitives are also called "built-in functions", or
> >      "subrs".
> >      Examples include functions like `car' and `append'.  In
> >      addition, all special forms (see below) are also considered
> >      primitives.
> 
> Are you referring to (for instance) this text?
> 
> ---
> Emacs's advice system provides two sets of primitives for that: the
> core set, for function values held in variables and object
> fields (with the corresponding primitives being @code{add-function}
> and @code{remove-function}) and another set layered on top of it
> for named functions (with the main primitives being
> @code{advice-add} and @code{advice-remove}).

Yes, and as the bug title says, "and similar nodes".

> Nowhere in this node (and the subsequent nodes) is the word "primitive"
> used in reference to a function or the like, 
                       ^^^^^^^^^^^^^^^^^^^^^^

Uh, I beg to differ.  All of the "primitives" in the
text you just quoted are functions.  And that text
explicitly refers to them as functions.

They are _functions_, and they are not coded in C.

> but in the phrase "Core Advising Primitives" or similar.
> I don't think there's much scope for confusion with the
> other use of the word,

The undefined term "core" here presumably means
that these are the basic, or fundamental functions
used for advice.  Though undefined here, "core" is
OK.  What's not OK (it's misleading) is "primitive".

"Core Advising Functions" or "Basic Advising
Functions" would be clearer, and would not invite
confusion with Emacs primitives, which are callable
from Lisp but written in C.

Either that or perhaps you would like to rewrite
the longstanding text that defines "primitive" as
a function or special form written in C.

> so I'm closing this bug report.

Unfortunate.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Mon, 02 Sep 2019 11:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 4 years and 230 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.