GNU bug report logs - #41493
26.3; Error in MPC directory browser

Previous Next

Package: emacs;

Reported by: Matthieu Lemerre <racin <at> free.fr>

Date: Sat, 23 May 2020 21:03:02 UTC

Severity: normal

Found in version 26.3

Full log


Message #17 received at 41493 <at> debbugs.gnu.org (full text, mbox):

From: john muhl <jm <at> pub.pink>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: 41493 <at> debbugs.gnu.org, Matthieu Lemerre <racin <at> free.fr>,
 Stefan Kangas <stefan <at> marxist.se>
Subject: Re: bug#41493: 26.3; Error in MPC directory browser
Date: Wed, 01 Jan 2025 21:27:55 -0600
Stefan Monnier <monnier <at> iro.umontreal.ca> writes:

> Hi John,
>
> Hmm... IIUC the output we receive is a list of pairs made of sublists of
> the form either:
>
>     (directory . <...>)
>     (Last-Modified . <...>)
>
> or
>
>     (file . <...>)
>     (Last-Modified . <...>)
>     (Format . <...>)
>     (Title . <...>)
>     ...

That’s what I see in the (fairly recent) versions of mpd I tried.

> IIUC when I wrote the code there were no such `Last-Modified` entries.
>
> We're interested in extracting a list of the files (where each file is
> represented by its alist), so I just stripped away all the `directory`
> entries and that was it.  But now that `directory` can be followed by
> info about that directory (currently only `Last-Modified`), we should
> arguably be more careful to also remove everything between
> `directory` and the next `file` or `directory`.
>
> So I think the patch below is "more robust".
> WDYT?

Yeah that makes more sense.

> I also think it's a good opportunity to add some comments/docstrings
> because it took me a while to understand what this was trying to do.

No objections from me :)




This bug report was last modified 162 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.