unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Tyler Grinn <tylergrinn@gmail.com>
Cc: emacs-devel@gnu.org
Subject: Re: [ELPA] New packages: boxy, boxy-headlines
Date: Tue, 05 Oct 2021 08:30:34 -0400	[thread overview]
Message-ID: <jwvr1cz8xzg.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <87r1d06sp7.fsf@gmail.com> (Tyler Grinn's message of "Mon, 04 Oct 2021 23:44:52 -0400")

> That's what I've gathered to, so to get around that is why I'm using
> face-spec-set. The behavior I want is this: update the face if a user
> has not independently customized it already. If I simply changed the
> defface, only new users would get the new theme. Existing users would
> have to re-apply the standard definition or restart emacs.

What you want is not specific to your theme, so it's best to
fix it at its source rather than work around it with non-standard code.
I suggest you `M-x report-emacs-bug` and request this behavior.

> (boxy--inherited boxy--padding-y :padding-y boxy--default-padding-y)
>
> But this results in
> Warning: Unknown slot ‘:padding-y’
> Warning: Unknown slot ‘:parent’

You don't have any slot named `:parent` nor `:padding-y`.
You're confusing the slots's names with the slots's initargs.

You want:

    (slot-boundp box 'parent)

rather than

    (slot-boundp box :parent)

BTW, while I don't like `defclass` (preferring `cl-defstruct`), one of
its neat features is the ability to override `slot-unbound`, which
should let you implement in a kind of "transparent" way the kind of
fallback mechanism that you're trying to implement with
`boxy--inherited`.

> I have two more questions about the patch. First, just to make sure,
> would you like to contribute those three diffs and did you sign the FSF
> Copyright paperwork?

;-)
Yes, I did.

>> +  (let ((inhibit-message t))     ;FIXME: Please report the message as an error.
>>      (setq indent-tabs-mode nil)
>>      (cursor-sensor-mode t)
>>      (toggle-truncate-lines t)))
>
> This doesn't even do what I want. I don't want 'Truncate long lines
> enabled' to be printed to the minibuffer when entering boxy mode, but it
> shows regardless. What exactly does the FIXME mean here and how do I
> stop that message?

The FIXME means that `toggle-truncate-lines` should not emit the message
at all in this case, just like `cursor-sensor-mode` doesn't emit
a message when called as above.
IOW, you should `M-x report-emacs-bug` and complain about it.


        Stefan




  reply	other threads:[~2021-10-05 12:30 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-04 20:08 [ELPA] New packages: boxy, boxy-headlines Tyler Grinn
2021-10-04 21:54 ` Stefan Monnier
2021-10-04 22:02   ` Stefan Monnier
2021-10-04 23:14     ` Tyler Grinn
2021-10-05  1:47       ` Stefan Monnier
2021-10-05  3:44         ` Tyler Grinn
2021-10-05 12:30           ` Stefan Monnier [this message]
2021-10-05 16:35             ` Tyler Grinn
2021-10-05 19:57               ` Stefan Monnier
2021-10-05 18:03             ` Tyler Grinn
2021-10-05 19:56               ` Stefan Monnier
2021-10-06 16:35                 ` Tyler Grinn
2021-10-13  8:48             ` tumashu
2021-10-13 12:27               ` Stefan Monnier

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.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=jwvr1cz8xzg.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=emacs-devel@gnu.org \
    --cc=tylergrinn@gmail.com \
    /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.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).