all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Noam Postavsky <npostavs@gmail.com>
To: Chris McMahan <cmcmahan@gmail.com>
Cc: 41086@debbugs.gnu.org
Subject: bug#41086: Fwd: bug#41086: [PATCH] Add user-defined column widths to package-list (package.el)
Date: Tue, 05 May 2020 13:24:52 -0400	[thread overview]
Message-ID: <85ftceguqj.fsf@gmail.com> (raw)
In-Reply-To: <CAFgt8u3RGRH8-6A7WnGvTm+iQT6Vi1YxUvCnO+42SeWm3CiEQA@mail.gmail.com> (Chris McMahan's message of "Tue, 5 May 2020 13:12:26 -0400")

Chris McMahan <cmcmahan@gmail.com> writes:

> ;; Original non-functioning code. Trying to get the value of the
> package-archive-column-width into the list rather than hardcode it.
> (setq tabulated-list-format
>         `[("Package" ,package-name-column-width
> package-menu--name-predicate)
>           ("Version" ,package-version-column-width
> package-menu--version-predicate)
>           ("Status"  ,package-status-column-width
>  package-menu--status-predicate)])
>           ,@(if (cdr package-archives)
>                 '(("Archive" ,package-archive-column-width
                  ^

You just need a backquote here instead of a plain quote.  A good rule of
thumb is that if you climb up (using backward-up-list, C-M-u) from a
comma, there should always be exactly one corresponding backquote per
comma.  In this case you had two commas, but only one backquote.

> (if (cdr package-archives)
>     (setq tabulated-list-format (append tabulated-list-format `(("Archive" ,package-archive-column-width package-menu--archive-predicate)))))
> (setq tabulated-list-format (append tabulated-list-format `(("Description" 0 package-menu--description-predicate))))

This works too, though it's a bit clunky.

>> > I can't figure out how to get it to use the value of
>> > package-archive-column-width and not the string literal.

FYI, you really mean a quoted symbol, not a string literal.





  reply	other threads:[~2020-05-05 17:24 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-04 20:10 bug#41086: [PATCH] Add user-defined column widths to package-list (package.el) Chris McMahan
2020-05-04 21:01 ` bug#41086: Corrcted patch for bug #41086 Chris McMahan
2020-05-04 21:02 ` bug#41086: [PATCH] Add user-defined column widths to package-list (package.el) Stefan Kangas
     [not found]   ` <CAFgt8u2GWpZHnSevoGMQwVQP1x6n8mvRVFJEZbXW-iqM7qNaaw@mail.gmail.com>
2020-05-05  1:39     ` bug#41086: Fwd: " Stefan Kangas
2020-05-05 14:14       ` Eli Zaretskii
     [not found]         ` <CAFgt8u018fvLKF8xWsUs5Ky1TLhSceSPJSuKhrFrgvcm_zOU8g@mail.gmail.com>
2020-05-05 16:09           ` Eli Zaretskii
2020-05-05 17:12             ` Chris McMahan
2020-05-05 17:24               ` Noam Postavsky [this message]
2020-05-05 17:54                 ` Chris McMahan
     [not found]     ` <87eerznyav.fsf@stefankangas.se>
     [not found]       ` <CAFgt8u2CgqfwWQ2xraK=c9ceALC6VXksdFNV3wBvvV0sr1m+hw@mail.gmail.com>
2020-05-05  1:39         ` Stefan Kangas
2020-05-05  1:42         ` Stefan Kangas

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=85ftceguqj.fsf@gmail.com \
    --to=npostavs@gmail.com \
    --cc=41086@debbugs.gnu.org \
    --cc=cmcmahan@gmail.com \
    /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.