emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Sebastien Vauban <sva-news-D0wtAvR13HarG/iDocfnWg@public.gmane.org>
To: emacs-orgmode-mXXj517/zsQ@public.gmane.org
Subject: Re: [bug?] org-copy-face doesn’t add faces to org-faces customize group
Date: Fri, 29 Aug 2014 13:45:07 +0200	[thread overview]
Message-ID: <86k35rldto.fsf@somewhere.org> (raw)
In-Reply-To: 87tx4yu2su.fsf@gmail.com

Aaron Ecay wrote:
> I’ve noticed that the faces defined by org-copy-face are not added to
> the org-faces customize group.  This is in accordance with the docstring
> of ‘copy-face’, which says (in part) “This function does not copy face
> customization data, so NEW-FACE will not be made customizable.  Most
> Lisp code should not call this function; use `defface' with :inherit
> instead.”
>
> I think it’s at best an odd surprise and at worst a bug that all org’s
> faces are not accessible from the org-faces customize group.  Would
> there be any objection to replacing all uses of this function with
> :inherit as recommended by the docstring, and removing the org-copy-face
> function?
>
> For reference, here are the uses of the function, as returned by rgrep:
>
> ./lisp/org-faces.el:431:(org-copy-face 'org-todo 'org-checkbox-statistics-todo
> ./lisp/org-faces.el:434:(org-copy-face 'org-done 'org-checkbox-statistics-done
> ./lisp/org-faces.el:540:(org-copy-face 'org-meta-line 'org-block-begin-line
> ./lisp/org-faces.el:543:(org-copy-face 'org-meta-line 'org-block-end-line
> ./lisp/org-faces.el:560:(org-copy-face 'org-block 'org-quote
> ./lisp/org-faces.el:562:(org-copy-face 'org-block 'org-verse
> ./lisp/org-faces.el:600:(org-copy-face 'org-agenda-structure 'org-agenda-date
> ./lisp/org-faces.el:603:(org-copy-face 'org-agenda-date 'org-agenda-date-today
> ./lisp/org-faces.el:607:(org-copy-face 'secondary-selection 'org-agenda-clocking
> ./lisp/org-faces.el:610:(org-copy-face 'org-agenda-date 'org-agenda-date-weekend
> ./lisp/org-faces.el:719:(org-copy-face 'org-time-grid 'org-agenda-current-time
> ./lisp/org-faces.el:791:(org-copy-face 'mode-line 'org-mode-line-clock
> ./lisp/org-faces.el:793:(org-copy-face 'mode-line 'org-mode-line-clock-overrun

I think it's related to an Emacs bug (#16440) which I reported on the
Org mailing list in February.

As stated by Eli (in http://debbugs.gnu.org/cgi/bugreport.cgi?bug=16440+):

  ╭────
  │ Org uses org-copy-face to define the faces that you show in your
  │ screencast, and org-copy-face assumes the face it inherits from
  │ already exists.  But loading a theme now doesn't create the faces, it
  │ only prepares the data for when the face will be created.  So :inherit
  │ in org-copy-face doesn't do what you expect.
  │ 
  │ I guess either some change is needed in how themes are handled, or
  │ org-copy-face needs to change to follow suit.  (CC to Bastien for
  │ that.)
  ╰────

In the same functional area, there is also the bug #15298 still pending
(http://debbugs.gnu.org/cgi/bugreport.cgi?bug=15298) about "Background
color lost when highlighting a string".

Best regards,
  Seb

-- 
Sebastien Vauban

  reply	other threads:[~2014-08-29 11:45 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-27  1:41 [bug?] org-copy-face doesn’t add faces to org-faces customize group Aaron Ecay
2014-08-29 11:45 ` Sebastien Vauban [this message]
2014-08-30 19:03   ` Aaron Ecay
     [not found]     ` <87wq9pssuo.fsf-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2014-09-23  9:40       ` Sebastien Vauban
2014-09-23 17:27         ` Aaron Ecay
2014-09-23 18:00           ` Sebastien Vauban
2014-09-28  3:38             ` Aaron Ecay
2014-09-29 10:06               ` Sebastien Vauban

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

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=86k35rldto.fsf@somewhere.org \
    --to=sva-news-d0wtavr13harg/idocfnwg@public.gmane.org \
    --cc=emacs-orgmode-mXXj517/zsQ@public.gmane.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 public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).