From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Jean-Christophe Helary Newsgroups: gmane.emacs.devel Subject: Re: package.el strings Date: Wed, 18 Apr 2018 15:38:26 +0900 Message-ID: <84FCCBF3-F20F-48E2-B05E-F6DB218D8896@gmail.com> References: <83y3rpeubc.fsf@gnu.org> <07C02D08-66BB-4454-AA25-B512BFC39A2A@gmail.com> <83vamk965y.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 (Mac OS X Mail 11.3 \(3445.6.18\)) Content-Type: multipart/alternative; boundary="Apple-Mail=_DE3F32A7-A17E-4DC7-94D3-FE5CDFF3D0F0" X-Trace: blaine.gmane.org 1524033439 16129 195.159.176.226 (18 Apr 2018 06:37:19 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 18 Apr 2018 06:37:19 +0000 (UTC) To: Emacs developers Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Apr 18 08:37:15 2018 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1f8giR-00045K-36 for ged-emacs-devel@m.gmane.org; Wed, 18 Apr 2018 08:37:15 +0200 Original-Received: from localhost ([::1]:34715 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f8gkX-0003bD-Me for ged-emacs-devel@m.gmane.org; Wed, 18 Apr 2018 02:39:25 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:46243) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f8gjv-0003Yw-Es for emacs-devel@gnu.org; Wed, 18 Apr 2018 02:38:48 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f8gjs-0007rN-Af for emacs-devel@gnu.org; Wed, 18 Apr 2018 02:38:47 -0400 Original-Received: from mail-pg0-x22c.google.com ([2607:f8b0:400e:c05::22c]:39516) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1f8gjs-0007qv-15 for emacs-devel@gnu.org; Wed, 18 Apr 2018 02:38:44 -0400 Original-Received: by mail-pg0-x22c.google.com with SMTP id b9so385295pgf.6 for ; Tue, 17 Apr 2018 23:38:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:mime-version:subject:date:references:to:in-reply-to:message-id; bh=yKfDxIor6B8m9ZiNvOUse4OyRM0XgGKnFgPd/vtseic=; b=nRMdzVfbjNJ7sfc1mSgleocP7S8eYp74ilUrt+bxat2XjpaJWVWo4JHq+CcykoaHTg 11XHgNYgtHlPGsN7kOW+3xYaFaG7VXEPx9/4y+jyT32Xb56K7hCGEMEL3bm9kluMVhrs wUaFeTZibZTP6xVi1Gu/YMaxXypWJfaF1s+A0vTAZ31VaFRgT0+Ytg9DdBfUA/NLpyPL v2JKzPCQPARdeO0jlHqDRHljAkOeoCkjplZIMSbiKMV4Zm74Zc9Q93NYOG94aknzrkQW q1i4x1NU6EWMXIq+vjqpwdTv01jxSbCwnORB+u3WC8vjv9BY2QuRZpC/sJSKlG1sIYZu A5Ng== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:mime-version:subject:date:references:to :in-reply-to:message-id; bh=yKfDxIor6B8m9ZiNvOUse4OyRM0XgGKnFgPd/vtseic=; b=PBWymEwmPmQUW2vVEds0uarpfpYTYsjBn2oo7yZJ5jkATB662+mUxTESMNZfePEBks guiI4Uq7r35fsab/YOQoLei6+EP0Ry/y3dnUM7fMZCEmZkWQUrSGoTDY8c08sEhzj7k7 hYIVCuYY2gZCqz6H8DoqqcScqjaTCXr98E6toxylqBPeZNmg3vWIrcvyiBhPF/XQUrtB iMkV9Yz8wqYaHlQyIlH/+mUPfI6SbMcsZPAQIYXg71nQf/PfGspnxZ6YnfLn8hGQujHQ JjRkEndHpxl9kngEO2GWJijjcu2W/53F3Wi/9soUKtWXommtnKPOfzDHe14JuDEsU7jG lMww== X-Gm-Message-State: ALQs6tDaFFnk1YLqbo0I8JDkRE+DMvFC+FXdXM5aGlhuTSROKEqxKepJ OuTdFHVij8tnirrzGlFX3iPO9A== X-Google-Smtp-Source: AIpwx4/MOtmqwnM7/iol6ciB/NzJauJIWSorY4C6fs3vsmJlY1nO4wy6OFHCLAHZXA9oSvpQdl2S6Q== X-Received: by 10.101.76.6 with SMTP id u6mr749484pgq.388.1524033522735; Tue, 17 Apr 2018 23:38:42 -0700 (PDT) Original-Received: from [10.251.103.138] ([210.160.37.45]) by smtp.gmail.com with ESMTPSA id o64sm1280786pfb.62.2018.04.17.23.38.35 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 17 Apr 2018 23:38:41 -0700 (PDT) In-Reply-To: <83vamk965y.fsf@gnu.org> X-Mailer: Apple Mail (2.3445.6.18) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400e:c05::22c X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 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.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:224715 Archived-At: --Apple-Mail=_DE3F32A7-A17E-4DC7-94D3-FE5CDFF3D0F0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii Almost 9 months and nothing in master. Was there anything wrong with the = code? Jean-Christophe=20 > On Jul 22, 2017, at 18:23, Eli Zaretskii wrote: >=20 >> From: Jean-Christophe Helary >> Date: Tue, 18 Jul 2017 00:28:59 +0900 >>=20 >>>>> - (concat >>>>> - (when delete "Delete ") >>>>> - (package-menu--list-to-prompt delete) >>>>> - (when (and delete install) >>>>> - (if upgrade "; " "; and ")) >>>>> - (when install "Install ") >>>>> - (package-menu--list-to-prompt install) >>>>> - (when (and upgrade (or install delete)) "; and ") >>>>> - (when upgrade "Upgrade ") >>>>> - (package-menu--list-to-prompt upgrade) >>>>> - "? "))) >>>>> + (format "Number of packages to delete: %s / install: %s / = upgrade: %s, proceed? " >>>>> + (package-menu--list-to-prompt delete) >>>>> + (package-menu--list-to-prompt install) >>>>> + (package-menu--list-to-prompt upgrade)))) >>>>=20 >>>> This loses the feature of saying just what's needed, instead of >>>> showing zero. Can we do better? >>>=20 >>> If you ask, there probably is a way... I'll try to find something = better. >>=20 >> Ok, I found something for this part that I also adapted to 2 other = parts that I had overly simplified. I also made a few modifications here = and there compared to my original file. >=20 > Thanks, this looks OK. Could someone who uses/makes changes in > package.el please review these and, if OK, push to master? Jean-Christophe Helary ----------------------------------------------- http://mac4translators.blogspot.com @brandelune --Apple-Mail=_DE3F32A7-A17E-4DC7-94D3-FE5CDFF3D0F0 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=us-ascii Almost 9 months and nothing in master. Was there anything = wrong with the code?

Jean-Christophe 

On Jul = 22, 2017, at 18:23, Eli Zaretskii <eliz@gnu.org> wrote:

From: Jean-Christophe = Helary <jean.christophe.helary@gmail.com>
Date: = Tue, 18 Jul 2017 00:28:59 +0900

-   (concat
- =    (when delete "Delete ")
- =    (package-menu--list-to-prompt delete)
- =    (when (and delete install)
- =      (if upgrade "; " "; and "))
- =    (when install "Install ")
- =    (package-menu--list-to-prompt install)
- =    (when (and upgrade (or install delete)) "; and ")
-    (when upgrade "Upgrade ")
- =    (package-menu--list-to-prompt upgrade)
- =    "? ")))
+   (format "Number of = packages to delete: %s / install: %s / upgrade: %s, proceed? "
+ =   (package-menu--list-to-prompt delete)
+ =   (package-menu--list-to-prompt install)
+ =   (package-menu--list-to-prompt upgrade))))

This loses the feature of saying = just what's needed, instead of
showing zero.  Can we = do better?

If you ask, there = probably is a way... I'll try to find something better.

Ok, I found something for this = part that I also adapted to 2 other parts that I had overly simplified. = I also made a few modifications here and there compared to my original = file.

Thanks, this looks OK. =  Could someone who uses/makes changes in
package.el = please review these and, if OK, push to master?

Jean-Christophe Helary
-----------------------------------------------
http://mac4translators.blogspot.com @brandelune


= --Apple-Mail=_DE3F32A7-A17E-4DC7-94D3-FE5CDFF3D0F0--