all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eric Abrahamsen <eric@ericabrahamsen.net>
To: Michael Heerdegen <michael_heerdegen@web.de>
Cc: 53989@debbugs.gnu.org
Subject: bug#53989: 29.0.50; Gnus searches broken
Date: Mon, 14 Feb 2022 15:08:36 -0800	[thread overview]
Message-ID: <87ee45gi6j.fsf@ericabrahamsen.net> (raw)
In-Reply-To: <874k51qd1k.fsf@web.de> (Michael Heerdegen's message of "Mon, 14 Feb 2022 23:49:27 +0100")

Michael Heerdegen <michael_heerdegen@web.de> writes:

> Eric Abrahamsen <eric@ericabrahamsen.net> writes:
>
>> Does that actually come out of mairix? Any clue why that's in there?
>
> I think it comes from mairix.  When I run
>
> |  micha> mairix -r b:emacs
>
> I get an output like
>
> | /home/micha/Mail/archive//sent/8383
> | /home/micha/Mail/archive//sent/8391
> | ...
>
> Without the -r arg ("raw output"), mairix fills a folder with symlinks.
>
> That folder looks like
>
> |  /home/micha/mairix:
> |  drwxr-xr-x   2 micha micha 120K Feb 14 23:42 .
> |  drwxr-xr-x 195 micha micha  60K Feb 14 23:42 ..
> |  lrwxrwxrwx   1 micha micha   35 Feb 14 23:42 10002 -> /home/micha/Mail/archive//sent/2876
> |  lrwxrwxrwx   1 micha micha   35 Feb 14 23:42 10005 -> /home/micha/Mail/archive//sent/2879
>
> Visiting these symlinks succeeds, surprisingly, in Emacs, and in
> Dolphin.  Is this double-slash syntax in symlink targets something
> special or some kind of error that is just ignored?

I guess it isn't symlink specific, since it's part of mairix's raw
output, too.

I was also surprised to see that Emacs handles a path like that just
fine. Looks like `directory-file-name' will remove as many trailing
slashes as you have on a filepath, and since that function gets used
somewhere inside most of the other filepath functions, it ends up
working.

Luckily `file-name-split' is one of those other functions, so instead of
doing gross regular expression munging I'll switch to using Science™ and
treat the path like an actual file name. Instead of adding cruft we can
fix your bug and make the whole thing more reliable at the same time.

(mapconcat #'identity
	   (remove "" (file-name-split f-name))
	   ".")

Maybe this will create more bugs, but let's see!

Hmm, maybe I'll float this on gnus.general first...





  reply	other threads:[~2022-02-14 23:08 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-14  3:37 bug#53989: 29.0.50; Gnus searches broken Michael Heerdegen
2022-02-14  4:23 ` Eric Abrahamsen
2022-02-14  4:59   ` Michael Heerdegen
2022-02-14  5:19     ` Michael Heerdegen
2022-02-14  6:06       ` Eric Abrahamsen
2022-02-14 22:11       ` Eric Abrahamsen
2022-02-14 22:41         ` Eric Abrahamsen
2022-02-14 23:06           ` Michael Heerdegen
2022-02-14 23:22             ` Eric Abrahamsen
2022-02-14 22:49         ` Michael Heerdegen
2022-02-14 23:08           ` Eric Abrahamsen [this message]
2022-02-14 23:21             ` Michael Heerdegen
2022-02-14 23:24               ` Eric Abrahamsen
2022-02-14 23:31                 ` Michael Heerdegen
2022-02-14 23:35                   ` Eric Abrahamsen
2022-02-14 23:40                   ` Michael Heerdegen
2022-02-14 23:45                     ` Eric Abrahamsen
2022-02-15  0:37                       ` Andreas Schwab
2022-02-15  1:29                         ` Eric Abrahamsen
2022-02-15  2:48                       ` Michael Heerdegen
2022-02-15  3:45                         ` Eric Abrahamsen
2022-02-15  4:20                           ` Michael Heerdegen
2022-02-15 23:23                             ` Eric Abrahamsen
2022-02-18  2:10                               ` Michael Heerdegen
2022-02-18 16:01                                 ` Eric Abrahamsen
2022-02-19  1:07                                   ` Michael Heerdegen
2022-02-19  1:20                                     ` Eric Abrahamsen
2022-02-19  1:29                                       ` Michael Heerdegen
2022-02-14  6:05     ` Eric Abrahamsen

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=87ee45gi6j.fsf@ericabrahamsen.net \
    --to=eric@ericabrahamsen.net \
    --cc=53989@debbugs.gnu.org \
    --cc=michael_heerdegen@web.de \
    /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.