GNU bug report logs - #18369
24.4.50; interactive spec of `facemenu-add-face'

Previous Next

Package: emacs;

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

Date: Sun, 31 Aug 2014 05:07:02 UTC

Severity: wishlist

Found in version 24.4.50

Fixed in version 28.1

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 18369 in the body.
You can then email your comments to 18369 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#18369; Package emacs. (Sun, 31 Aug 2014 05:07:02 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, 31 Aug 2014 05:07:03 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; interactive spec of `facemenu-add-face'
Date: Sat, 30 Aug 2014 22:06:11 -0700 (PDT)
The interactive use of this command is not as convenient as it could be.
Is there a good reason for this?

Why does the interactive spec use "*xFace: \nr" (reading a sexp, no
completion etc.)?  Why does it not use `read-face-name', as does
`facemenu-set-face' (which calls `facemenu-add-face')?

In GNU Emacs 24.4.50.1 (i686-pc-mingw32)
 of 2014-08-15 on LEG570
Bzr revision: 117706 rgm <at> gnu.org-20140815043406-p5hbu97cbm7pulcn
Windowing system distributor `Microsoft Corp.', version 6.1.7601
Configured using:
 `configure --enable-checking 'CFLAGS=-O0 -g3' CPPFLAGS=-DGLYPH_DEBUG=1'




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#18369; Package emacs. (Sat, 30 Apr 2016 13:53:01 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Drew Adams <drew.adams <at> oracle.com>
Cc: 18369 <at> debbugs.gnu.org
Subject: Re: bug#18369: 24.4.50; interactive spec of `facemenu-add-face'
Date: Sat, 30 Apr 2016 15:52:07 +0200
Drew Adams <drew.adams <at> oracle.com> writes:

> The interactive use of this command is not as convenient as it could be.
> Is there a good reason for this?
>
> Why does the interactive spec use "*xFace: \nr" (reading a sexp, no
> completion etc.)?  Why does it not use `read-face-name', as does
> `facemenu-set-face' (which calls `facemenu-add-face')?

I find these functions odd.

`facemenu-set-face' just does this:

  (facemenu-add-new-face face)
  (facemenu-add-face face start end)

after reading a face name with `read-face-name'.  So it's a very thin
shim over `facemenu-add-face'.

`M-x facemenu-add-face RET foo RET' and nothing happened.  Then I did
`M-x facemenu-add-face RET bold RET', and it errored out saying

Invalid face reference: foo

Huh?

I have no idea what these two functions are supposed to be doing, but I
don't think...  they are doing...  whatever they should be doing.

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




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#18369; Package emacs. (Sat, 30 Apr 2016 16:48:02 GMT) Full text and rfc822 format available.

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

From: Drew Adams <drew.adams <at> oracle.com>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 18369 <at> debbugs.gnu.org
Subject: RE: bug#18369: 24.4.50; interactive spec of `facemenu-add-face'
Date: Sat, 30 Apr 2016 08:47:15 -0800 (GMT-08:00)
> I find these functions odd.
> `facemenu-set-face' just does this:
>   (facemenu-add-new-face face)
>   (facemenu-add-face face start end)
> after reading a face name with `read-face-name'.  So it's a very thin
> shim over `facemenu-add-face'.

It adds the face to the Face menu (first sexp).
`facemenu-add-face' does not do that - it just applies
a face to buffer text.  These are two very different uses
of the word "add".

> `M-x facemenu-add-face RET foo RET' and nothing happened.
> Then I did `M-x facemenu-add-face RET bold RET', and it
> errored out saying Invalid face reference: foo
> Huh?

Read the doc.  If the region is empty then `facemenu-add-face'
applies a face to the text you type.  Else it applies it to
the text in the region.  Works fine.  `foo' is not a defined
face.

> I have no idea what these two functions are supposed to be doing, but I
> don't think...  they are doing...  whatever they should be doing.

They are doing exactly what they are supposed to do, and
what they are documented as doing.

This bug report (enhancement request, if you prefer) is a
request to have `facemenu-add-face' use `read-face-name'
(which might not have existed when it was defined originally;
dunno).

[Note: To use these commands you had better turn off font-lock
in your buffer.  Since font-lock has now taken over all `face'
highlighting (see other bugs, which you've closed), you will
see no effect from any functions that add text property `face'.

Font lock should NOT be monopolizing the use of property `face'
(even Stefan agrees with that).  But it does (now), so turn it
off if you want to be able to make use of Facemenu (and other
`face' highlighting).]




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#18369; Package emacs. (Tue, 13 Jul 2021 22:14:02 GMT) Full text and rfc822 format available.

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

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Drew Adams <drew.adams <at> oracle.com>
Cc: 18369 <at> debbugs.gnu.org
Subject: Re: bug#18369: 24.4.50; interactive spec of `facemenu-add-face'
Date: Wed, 14 Jul 2021 00:13:16 +0200
Drew Adams <drew.adams <at> oracle.com> writes:

> The interactive use of this command is not as convenient as it could be.
> Is there a good reason for this?
>
> Why does the interactive spec use "*xFace: \nr" (reading a sexp, no
> completion etc.)?  Why does it not use `read-face-name', as does
> `facemenu-set-face' (which calls `facemenu-add-face')?

I've now fixed this in Emacs 28.

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




bug marked as fixed in version 28.1, send any further explanations to 18369 <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. (Tue, 13 Jul 2021 22:14:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 11 Aug 2021 11:24:11 GMT) Full text and rfc822 format available.

This bug report was last modified 2 years and 258 days ago.

Previous Next


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