From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Mauro Aranda Newsgroups: gmane.emacs.bugs Subject: bug#49274: [PATCH] lisp/cus-theme: retain documentation string when customizing theme Date: Tue, 29 Jun 2021 21:03:09 -0300 Message-ID: <87fsx0i5he.fsf@tbb.theblackbeard.org> References: <20210629144412.455196-1-league@contrapunctus.net> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="6293"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 49274@debbugs.gnu.org To: Christopher League Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Jun 30 02:02:12 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1lyNgB-0001S1-43 for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 30 Jun 2021 02:02:11 +0200 Original-Received: from localhost ([::1]:35446 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lyNg9-00072j-Qy for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 29 Jun 2021 20:02:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:32902) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lyNg2-00072R-OT for bug-gnu-emacs@gnu.org; Tue, 29 Jun 2021 20:02:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:44424) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lyNg2-0006TA-Gq for bug-gnu-emacs@gnu.org; Tue, 29 Jun 2021 20:02:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lyNg2-0002UM-FO for bug-gnu-emacs@gnu.org; Tue, 29 Jun 2021 20:02:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Mauro Aranda Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 30 Jun 2021 00:02:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 49274 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 49274-submit@debbugs.gnu.org id=B49274.16250113159534 (code B ref 49274); Wed, 30 Jun 2021 00:02:02 +0000 Original-Received: (at 49274) by debbugs.gnu.org; 30 Jun 2021 00:01:55 +0000 Original-Received: from localhost ([127.0.0.1]:55965 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lyNfv-0002Th-57 for submit@debbugs.gnu.org; Tue, 29 Jun 2021 20:01:55 -0400 Original-Received: from mail-pg1-f182.google.com ([209.85.215.182]:42837) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lyNft-0002TT-6Q for 49274@debbugs.gnu.org; Tue, 29 Jun 2021 20:01:54 -0400 Original-Received: by mail-pg1-f182.google.com with SMTP id d12so354531pgd.9 for <49274@debbugs.gnu.org>; Tue, 29 Jun 2021 17:01:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:in-reply-to:date:message-id:mime-version; bh=ttGsgz6vY0PaQlhewseqPd0GaFuMMjs0AkvhMarXmVA=; b=dSY7d16XeiRt9FFO1pw82v+D3HbpY1fjgP4zab5ZEpH3uZ2e0mFV9xrvK+Gt+MrN8w gJofsjbcecyci249RMb5N+40076atEYeKvTjsm0a+3NrsPoEtUYV8Q8k9xdMa1m+au2t lTQDmlZMuC/ctY6IN18qnDLFOQ2d44VbJENIFsoK3n/kh4dRyZtfei+UfDsvmB4uk4RV yl7tn25cvZHLGcTrFeCSiWAnIK+gkTB5Sq0mcHmLP5nZ2LWJhaR5mNcCBbgi1a6orFjv 2JORtFjSWfNSxphsQzx8Sj80iWAoV5dgSZMJwZPy0VsA7PQf/zIztVOKq+zWO3bS1YD9 nbFg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:in-reply-to:date:message-id :mime-version; bh=ttGsgz6vY0PaQlhewseqPd0GaFuMMjs0AkvhMarXmVA=; b=iURmaLo21I1+WvSsZipsaUAauVVRDA8HtsEkdRqoMTy1BDvGzcS6gKEjMUpuho8f3U SJH+xL0eW/zMeDTGmNYtbb1GiRJhlHyrFvg2Cfeq2OWc0Upx2bwpoJM2KuPnV5V7fgnM qQJvs2kIUinPaLRk9tuksTTw7M0wXynbqVdbWeiUEfnm4c1yJVvfqdHf07mdpLiPjtWB QiZn/BIuS3SDFSlKV3kFUkBsVIfp4zY2Yx6K3pbmbdtTRQAPdeClsCGbH+ytsOqdW1/K tg3DbN8q0w9BDOoLcaVYBLr74Ct2rmvspT/4ApB+Tz3u4sh/jYjoT51S5+SF48sII7TI Tk0g== X-Gm-Message-State: AOAM531NvTNGv0U5kwKZDk/FSap0KKOhdp45Nf78PQiiTwRrpgq+krN5 Bm6iE2d0c1MPfOjxk2vPBTHdrfzTgR8= X-Google-Smtp-Source: ABdhPJw6T/tQhuu29egxS1nFxTpsdzbV4COO0+oGlKn9bxml0+9h+yYpQVU3m0b+sEvngxl2tqL/Fg== X-Received: by 2002:a63:dd51:: with SMTP id g17mr31506868pgj.238.1625011307019; Tue, 29 Jun 2021 17:01:47 -0700 (PDT) Original-Received: from tbb.theblackbeard.org ([201.213.132.172]) by smtp.gmail.com with ESMTPSA id c24sm2417283pjs.6.2021.06.29.17.01.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 29 Jun 2021 17:01:46 -0700 (PDT) In-Reply-To: (message from Christopher League on Tue, 29 Jun 2021 19:54:04 -0400) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:209134 Archived-At: Christopher League writes: > On 2021-06-29 18:38, Mauro Aranda wrote: >>> *Implementation details:* we had to move the chunk marked "Load the >>> theme settings" earlier in the function `customize-create-theme`. Then >>> the `custom-theme-description` widget was made an `editable-field` >>> whose value comes from `theme-documentation` if available, else >>> `format-time-string`. The rest of the patch is reindentation due to >>> the larger scope of the let that holds the theme settings. >> >> Why change the widget from a text widget to an editable-field >> widget? I think a text widget is better here, since a docstring usually >> would have more than one line, and the editable-field keymap remaps RET >> while the text keymap doesn't. > > Interesting. I'm not that familiar with the widget types, but the reason > I > chose 'editable-field is because 'text seems to *duplicate* the content, > which is much more annoying for a multi-line doc string than a short > name. > I'll attach a screen-shot -- this is the effect when it's > (widget-create 'text ...). [Or maybe this is a widget bug? I'm using git > master from earlier today.] That's because there was a change to the :format property of the text widget, but this call wasn't updated. Try overriding it like this: (widget-create 'text :format "%v" ...) > If there's a fix for duplicating the string with a text widget, I'll be > happy with it! Thanks. The above should make it work. Please try it, thank you.