all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Ted Zlatanov <tzz@lifelogs.com>
To: emacs-devel@gnu.org
Subject: Re: list-print-separator
Date: Mon, 25 Apr 2011 10:59:26 -0500	[thread overview]
Message-ID: <87zknel3tt.fsf@lifelogs.com> (raw)
In-Reply-To: jwv39l6z6y7.fsf-monnier+emacs@gnu.org

On Mon, 25 Apr 2011 12:37:07 -0300 Stefan Monnier <monnier@iro.umontreal.ca> wrote: 

>>>> With my list-print-separator patch you get fast and OK-looking.
>>>> Are you concerned it's only useful sometimes?  The speed penalty is
>>>> minor if it's not used.
SM> I'd rather make `pp' faster, or if it's too difficult split it into
SM> a "print-really-pretty" and "print-quickly-and-not-too-ugly".
>> The users most likely to benefit, at least for Gnus where I have
>> experience supporting them, are those who can't read ELisp well.  They
>> are also less likely to complain or roll their own solution.

SM> I'm not sure how that relates: what I propose is for Gnus to call
SM> print-quickly-and-not-too-ugly and that would be done by people who know
SM> Elisp fairly well.  The users who don't know Elisp well would not need
SM> to know that the file was printed via this function rather than via
SM> `print'.

Assuming Gnus is the only package to need this, you're right.  But the
reason for my proposal is that I think other packages can use it too.
EIOIO serialization, for instance, could use it.

>> So I hope you see that this is not a "print pretty" request but a real
>> need for any package that uses ELisp's build-in serialization.
>> I'm concerned that your "good enough" solution will not be adopted
>> because it will be much slower than the native `print' serialization,
>> and optimizing it is much more work than my proposed patch of 4 lines.

SM> I'm not convinced it's difficult to write
SM> a print-quickly-and-not-too-ugly that's reasonably fast.  Admittedly,
SM> reasonably fast may still be too slow, but in that case I'd rather just
SM> use an ugly print out than try to make `print's output prettier or
SM> more customizable.

OK.  I'll look at `pp' in my spare time :)

SM> PS: you could also add a -*- mode: ugly-sexp -*- cookie in the
SM> newsrc.eld file so that when a user opens it for reading it can easily
SM> (automatically?) be prettified.

That's a great idea, but I'm concerned that users may need to open the
file outside Emacs if it's causing startup problems or if the data is
triggering a bug (e.g. encoding cookie is wrong).  I've run into that.

Ted




  reply	other threads:[~2011-04-25 15:59 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-06 10:59 entry separator for printing hashtables Ted Zlatanov
2011-04-21 23:17 ` list-print-separator (was: entry separator for printing hashtables) Ted Zlatanov
2011-04-24  4:47   ` list-print-separator Stefan Monnier
2011-04-25  1:38     ` list-print-separator Ted Zlatanov
2011-04-25 12:41       ` list-print-separator Stefan Monnier
2011-04-25 12:54         ` list-print-separator Ted Zlatanov
2011-04-25 14:51           ` list-print-separator Stefan Monnier
2011-04-25 15:01             ` list-print-separator Ted Zlatanov
2011-04-25 15:37               ` list-print-separator Stefan Monnier
2011-04-25 15:59                 ` Ted Zlatanov [this message]
2011-04-25 16:55                   ` list-print-separator Thierry Volpiatto
2011-04-25 17:28                     ` list-print-separator Stefan Monnier
2011-04-25 17:55                       ` list-print-separator Eli Zaretskii
2011-04-25 18:35                         ` list-print-separator Stefan Monnier
2011-04-25 21:05             ` list-print-separator Andy Moreton
2011-04-25 22:45               ` list-print-separator Ted Zlatanov
2011-04-26 12:52                 ` list-print-separator Andy Moreton
2011-04-26 12:55                 ` list-print-separator Stefan Monnier
2011-04-26 15:23                   ` list-print-separator Ted Zlatanov

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87zknel3tt.fsf@lifelogs.com \
    --to=tzz@lifelogs.com \
    --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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.