From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eric Abrahamsen Newsgroups: gmane.emacs.bugs Subject: bug#53989: 29.0.50; Gnus searches broken Date: Mon, 14 Feb 2022 15:08:36 -0800 Message-ID: <87ee45gi6j.fsf@ericabrahamsen.net> References: <874k52i0ef.fsf@web.de> <87v8xijcuo.fsf@ericabrahamsen.net> <875ypicac2.fsf@web.de> <871r06c9ed.fsf@web.de> <874k51hzey.fsf@ericabrahamsen.net> <874k51qd1k.fsf@web.de> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="21443"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: 53989@debbugs.gnu.org To: Michael Heerdegen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Feb 15 00:09:46 2022 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 1nJkTZ-0005Q1-0K for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 15 Feb 2022 00:09:45 +0100 Original-Received: from localhost ([::1]:34346 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nJkTW-0008KY-E3 for geb-bug-gnu-emacs@m.gmane-mx.org; Mon, 14 Feb 2022 18:09:42 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:48906) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nJkSs-0008Jn-9T for bug-gnu-emacs@gnu.org; Mon, 14 Feb 2022 18:09:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:49058) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nJkSr-0006DG-WD for bug-gnu-emacs@gnu.org; Mon, 14 Feb 2022 18:09:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nJkSr-00017J-SE for bug-gnu-emacs@gnu.org; Mon, 14 Feb 2022 18:09:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eric Abrahamsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 14 Feb 2022 23:09:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 53989 X-GNU-PR-Package: emacs Original-Received: via spool by 53989-submit@debbugs.gnu.org id=B53989.16448801274271 (code B ref 53989); Mon, 14 Feb 2022 23:09:01 +0000 Original-Received: (at 53989) by debbugs.gnu.org; 14 Feb 2022 23:08:47 +0000 Original-Received: from localhost ([127.0.0.1]:42955 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nJkSc-00016p-QY for submit@debbugs.gnu.org; Mon, 14 Feb 2022 18:08:47 -0500 Original-Received: from mail.ericabrahamsen.net ([52.70.2.18]:48212) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nJkSa-00016b-Mp for 53989@debbugs.gnu.org; Mon, 14 Feb 2022 18:08:45 -0500 Original-Received: from localhost (97-126-64-167.tukw.qwest.net [97.126.64.167]) (Authenticated sender: eric@ericabrahamsen.net) by mail.ericabrahamsen.net (Postfix) with ESMTPSA id CD33BFA08F; Mon, 14 Feb 2022 23:08:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ericabrahamsen.net; s=mail; t=1644880118; bh=+rYEUvkwDB589/Ou2jq65UCKi9nYfeIJ56/MOSPW/ec=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=wbRkQ2Hxb2FmGUeydAgHHJh2NOci8NwCBezmZ7l3MNXWMjXWTTpyxOYR/ctEQnUUW 3+etPkJ7tdQLwh9y5QB2oJXcqd8PN5/gtkCCyxiLsxp6Dh08sxtDbPK7xt4sHlVKg+ xr3D0BPx9o36zTWyOK1xSLwBgYh1nj1ZIxrWLLSg= In-Reply-To: <874k51qd1k.fsf@web.de> (Michael Heerdegen's message of "Mon, 14 Feb 2022 23:49:27 +0100") 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" Xref: news.gmane.io gmane.emacs.bugs:226936 Archived-At: Michael Heerdegen writes: > Eric Abrahamsen 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=E2=84= =A2 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...