unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Philip Kaludercic <philipk@posteo.net>
To: emacs-devel@gnu.org
Subject: Replace 'pp' with 'prin1' to generate ELPA archive-contents
Date: Sat, 22 Oct 2022 10:52:42 +0000	[thread overview]
Message-ID: <87fsfgp1tx.fsf@posteo.net> (raw)

[-- Attachment #1: Type: text/plain, Size: 323 bytes --]


I've just tried replacing the 'pp' call with 'prin1' in elpa-admin's
`elpaa-update-archive-contents', and on my checkout the size dropped
from ~130 kb to 100 kb.  It is not much, but I don't understand why the
archive contents should be pretty printed, and even a few kilobyte less
can make a difference for some people.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-elpa-admin.el-elpaa-update-archive-contents-Use-prin.patch --]
[-- Type: text/x-patch, Size: 847 bytes --]

From 592e208beae6f921772967ab2b800606a647899b Mon Sep 17 00:00:00 2001
From: Philip Kaludercic <philipk@posteo.net>
Date: Sat, 22 Oct 2022 12:49:49 +0200
Subject: [PATCH] * elpa-admin.el (elpaa--update-archive-contents): Use 'prin1'

---
 elpa-admin.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/elpa-admin.el b/elpa-admin.el
index 00c3393499..f358fe0d68 100644
--- a/elpa-admin.el
+++ b/elpa-admin.el
@@ -167,7 +167,7 @@ Delete backup files also."
                            (string-lessp (symbol-name (car x)) (symbol-name (car y))))))
     (elpaa--message "new AC: %S" ac)
     (with-temp-buffer
-      (pp ac (current-buffer))
+      (prin1 ac (current-buffer))
       (write-region nil nil filename)
       (let ((default-directory (expand-file-name dir)))
         (elpaa--html-make-index (cdr ac))))))
-- 
2.38.0


             reply	other threads:[~2022-10-22 10:52 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-22 10:52 Philip Kaludercic [this message]
2022-10-22 11:56 ` Replace 'pp' with 'prin1' to generate ELPA archive-contents Stefan Kangas
2022-10-22 13:45   ` Philip Kaludercic
2022-10-22 15:01     ` Stefan Kangas
2022-10-22 15:33       ` Philip Kaludercic
2022-10-22 15:00   ` Stefan Monnier
2022-10-22 15:05     ` Philip Kaludercic
2022-10-25 19:28       ` Stefan Monnier
2022-10-26  6:43         ` Philip Kaludercic
2022-10-26 11:20           ` Eli Zaretskii
2022-10-26 11:39             ` Philip Kaludercic
2022-10-26 12:10           ` Stefan Monnier
2022-10-26 12:18             ` Eli Zaretskii
2022-10-26 14:11               ` Po Lu
2022-10-26 15:02                 ` Stefan Monnier
2022-10-26 15:18                   ` Robert Pluim
2022-10-26 15:25                     ` Stefan Monnier
2022-10-26 15:31                       ` Robert Pluim
2022-10-27  0:50                         ` Po Lu
2022-10-27  8:33                           ` Robert Pluim
2022-10-27 10:38                             ` Po Lu
2022-10-27 11:40                               ` Robert Pluim
2022-10-27 11:48                                 ` Po Lu
2022-10-27  0:49                   ` Po Lu
2022-10-27 15:17                     ` Stefan Monnier
2022-10-26 14:33             ` Stefan Kangas
2022-10-26 15:03               ` 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=87fsfgp1tx.fsf@posteo.net \
    --to=philipk@posteo.net \
    --cc=emacs-devel@gnu.org \
    /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).