Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

pretty printing problems #689

Closed
yyr opened this Issue · 9 comments

4 participants

@yyr
Collaborator

Although l like the idea of having pretty-printing., I seem to have all sorts of problems on my every system. I getting away with a rescue status file.

I also see a warning when pretty printing is messed up., which is kind of nice, but not easy to compare. Anyway I took time to
look around I see this difference

 (emacs-w3m status "installed" recipe
            (:name emacs-w3m :description "A simple Emacs interface to w3m" :type cvs :module "emacs-w3m" :url ":pserver:anonymous@cvs.namazu.org:/storage/cvsroot" 
             :build
                   `("autoconf"
                     ("./configure" ,(concat "--with-emacs=" el-get-emacs))
                     "make")
                   :build/windows-nt
                   ("sh /usr/bin/autoconf" "sh ./configure" "make")
                   :info "doc"))
 (emacs-w3m status "installed" recipe
            (:name emacs-w3m
                   :description "A simple Emacs interface to w3m"
                   :type cvs
                   :module "emacs-w3m"
                   :url ":pserver:anonymous@cvs.namazu.org:/storage/cvsroot"
                   :build
                   (\`
                    ("autoconf"
                     ("./configure"
                      (\,
                       (concat "--with-emacs=" el-get-emacs)))
                     "make"))
                   :build/windows-nt
                   ("sh /usr/bin/autoconf" "sh ./configure" "make")
                   :info "doc"
                   ))

here one is pretty printed one is not (at least thats what I understood). the difference is at :build.

can you see what is going.?

@DarwinAwardWinner
Collaborator

It looks like the problem is that backquoting is not handled properly. I think I'll just remove the custom pretty-printing.

@yyr
Collaborator

IMO you can make it as optional and open for testing instead of just removing. You can also ask users to use that when you would like to see users' status file.

@DarwinAwardWinner
Collaborator

Well, seeing that way backquotes are handled made me realize that a custom pretty-printer needs to handle a lot of edge cases, and I think it's just not worth it. We'll just rely on the built-in pretty-printer, even though it is not really suited to printing property lists.

@renard

Got also an issue with that. .status.el looks like:

((adoc-mode status "installed" recipe
        (:name adoc-mode :website "http://code.google.com/p/adoc-mode/" :description "A major-mode for editing AsciiDoc files in Emacs." :type http :url "http://sensorflo-emacs.googlecode.com/svn/trunk/adoc-mode/adoc-mode.el" :features "adoc-mode" ...))
 (anything status "installed" recipe
       (:name anything :website "http://www.emacswiki.org/emacs/Anything" :description "Open anything / QuickSilver-like candidate-selection framework" :type git :url "http://repo.or.cz/r/anything-config.git" :shallow nil ...))
 (browse-kill-ring status "installed" recipe
           (:name browse-kill-ring :description "Interactively insert items from kill-ring" :type emacswiki :features browse-kill-ring))
 (buffer-move status "installed" recipe
          (:name buffer-move :description "Swap buffers without typing C-x b on each window" :type emacswiki :features buffer-move))
 (cisco-router-mode status "installed" recipe
            (:name cisco-router-mode :description "Major mode for editing Cisco router configuration files" :type emacswiki :features cisco-router-mode))
 (color-theme status "installed" recipe
          (:name color-theme :description "An Emacs-Lisp package with more than 50 color themes for your use. For questions about color-theme" :website "http://www.nongnu.org/color-theme/" :type http-tar :options
             ("xzf")
             :url "http://download.savannah.gnu.org/releases/color-theme/color-theme-6.6.0.tar.gz" ...))
 (color-theme-tango status "installed" recipe
            (:name color-theme-tango :description "Color theme based on Tango Palette. Created by danranx@gmail.com" :type emacswiki :depends color-theme :prepare
               (autoload ... "color-theme-tango" "color-theme: tango" t)))
 (crontab-mode status "installed" recipe
           (:name crontab-mode :description "Mode for editing crontab files" :type http :url "http://web.archive.org/web/20080716014153/http://www.mahalito.net/~harley/elisp/crontab-mode.el"))
 (descbinds-anything status "installed" recipe
             (:name descbinds-anything :description "Yet Another describe-bindings with anything" :type emacswiki :depends anything :features descbinds-anything))
 (dictionary status "installed" recipe
         (:name dictionary :website "http://www.myrkr.in-berlin.de/dictionary/" :description "Emacs package for talking to a dictionary server" :type http-tar :options
            ("xzf")
            :url "http://www.myrkr.in-berlin.de/dictionary/dictionary-1.8.7.tar.gz" ...))
 (dig status "required" recipe nil)
 (nognus status "installed" recipe
     (:name nognus :description "A newsreader for GNU Emacs" :type git :url "http://git.gnus.org/gnus.git" :build `... :build/windows-nt `... ...))
 ...)

@tkf
Collaborator

@renard Maybe you have non-nil value in print-length or print-level. If so, you can do (setq print-length nil) and (setq print-level nil) and save status file by updating something.

Sometimes, I also have ... in status file and at that time, print-length is 4 or something like that. Maybe it is better to set them to nil using let to protect status file from some evil elisp code?

@DarwinAwardWinner
Collaborator

Hmm. Yes, I think we should define an wrapper function that ensures print-level and print-length are both nil whenever printing things to status.el.

@renard

Yep I know that trick thanks :-) I wrote a patch about it a few time ago (f1d0e03)

@DarwinAwardWinner DarwinAwardWinner referenced this issue from a commit in DarwinAwardWinner/el-get
@DarwinAwardWinner DarwinAwardWinner Remove custom pretty-printing.
It was nice when it worked, but it was too unreliable.

Fixes #689.
110e403
@DarwinAwardWinner DarwinAwardWinner referenced this issue from a commit
Commit has since been removed from the repository and is no longer available.
@DarwinAwardWinner DarwinAwardWinner referenced this issue from a commit in DarwinAwardWinner/el-get
@DarwinAwardWinner DarwinAwardWinner Always print with "print-level" and "print-length" nil
This prevents Emacs from inserting "..." in place of very deep or long
data structures, which could corrupt the status file in some cases.
This is done by defining a wrapper function "el-get-print-to-string",
which el-get should use for all "critical" stringification tasks.

As noted in #689.
cb787b2
@DarwinAwardWinner
Collaborator

@renard, it looks like that patch has accidentally got factored out since. Not sure how, but I've just submitted #692 which does the same thing for all of el-get.

@DarwinAwardWinner
Collaborator

Custom pretty-printing is now removed, so this is resolved.

@pasja pasja referenced this issue from a commit in pasja/el-get
@DarwinAwardWinner DarwinAwardWinner Remove custom pretty-printing.
It was nice when it worked, but it was too unreliable.

Fixes #689.
31c97fb
@pasja pasja referenced this issue from a commit in pasja/el-get
@DarwinAwardWinner DarwinAwardWinner Always print with "print-level" and "print-length" nil
This prevents Emacs from inserting "..." in place of very deep or long
data structures, which could corrupt the status file in some cases.
This is done by defining a wrapper function "el-get-print-to-string",
which el-get should use for all "critical" stringification tasks.

As noted in #689.
ee89f8a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.