unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Bastien <bzg@altern.org>
To: Glenn Morris <rgm@gnu.org>
Cc: Tom Tromey <tromey@redhat.com>, 16313@debbugs.gnu.org
Subject: bug#16313: 24.3; package-delete does not update package-alist
Date: Wed, 08 Jan 2014 00:08:09 +0100	[thread overview]
Message-ID: <87bnzncrvq.fsf@bzg.ath.cx> (raw)
In-Reply-To: <loppo3qwbf.fsf@fencepost.gnu.org> (Glenn Morris's message of "Tue, 07 Jan 2014 17:08:36 -0500")

Glenn Morris <rgm@gnu.org> writes:

> Bastien Guerry wrote:
>
>> Still, package-delete did not cleanly delete the package from
>> package-alist, only its description.
>
> _Should_ it remove the entire entry? It's not obvious to me, given eg
> the way package-installed-p works.

Tom may confirm or infirm this, but I think it should.
The fact that package-installed-p checks for the description
seems due to the min-version parameter, and indeed, IMO the
function should be first checking for the package name before
its description.

>> I pushed a fix to cleanly remove the package occurrence.
>
> -        (delete pkg-desc (assq name package-alist)))
> +       (delete (delete pkg-desc (assq name package-alist)) package-alist))
>
> That doesn't work for the first item in the list.
> Why not the more obvious
>
> (setq package-alist (delete (assq name package-alist) package-alist))

No reason, the above is better.

Should I fix this or wait for Tom's feedback?

-- 
 Bastien





  reply	other threads:[~2014-01-07 23:08 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-01 12:38 bug#16313: 24.3; package-delete does not update package-alist stephen_leake
2014-01-01 21:12 ` bug#16313: additional info Stephen Leake
2014-01-03  4:20 ` bug#16313: 24.3; package-delete does not update package-alist Stefan Monnier
2014-01-07 10:57   ` Bastien Guerry
2014-01-07 22:08     ` Glenn Morris
2014-01-07 23:08       ` Bastien [this message]
2014-01-08  5:10         ` Glenn Morris
2014-01-08  8:41           ` Bastien
2014-01-08 11:35           ` Bastien
2014-01-08  8:38       ` Bastien
2014-01-08 14:08         ` 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=87bnzncrvq.fsf@bzg.ath.cx \
    --to=bzg@altern.org \
    --cc=16313@debbugs.gnu.org \
    --cc=rgm@gnu.org \
    --cc=tromey@redhat.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 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).