From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Tyler Grinn Newsgroups: gmane.emacs.devel Subject: Re: [ELPA] New packages: boxy, boxy-headlines Date: Mon, 04 Oct 2021 23:44:52 -0400 Message-ID: <87r1d06sp7.fsf@gmail.com> References: <87zgro8sdr.fsf@gmail.com> <87v92c7571.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="16972"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.60 (gnu/linux) Cc: emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Oct 05 05:45:53 2021 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mXbOq-0004Dh-Cs for ged-emacs-devel@m.gmane-mx.org; Tue, 05 Oct 2021 05:45:52 +0200 Original-Received: from localhost ([::1]:39746 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mXbOp-0002rt-9C for ged-emacs-devel@m.gmane-mx.org; Mon, 04 Oct 2021 23:45:51 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:55274) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mXbNz-000289-Jj for emacs-devel@gnu.org; Mon, 04 Oct 2021 23:44:59 -0400 Original-Received: from mail-qt1-x82a.google.com ([2607:f8b0:4864:20::82a]:40631) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mXbNx-00024z-Ng for emacs-devel@gnu.org; Mon, 04 Oct 2021 23:44:59 -0400 Original-Received: by mail-qt1-x82a.google.com with SMTP id b16so17965061qtt.7 for ; Mon, 04 Oct 2021 20:44:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-transfer-encoding; bh=W0wmJgXalezZ4PWgU5aYpCca6oqIt12cdc44AxuO1j4=; b=D4pTdzQbTQDwU/Tf+CHzKnLjXo0jFLymFF0nLItdsuQIg7nkxvOQ3rqQUn1t8tlyNE DmrjC2j0kBPsAWgPNK4iwGzo5n3NVI+oE5xnQqouPjORZ4ZG1G5Y/Xwxjd3Ks6UOpqNs RsyxXfwcEH/KlcjwQu8pho1znngaAYyeTnxzNB5OSGX5kDMsrPRNhetvoAyYvAEDLSID CL8qodz5hBIAZuXb9q+fn12Ny+UXKPGRBw14MbT3QwOKe7NZAuLq2SQHkNIbNX9g5dNn SLiv4l4HboAoZu2cHPd+Jn57w4INaHqX/AVA4tnsS60uvJZd6yntM9tuZt9HVVyQtpNA PD6Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-transfer-encoding; bh=W0wmJgXalezZ4PWgU5aYpCca6oqIt12cdc44AxuO1j4=; b=C3zhV3ZPY3G6TNX+KpNqloN5qVVOgdfGU2H73TGzriTA6tDUWrNtzHh6M+8PILVNiK wrM3n2sAyy5aRC588mCS5fBtfvb3bQ/sZc/FLqxspXb9Qb1sR8p18S2OXa4fGfEhrAkT BAuNvK51vN7h4gMwWdi/ucq0YdI7wqSwxvrHSbLRCrwwWvEY74Zybs4Nkl6meseDETBa NPAyo2KP2YwgINmChWWZAhcn3YH+8kLk13FEoOyvbLQKYogiVq5r2W0Hz9/po1clOOgK JKy7LDgeXtusY6xW5FE/icyNaotQGzA1pPjsx66ZMgW/s13qOBkOCYkBggKhbmK/c8tc Gc5A== X-Gm-Message-State: AOAM531uLnSCWdd+OLsn9loJg276Jg4C2vAS2zEU7SL1nq8HiVznr5M3 yhnbORAr0O9DTY/midVOrV/y3iLCg1OT5w== X-Google-Smtp-Source: ABdhPJyoFPlDrD2wYg1xxfpNjT66LSgbyN8AckPvhZQZ6AcaD8bOf6gOK8dP8kUVoM6nwVqtcZ8/Lg== X-Received: by 2002:ac8:4744:: with SMTP id k4mr16946289qtp.247.1633405494660; Mon, 04 Oct 2021 20:44:54 -0700 (PDT) Original-Received: from tyler-hp ([2601:410:4301:3e90::7c4]) by smtp.gmail.com with ESMTPSA id d24sm5141817qtq.95.2021.10.04.20.44.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Oct 2021 20:44:54 -0700 (PDT) In-Reply-To: (Stefan Monnier's message of "Mon, 04 Oct 2021 21:47:26 -0400") Received-SPF: pass client-ip=2607:f8b0:4864:20::82a; envelope-from=tylergrinn@gmail.com; helo=mail-qt1-x82a.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:276291 Archived-At: Stefan Monnier writes: >> Defface wasn't working for me when updating the color scheme. Repeated >> calls to defface don't seem to apply changes, while directly modifying >> the face-defface-spec does. > > AFAIK, same as for `defvar`, this is on-purpose. > If you want to re-apply the standard definition, the recommended way is > to use `C-M-x`. > 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. >>> - Your packages have no ;;;###autoload cookie. The doc of boxy.el >>> doesn't make it clear what's a likely entry point (i.e. how to start >>> using it), but for `boxy-headings`, it seems at least the >>> `boxy-headlines` function should have such a cookie. >> >> I think you're right about the boxy-headlines command. boxy.el provides >> the boxy major mode and related commands, should those be autoloaded? > > IIUC `boxy.el` (including the major mode) is not meant to be used > directly by the end user, so maybe it doesn't need any autoloads because > the clients will just (require 'boxy) at the top of their file. > I don't know enough about how `boxy.el` is used by client packages: > you're in a better position to know. > Ok I agree, that is basic use case I was going for. >>> Oh, I forgot the main question (the one that got me looking more >>> closely in the first place): why do you use `cl-defmethod` everywhere >>> yet with only ever a single method defined under the same name? >> That was so (oref) and (oset) can work without ELC complaining about >> 'unknown slots'. Is there another macro that uses class specializers? > > Hmm... I don't understand why using `cl-defmethod` would silence > "unknown slot" warnings. AFAIK those warnings depend solely on whether > the byte-compiler has seen the corresponding `defclass`. > Ah that explains it. I thought it was necessary based on reading the eieio documentation and I couldn't find any support for the unknown slot warning. I must've reordered it at some point without realizing that was what fixed it. Maybe you can help with a related problem. I tried to define a macro boxy--inherited: (defmacro boxy--inherited (fun-name slot default) `(defun ,fun-name (box) ,(concat "Get the inherited property " (symbol-name slot) " from BOX") (if (slot-boundp box ,slot) (oref box ,slot) (if (slot-boundp box :parent) (,fun-name (oref box :parent)) ,default)))) (boxy--inherited boxy--padding-y :padding-y boxy--default-padding-y) But this results in Warning: Unknown slot =E2=80=98:padding-y=E2=80=99 Warning: Unknown slot =E2=80=98:parent=E2=80=99 >> Also, why not assign custom variables and faces to a group? > > Removing those `:group` will not stop them from being assigned to those > groups (IOW those `:group` args are simply redundant because vars and > faces are assigned (by default) to the last group defined with `defgroup`= ). > > > Stefan That's neat! 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? > + (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?