all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: john muhl <jm@pub.pink>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: 41493@debbugs.gnu.org, Matthieu Lemerre <racin@free.fr>,
	Stefan Kangas <stefan@marxist.se>
Subject: bug#41493: 26.3; Error in MPC directory browser
Date: Wed, 01 Jan 2025 21:27:55 -0600	[thread overview]
Message-ID: <875xmx7v44.fsf@pub.pink> (raw)
In-Reply-To: <jwvcyh62zje.fsf-monnier+emacs@gnu.org> (Stefan Monnier's message of "Wed, 01 Jan 2025 13:22:01 -0500")

Stefan Monnier <monnier@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 :)





  reply	other threads:[~2025-01-02  3:27 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-23 21:02 bug#41493: 26.3; Error in MPC directory browser Matthieu Lemerre
2020-08-13  1:22 ` Stefan Kangas
2024-12-31 19:26   ` john muhl
2025-01-01 18:22     ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2025-01-02  3:27       ` john muhl [this message]
2025-01-03 18:28       ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors

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=875xmx7v44.fsf@pub.pink \
    --to=jm@pub.pink \
    --cc=41493@debbugs.gnu.org \
    --cc=monnier@iro.umontreal.ca \
    --cc=racin@free.fr \
    --cc=stefan@marxist.se \
    /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.