From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: john muhl Newsgroups: gmane.emacs.bugs Subject: bug#41493: 26.3; Error in MPC directory browser Date: Tue, 31 Dec 2024 13:26:21 -0600 Message-ID: <87ed1npsbm.fsf@pub.pink> References: <87pnaue55o.fsf@x1.intra> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="17634"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Matthieu Lemerre , 41493@debbugs.gnu.org, Stefan Monnier To: Stefan Kangas Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Dec 31 20:27:21 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1tShtg-0004Qw-BX for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 31 Dec 2024 20:27:21 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tShtS-0002D9-WE; Tue, 31 Dec 2024 14:27:07 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tShtP-0002Cr-F9 for bug-gnu-emacs@gnu.org; Tue, 31 Dec 2024 14:27:04 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tShtP-0002v8-0h for bug-gnu-emacs@gnu.org; Tue, 31 Dec 2024 14:27:03 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:References:In-Reply-To:From:To:Subject; bh=0hwV8v9pNk5/sr/hWK2pYVW8neBW8l1soayQ9dMjCuE=; b=Bj4ZT+gQp9tJ/+V47/gtQUhecrpbVcIOSLn+XtbTwxgQdqFG08zcbQbXwYnKtvqkjkEU4E0W6mE8q6pN9mnK5013X16dbiFfdQ1+6pLzCNtxizeR5EAZ968NZWtW4d6NsV8nlokrOT11Qqt5s8wDTzY9/lLfh67bHz9450MeNZV8MiGBqHipbLsK+mrRvD/GhNGuCO/MmlqA/nMJXNA4U4oEpM6TjB3l1JOEMzOdLTkgd1OfEq8cZ4YlYzTjEI1DLIDmyooMe6ff435jHRax/buhylxU8G0Oqt4jBCCVdMegQL8bmcdM0sE9wrv0NnJGeQENQwkUR9QywLR4RUvnxA==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tShtO-0004A4-KI for bug-gnu-emacs@gnu.org; Tue, 31 Dec 2024 14:27:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: john muhl Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 31 Dec 2024 19:27:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 41493 X-GNU-PR-Package: emacs Original-Received: via spool by 41493-submit@debbugs.gnu.org id=B41493.173567320815972 (code B ref 41493); Tue, 31 Dec 2024 19:27:02 +0000 Original-Received: (at 41493) by debbugs.gnu.org; 31 Dec 2024 19:26:48 +0000 Original-Received: from localhost ([127.0.0.1]:36821 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tShtA-00049Y-1o for submit@debbugs.gnu.org; Tue, 31 Dec 2024 14:26:48 -0500 Original-Received: from fout-b6-smtp.messagingengine.com ([202.12.124.149]:50799) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tSht7-00049K-MZ for 41493@debbugs.gnu.org; Tue, 31 Dec 2024 14:26:47 -0500 Original-Received: from phl-compute-05.internal (phl-compute-05.phl.internal [10.202.2.45]) by mailfout.stl.internal (Postfix) with ESMTP id 0201F1140111; Tue, 31 Dec 2024 14:26:39 -0500 (EST) Original-Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-05.internal (MEProxy); Tue, 31 Dec 2024 14:26:40 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pub.pink; h=cc :cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:subject :subject:to:to; s=fm2; t=1735673199; x=1735759599; bh=0hwV8v9pNk 5/sr/hWK2pYVW8neBW8l1soayQ9dMjCuE=; b=cTnddYELg1AmB/s2qyjCsPk59A aYVZpeBd8JqoQfuGFeRccnfgmxBVGOdBU6T9yaRricoi4rW8j4/+GvEMTp0esfqC FkqaX4hiDQoUXhBPeR9U45/8F9+fXRXb5YBMhZ59nm82eFybHBowa8b7SF0nm3Jp hA3gbFMTqlTTwTI19SdyD9bXhs4CtiYgylYTh82BiFfLg+XDT6pZq+FWz3fNz9aq /DXLpbriqSB2hSTqaCmdIDcDZOHDMxEgFjPPb1uA7FITytc1M4AF8HPHnBdmrCHB Xihr8jE6DZY/RYNsdZOrcfJzIZkqToYsdr3PSuUfxgE48uVZpU0zWgvmmo2w== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t= 1735673199; x=1735759599; bh=0hwV8v9pNk5/sr/hWK2pYVW8neBW8l1soay Q9dMjCuE=; b=TJzzP5tdfIT9xVJ3czrAa6hUnKVTZxjkOc9EUCIHC7EjTBbtT4u 0Ni0M2USOQSo0Rtl2WVkZvC8LDCdWxpPHDJtrd+1esbvqNSiITOK48BnOPRBPyHt q/pjcTpeKgC1EdP+ddHNYm4P5J9mtCQ1hz0OwLKWV80HynzQ/X9ldf64TzslnVxX UoBxeM+m7lRJASlR26x8sVHK6rIMP7WFRy2NvbWpHnxzIOg/k7jeKpWabEZqVnDf qnQPWFP4NKQUNa+rsCasrft8XVc/FFEHrz0cFe5ZARDaYzDNB1srxxhE1TdvmLVW b9IOmXogJXlfDcjv5pyoyoXAPSv1h8LAP+g== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefuddruddvkedguddvhecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpggftfghnshhusghstghrihgsvgdp uffrtefokffrpgfnqfghnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivg hnthhsucdlqddutddtmdenucfjughrpefhvfevufgjfhffkfgfgggtsehmtderredtredt necuhfhrohhmpehjohhhnhcumhhuhhhluceojhhmsehpuhgsrdhpihhnkheqnecuggftrf grthhtvghrnhephffhveeiiefffeeffedvieetieeggeefjeeludfftdeuteevheehfefg vdevudfgnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomh epjhhmsehpuhgsrdhpihhnkhdpnhgspghrtghpthhtohepgedpmhhouggvpehsmhhtphho uhhtpdhrtghpthhtohepmhhonhhnihgvrhesihhrohdruhhmohhnthhrvggrlhdrtggrpd hrtghpthhtohepgedugeelfeesuggvsggsuhhgshdrghhnuhdrohhrghdprhgtphhtthho pehrrggtihhnsehfrhgvvgdrfhhrpdhrtghpthhtohepshhtvghfrghnsehmrghrgihish htrdhsvg X-ME-Proxy: Feedback-ID: i74194916:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 31 Dec 2024 14:26:38 -0500 (EST) In-Reply-To: (Stefan Kangas's message of "Wed, 12 Aug 2020 18:22:26 -0700") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:298052 Archived-At: --=-=-= Content-Type: text/plain Stefan Kangas writes: > Matthieu Lemerre writes: > >> While discovering MPC I customized the MPC host variable, started MPC, >> clicked on the Menu to "Add a new browser", then selected Directory. >> If I click on one of my directories (that mostly contain >> subdirectories), I get the following error: >> >> cl--assertion-failed: Assertion failed: (or (null alist) (memq (caar >> alist) mpc--proc-alist-to-alists-starters)) > > Copying in the maintainer of mpd.el here. Any ideas? The attached patch fixes it for me. The cause seems to be that the returned alist for a directory browser has entries for (directory ...) and (Last-Modified ...) and the code was only getting rid of the former only. That leftover (Last-Modified ...) would then trip up the assert in mpc--proc-alist-to-alists when it checks with mpc--proc-alist-to-alists-starters. --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-Fix-directory-browsers-in-mpc-Bug-41493.patch >From 542e4e8a444d1b197a94666ed1615b1c6ee65d01 Mon Sep 17 00:00:00 2001 From: john muhl Date: Tue, 31 Dec 2024 12:52:32 -0600 Subject: [PATCH] Fix directory browsers in 'mpc' (Bug#41493) * lisp/mpc.el (mpc-cmd-find): Strip "Last-Modified" pairs so that the returned alist matches 'mpc--proc-alist-to-alists-starters'. --- lisp/mpc.el | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lisp/mpc.el b/lisp/mpc.el index 4317fece6fc..05ef546f884 100644 --- a/lisp/mpc.el +++ b/lisp/mpc.el @@ -644,9 +644,10 @@ mpc-cmd-find (mpc-proc-buf-to-alist (mpc-proc-cmd (list "listallinfo" value))))) (mpc--proc-alist-to-alists - ;; Strip away the `directory' entries. + ;; Strip away the `directory' & `Last-Modified' entries. (delq nil (mapcar (lambda (pair) - (if (eq (car pair) 'directory) + (if (or (eq (car pair) 'directory) + (eq (car pair) 'Last-Modified)) nil pair)) pairs))))) ((string-match "|" (symbol-name tag)) -- 2.47.1 --=-=-=--