From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Noam Postavsky Newsgroups: gmane.emacs.devel Subject: Re: package.el strings Date: Sat, 28 Apr 2018 18:11:30 -0400 Message-ID: <87wowroub1.fsf@gmail.com> References: <83y3rpeubc.fsf@gnu.org> <07C02D08-66BB-4454-AA25-B512BFC39A2A@gmail.com> <83vamk965y.fsf@gnu.org> <84FCCBF3-F20F-48E2-B05E-F6DB218D8896@gmail.com> <87lgdarcwi.fsf@gmail.com> <87in8eqk93.fsf@gmail.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1524953414 18788 195.159.176.226 (28 Apr 2018 22:10:14 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 28 Apr 2018 22:10:14 +0000 (UTC) Cc: Emacs developers To: Jean-Christophe Helary Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Apr 29 00:10:10 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 1fCY2k-0004ml-I5 for ged-emacs-devel@m.gmane.org; Sun, 29 Apr 2018 00:10:10 +0200 Original-Received: from localhost ([::1]:53706 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fCY4p-0003RT-SK for ged-emacs-devel@m.gmane.org; Sat, 28 Apr 2018 18:12:19 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:54927) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fCY4B-0003RD-FD for emacs-devel@gnu.org; Sat, 28 Apr 2018 18:11:40 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fCY46-00007R-Df for emacs-devel@gnu.org; Sat, 28 Apr 2018 18:11:39 -0400 Original-Received: from mail-io0-x22e.google.com ([2607:f8b0:4001:c06::22e]:36462) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fCY46-00006d-8o for emacs-devel@gnu.org; Sat, 28 Apr 2018 18:11:34 -0400 Original-Received: by mail-io0-x22e.google.com with SMTP id d73-v6so6415164iog.3 for ; Sat, 28 Apr 2018 15:11:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :mime-version; bh=4+6620AcVnHJ3iKKT/GluEtoVGrstqjPcLlb5C9geRU=; b=GKehu5MXVBi0NsPbFmpNIxhWtao1vOg4zoycQdt5n7oNIknU9b/zzDeLHOPcKmUmIL cNmusSyEw52cxeoNhEMINPXDU+FouFP1gBZRNCVQRAVczhHzqr6TphqpJt2ZRLMnBgOg epRCAmhw7ABvxKH3q+5Xs8+K2xnr9z/EqwI+Tn+Cw8YwtEWVtqLuvDvEBpahaO2aHxrY 3pzmbfD8f6LmmAWf2i1eMc+0TxZFIe+J9f38oD0FHXTvqyWbUzNF6uprui49xbmpu2cz KEp2E9lS4z91+h0NDaJXh/BLp6DoYj72NtR1XMQApQMwCQIdq45yZSu70aV2FhvU6MCl n3nA== 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:references:date:in-reply-to :message-id:mime-version; bh=4+6620AcVnHJ3iKKT/GluEtoVGrstqjPcLlb5C9geRU=; b=PYtnDcb0A1ChPLOVWUT5WJimU6Ejyzk+FdyucE3CbTZEMtZ7ExTjVRA4Ql6ytVJXVk wSjjMeecRWdyDU+tsziNxPlvIgYq3dxCoVrzP97Amk+xZMzJAl0SqFsOFqGlraupJv/1 6yizFZbdpfAXJlN+FLFsGbsRU5enE/Xs1UUdo5CN3+ef7KN/hnsERTGQa5JZWz47GBXi xrsGJwsA3MjmTHpR7ea5igFtjLUKynnbAfYH5Le5Nr6LqrWn2SOF0MdI0RVMFrn0fhQl et6xc1D7nsEuwIigDbIorl3Jxc8fBNDMIQSnWFyJbEXLLClLx+2xxp7NdhSJcjaWKpxc JvUg== X-Gm-Message-State: ALQs6tBQwyyv91ULlVzSAezP5TNIS2CVSqdQAUZqtLZwpfHNfJQc7bLG G54QNj59pd0LDogsMesQsh4Wog== X-Google-Smtp-Source: AB8JxZqGUXBfj0tnm/S5rJ2/fh4cyEVSDi+6xf28cp1WdswzbgoJBEgDVjk8Usec0maY0LRxqCdqBQ== X-Received: by 2002:a6b:298f:: with SMTP id p137-v6mr7683861iop.288.1524953493347; Sat, 28 Apr 2018 15:11:33 -0700 (PDT) Original-Received: from zebian (cbl-45-2-119-34.yyz.frontiernetworks.ca. [45.2.119.34]) by smtp.googlemail.com with ESMTPSA id 74-v6sm1967868ith.17.2018.04.28.15.11.31 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 28 Apr 2018 15:11:32 -0700 (PDT) In-Reply-To: (Jean-Christophe Helary's message of "Thu, 26 Apr 2018 22:32:59 +0900") X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4001:c06::22e 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:224937 Archived-At: >> I meant just the outer (format "%s%s%s%s" ...) vs (concat ...). Is that >> also needed to make strings localizable? If yes, I think adding a >> comment would be helpful, because it looks a bit unnatural to me. > > Oh, you mean (format "%s%s%s%s" ...) vs an eventual (concat "%s%s%s%s" ...) ? Sorry, I was trying to elide the the less relevant parts, but I see it's making things less understandable. Let me just spell it out in full: Instead of this: (format "%s%s%s%s" (if (not delete) "" (format "Packages to delete: %s. " (package-menu--list-to-prompt delete))) (if (not install) "" (format "Packages to install: %s. " (package-menu--list-to-prompt install))) (if (not upgrade) "" (format "Packages to upgrade: %s. " (package-menu--list-to-prompt upgrade))) "Proceed? ") I think this would be a bit clearer: (concat (when delete (format "Packages to delete: %s. " (package-menu--list-to-prompt delete))) (when install (format "Packages to install: %s. " (package-menu--list-to-prompt install))) (when upgrade (format "Packages to upgrade: %s. " (package-menu--list-to-prompt upgrade))) "Proceed? ") > It there a length limit in emacs code ? Um, I thought there was a convention of generally trying to keep things within 80 columns, but now I can't find anything saying that. I may have just been thinking of other non-Emacs projects.