From debbugs-submit-bounces@debbugs.gnu.org Thu Dec 07 08:46:43 2023 Received: (at submit) by debbugs.gnu.org; 7 Dec 2023 13:46:43 +0000 Received: from localhost ([127.0.0.1]:41363 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rBEiB-0005qI-85 for submit@debbugs.gnu.org; Thu, 07 Dec 2023 08:46:43 -0500 Received: from lists.gnu.org ([2001:470:142::17]:46668) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rBEi6-0005px-5l for submit@debbugs.gnu.org; Thu, 07 Dec 2023 08:46:41 -0500 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 1rBEhj-0004dt-RB for bug-gnu-emacs@gnu.org; Thu, 07 Dec 2023 08:46:20 -0500 Received: from mout.gmx.net ([212.227.17.22]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rBEhh-0003SM-Ii for bug-gnu-emacs@gnu.org; Thu, 07 Dec 2023 08:46:15 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.de; s=s31663417; t=1701956769; x=1702561569; i=grfz@gmx.de; bh=7ZYHs4RUfxnWsKWgF9bNM7xPY9X5fQwu4Tzpr46OLzc=; h=X-UI-Sender-Class:From:To:Subject:Date; b=btJJpCmCZbxJelgmDfn3uqKGE9Fe81lpG+GY53rllY9h369ejC6DE3vsVzGOERcV 4xNK0r+Y5hXr4kIbS2VP4NrCwE1xNqbT93wtaikMV4hfo32s4dyZu0xP+4E3DzVD0 u+azMgVCbxYFdRZC8Ms1XOsV9scTkeiwIiVxH4t3SQfJqNUdHQMZz8s29WZHnKz4X jZiR0H5QMnjYkwvorw1grh7kLJSgzy7nP0RdrufoK4yVl1rBfv9+BUMluCGFz3rgq JWMWRH/tlUpGFoVdnrKGy5xOzn7LTYklEMejkWSYac1UBXOgAWzfcjcQ5/EswZqGG Ar5+Ipt8VovzpB+hBw== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from localhost ([95.90.236.232]) by mail.gmx.net (mrgmx105 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MJE27-1qw2R82zpD-00KjVP; Thu, 07 Dec 2023 14:46:09 +0100 From: Gregor Zattler To: bug-gnu-emacs@gnu.org Subject: 30.0.50; ffap prepends buffers default-directory to guessed file name in case of tramp's file name syntax Date: Thu, 07 Dec 2023 14:45:34 +0100 Message-ID: <87r0jy3z41.fsf@no.lan> MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K1:wve3LSJS/v0vz6WX3CKE62XtFbB43k+2dwK5DeoGieTsCKJA77I Ph5/dtmw49zjP6Urbd+tLOsCh9yPaQcRc14fvt9tXkcIPLOE97gBg9KyScqJtfyMkfhIKcq dCyJow0qHkfz5MGWybEgo1iFL4DV/OBo8uwfdw26zKd62ori+UqyEGmPqGVyzCH4UAEvLlT sBDiESoDKhWxGeH+3X6OA== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:1zvZhOmU/Aw=;bcPVxc1jm1YqetsuRrXClghLYEP wYlZwbLOROVoJZJekGwEm9+eB0+BDLDm/TMSg+eYq1QJhZ1hxoZRu5YSq/LA3/xT4OzmIOVEK Q8gubalVecA544F7XitvM/OQB6SulnZKDamEZC5lboPNOGdqPqm7TkFrqKzgqFGXE1T3cIOEU 74HJLibvPxlBaJfIELxwIwlLqDnCxJobNoNn1X7olWN7qSEPStsnTYsmQCDiXJMb32CdzwhYW Bu9BY0541Yued6obGkmNFr6mEn61F0KRJW6ZR1HzBwjPZ8DB42v1aqD9VzabGF4hzyRTOD4js Ig7YGTf3hK73C+IW5DcPJjNS9Cx6hmrKoxEhuEFqUfH3/Xb8UG5bqDcbd3d+xEpieitT3Cfo2 vm27prspPGI7XEUIZGZnwVoj/VVduTOoY7DYpD5CEd3Sx92JMT7I0YIjgLP75UiJaKsT2EXlu 15GECUt7yJgbKSlu45oJ0Jsvjx1FTyti6/Lw+kykJfB/5aS0xwnsOIp5vnzitSOtr5M/Nfk0L 6a9fMnAkpsF+G7g51rQmSzk40HvZ+10MA2Ru+Jx4wSuZb/BIKaspewewBBicKn6iRyKwqsEgm KGTyacrl2ukeB3/8fb6DTNnc1rpgWfznHWUSsPGVaTHCTZMJdkEBQm4c1i42/FLf3TcZ91Par BTSucNLBrONpyIXP8zbp8W073Br8nfAM8UlWzGI5EapiuoQgaaB88dMHoZxErKnYeaRLG/OIF lxUI0P+xISqRho0xtzFyp5L7EqT4kOcZU/LRaojnDT4PfqdtyOhQhaUAOFdJir4tbUWa666SS XPARiDPPDars+v1yM9Xv/ZZSCiA25OvnBSs2x8XpSMkd+LLxBIbV9JUOMuHtkG8A5qAn2gJF6 WPOjh22XW8yyVrkfks8nu8F7lpygaKKm2h+MXKzzMd0YACcPECDJYaSP4IRHOfVzOd+U9Q7vz 2JCZ6w== Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=212.227.17.22; envelope-from=grfz@gmx.de; helo=mout.gmx.net X-Spam_score_int: 5 X-Spam_score: 0.5 X-Spam_bar: / X-Spam_report: (0.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_SBL_CSS=3.335, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-Spam-Score: 4.5 (++++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Dear Emacs developers, following this recipe (in some Gnu/Linux shell): $ cd /tmp tmp$ emacs -Q -nw # type /ssh:user@server:/home/test # type M-x ffap RET the proposed file name in minibuffer then is: /tmp/ssh:user@server:/home/test instead of /ssh:user@server:/home/test Content analysis details: (4.5 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (grfz[at]gmx.de) -0.0 SPF_HELO_PASS SPF: HELO matches SPF record 1.0 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) 3.6 RCVD_IN_SBL_CSS RBL: Received via a relay in Spamhaus SBL-CSS [95.90.236.232 listed in zen.spamhaus.org] -0.0 T_SCC_BODY_TEXT_LINE No description available. 0.0 SPOOFED_FREEMAIL No description available. X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 3.5 (+++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Dear Emacs developers, following this recipe (in some Gnu/Linux shell): $ cd /tmp tmp$ emacs -Q -nw # type /ssh:user@server:/home/test # type M-x ffap RET the proposed file name in minibuffer then is: /tmp/ssh:user@server:/home/test instead of /ssh:user@server:/home/test Content analysis details: (3.5 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 3.6 RCVD_IN_SBL_CSS RBL: Received via a relay in Spamhaus SBL-CSS [95.90.236.232 listed in zen.spamhaus.org] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (grfz[at]gmx.de) -0.0 SPF_HELO_PASS SPF: HELO matches SPF record 1.0 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) -0.0 T_SCC_BODY_TEXT_LINE No description available. -1.0 MAILING_LIST_MULTI Multiple indicators imply a widely-seen list manager Dear Emacs developers, following this recipe (in some Gnu/Linux shell): $ cd /tmp tmp$ emacs -Q -nw # type /ssh:user@server:/home/test # type M-x ffap RET the proposed file name in minibuffer then is: /tmp/ssh:user@server:/home/test instead of /ssh:user@server:/home/test Therefore it's not possible to just hit RET in order to open that file. But that would be nice. Thanks for your attention, Gregor In GNU Emacs 30.0.50 (build 1, x86_64-pc-linux-gnu, cairo version 1.16.0) of 2023-12-02 built on no Repository revision: fb4b0b30a24e8192e71c1425dc8a295cf39f64ff Repository branch: HEAD Windowing system distributor 'The X.Org Foundation', version 11.0.12101007 System Description: Debian GNU/Linux 12 (bookworm) Configured using: 'configure --infodir=3D/usr/share/info/emacs --with-json --with-file-notification=3Dyes --with-libsystemd --with-cairo --with-x=3Dyes --with-x-toolkit=3Dno --without-toolkit-scroll-bars --without-gsettings --enable-checking=3Dyes,glyphs --enable-check-lisp-object-type --with-native-compilation 'CFLAGS=3D-g3 -O3 -ffile-prefix-map=3D/home/grfz/src/emacs-master--fb4b0b30a24e8192e71c1425= dc8a295cf39f64ff--2023-12-02T22-47+01-00=3D. -fstack-protector-strong -Wformat -Werror=3Dformat-security '' Configured features: ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM HARFBUZZ JPEG JSON LCMS2 LIBOTF LIBSELINUX LIBSYSTEMD LIBXML2 M17N_FLT MODULES NATIVE_COMP NOTIFY INOTIFY OLDXMENU PDUMPER PNG RSVG SECCOMP SOUND SQLITE3 THREADS TIFF WEBP X11 XDBE XIM XINPUT2 XPM ZLIB Important settings: value of $LC_ALL: value of $LC_COLLATE: de_DE.utf8 value of $LC_CTYPE: de_DE.utf8 value of $LC_MESSAGES: POSIX value of $LC_MONETARY: de_DE.utf8 value of $LC_NUMERIC: de_DE.utf8 value of $LC_TIME: de_DE.utf8 value of $LANG: de_DE.utf8 locale-coding-system: utf-8-unix From debbugs-submit-bounces@debbugs.gnu.org Thu Dec 07 09:33:59 2023 Received: (at 67688) by debbugs.gnu.org; 7 Dec 2023 14:33:59 +0000 Received: from localhost ([127.0.0.1]:41383 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rBFRu-0007Jh-Og for submit@debbugs.gnu.org; Thu, 07 Dec 2023 09:33:59 -0500 Received: from mout.gmx.net ([212.227.17.20]:42805) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rBFRr-0007JR-SV for 67688@debbugs.gnu.org; Thu, 07 Dec 2023 09:33:57 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=s31663417; t=1701959617; x=1702564417; i=stephen.berman@gmx.net; bh=3xFdNVHlGIvShU/DEHLqdEA3IuyasAOJSORnInp/v00=; h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References: Date; b=HWtLd+aEsV9yawWeIkT84alK12v8PeOyh7XbjLQBxv4ZH+Rk4BPS84dp4pgpUOtX PetYqqHRdp2jhVKBqCxwGJkgJ2CZhRMTdzMemKk0qXL1SW4pdk49j9jV2frC1sVDw pUpkxVOOcN7dnf+hiYcJNqy03t1WdY/1DvGfzmAyNQ3TrvCP5+rcdDHYeQ/48X1n9 xHcpeKCg5T5G3AJ9dJlNe3HQ9X2Lc2Euq3j1uRD4vsi0KL/b5CREH/Ey1BCq27bwT o7HYeHfjoRip2rSbp/iPvw1g4n7FM+uth4572sAxFNYM5R2j0jP2KnQhOlXJ/kzno zIiwj7Pgwc5gNyiyfg== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from strobelfs2 ([94.134.196.238]) by mail.gmx.net (mrgmx105 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MIdeX-1qyszN415R-00EZfn; Thu, 07 Dec 2023 15:33:37 +0100 From: Stephen Berman To: Gregor Zattler via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Subject: Re: bug#67688: 30.0.50; ffap prepends buffers default-directory to guessed file name in case of tramp's file name syntax In-Reply-To: <87r0jy3z41.fsf@no.lan> (Gregor Zattler via's message of "Thu, 07 Dec 2023 14:45:34 +0100") References: <87r0jy3z41.fsf@no.lan> Date: Thu, 07 Dec 2023 15:33:36 +0100 Message-ID: <87il5ajd4v.fsf@gmx.net> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K1:xFO7qaeU9imvjbYIKmp35v+eCHua0h0O4+aWLXXyx9Mc6I39IMO DmzMs2J+DCkNRgNDb371O9rL7Q1hsF4f5G8WpX4nfW3aheCdiBI+ZZpM0hxmAPzM4mYXI3Q nfHF03/ysXPWU+uJKT+CdhJ1GSv/zL1/dRv4FLz/XU5EVe9u6wDex38y1YFVZh7Nxm6z96E sBRsUUk/fmyFAqZ2nwIBA== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:BeYTa2QcLqs=;KODfyfrmqXB04q5pkc5GThfBKEj 03cIDQCk8ISbmkEy5z0vs5xfOX/0HL2T/2RrpcVwIffucaecQjZhyhhxjmd7SS3V3i+YCbf97 pnwrN61hfE9ovHPzE0MVwbELtSyhbwJWCwhUntNjYo30sub9zNJEVyzQI4jCtes7cGZcN+qPB zA7G10yEbtBodCpWd5TzJ0Ru20iH5uwkqvFoLCynPst7M4N6m2uiP3u08t3gbZH6kmdSbpgXc C1NwQIyWjNh71qXMurVNjZY5Twm0Gs9mOnokeS9MGZPu0oLmKA6S7jrV7Yg3XtlL5iRxrHIAI 4Bq42FRQnzUcTetLKYRH3bBg+Y5WR0gJBvKijL84ma6/NIxgEIBE0ZysM6lqfotejEF4vIibS 2L5xRXWopTob7Vd7L812/OXixkq78Neg21Z4A3yKqhaMv2UqQ2B7EiLc/a4F9Znr8AhADD0p2 enekqrGH+QoiCUf+KnZyA7DPRDbTPwmwMivtmEQ+y28HE/6zeqgDez3WSOthLzWcp2Js+CIlO 8o/pV117HB9Td5tynKPc+7riGbBD+yI9Vquu7+vTWW+6sNkr1TdXO3FFTtPWd/+0mBMDG4i1k +4MWku7dYelf3u5o8hByV9HiNqUtwVoQ+rPr75ebXZ1ZlEznKKhSspueCO0//W/S4oyk5Y/r6 G1dagqh7cs+t2VbtUqOWy+5FX0fr7/OghPf5Pl8Ia9jeAuMqO8akNqCG2glErZH0F3vMXJ8pD Goep+6Yf/CymtUdi/HQ2aE2BiENkL3MWYu0l0VULKLH9HxswFIAaA5mjuCFcd21wDOw6CrQNh DwJQ8lCAvksZ63ALQZIFP4vHQ5Ms8z5juEon5U/sCh6HwpqMWwOf8TsM8dSJ0QN7DZZMM6G8Q CUVVQS+Rw8OhJC84iSbbKnXgjW8G2w2Fy1DVOKZKOmoWnmiaolkeQbugKWNTaqkFWGsBA97oq eAy2BTDnBNHdDZURKx27P7GZ/Aw= X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 67688 Cc: Gregor Zattler , 67688@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) On Thu, 07 Dec 2023 14:45:34 +0100 Gregor Zattler via "Bug reports for GNU Emacs, the Swiss army knife of text editors" wrote: > Dear Emacs developers, following this recipe (in > some Gnu/Linux shell): > > $ cd /tmp > tmp$ emacs -Q -nw > # type /ssh:user@server:/home/test > # type M-x ffap RET > > the proposed file name in minibuffer then is: > /tmp/ssh:user@server:/home/test > instead of > /ssh:user@server:/home/test > > Therefore it's not possible to just hit RET in order > to open that file. But that would be nice. I see the same thing if the cursor is anywhere in that line after the first `/', but if the cursor is on the first `/', then for me `M-x ffap RET' does enter "/ssh:user@server:/home/test" into the minibuffer. Steve Berman From debbugs-submit-bounces@debbugs.gnu.org Fri Dec 08 09:36:47 2023 Received: (at 67688) by debbugs.gnu.org; 8 Dec 2023 14:36:47 +0000 Received: from localhost ([127.0.0.1]:44256 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rBbyB-0005Lv-0h for submit@debbugs.gnu.org; Fri, 08 Dec 2023 09:36:47 -0500 Received: from mout.gmx.net ([212.227.15.19]:54087) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rBby8-0005LU-I6 for 67688@debbugs.gnu.org; Fri, 08 Dec 2023 09:36:46 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.de; s=s31663417; t=1702046185; x=1702650985; i=michael.albinus@gmx.de; bh=BxgSJZp4dPcG+F+FkoGg+LffX3UWqA+NiAXGwc9JFw4=; h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References: Date; b=D/pp44i4vUnk1dtZTEF36i/2YvuIqctWlci797FNmi8X0S2nIUgknhjCNjpGU+Xi IN1AbaA6pI+SZtc02gDCPLzt/etjnlAbKpKdDEmTwOjrrfdx3sFXU0wYwqfV19yL5 fTMV2YTyF13OlUBQZGKI0mMLsPP2gEayc1fN/xzqP4gcxulJZE2hRyJ+KA6fzAN+g zkri1LH9ykhGwIijnXpQFSBNM2+FDN+O/fXQUlFKrd/ZoXGVBabbxfAx5Wp+wkDE4 YW6mRS8TkOAXuWU56nvmAf6Ap0XHMTcTIOOwQ6nueRcVtlabjX11wkZZ0RXNgjSH/ dzo+iUUX2laz+nsgMQ== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from gandalf.gmx.de ([185.89.39.3]) by mail.gmx.net (mrgmx005 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MlNpH-1rf8DM1PLx-00lmnC; Fri, 08 Dec 2023 15:36:25 +0100 From: Michael Albinus To: Gregor Zattler via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Subject: Re: bug#67688: 30.0.50; ffap prepends buffers default-directory to guessed file name in case of tramp's file name syntax In-Reply-To: <87r0jy3z41.fsf@no.lan> (Gregor Zattler via's message of "Thu, 07 Dec 2023 14:45:34 +0100") References: <87r0jy3z41.fsf@no.lan> Date: Fri, 08 Dec 2023 15:36:24 +0100 Message-ID: <87fs0cg3rr.fsf@gmx.de> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K1:N8O2HqJIsX6JGILUBB3WAQTJkFa0vaphV+8FCJLb5P1R8vHsI5N 3E/oMCIvqwIoEuNy5GsTaUZSNBuMCQzFDebZkTaPEHMQqQzoDx8aIZ2X95U5C5sRlDJSuf/ D826uvN9p7EeOdQgdvdhS/ETE+KW6z+JVJsf9hFfqxZq2r157lSE4aX3FjObWd8+SK32Epb EjQSsW5tULmlRtddp4mog== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:7vVQ38onU9I=;CeDo/yn2/bLrHLxA8ajrz3IBIR6 XUFFVtQpSDBuVUL0zgbj7kHhqwUEy4IBOGOizl9djrSXIEo9SP/zHRMntvyhdPXVZN4uQTjcp aXL8eGShIrXFwAROaYgDgMjJkAJ7ZEHiCsDGwEMblgTcNFEe621qwUqxjou6wg3whcB65+Qlu vN9Rm3dNMr4ZGElKD+6/fWuEW02VWzvhj7wWSmhHxT8HyHTJgJuM1TiCpgV2GgRoO+KzmZyqm A99fg6RD9yMliGcwqg/pQ9a3Vg/tdXUNaTprfH/DCh+yu58sPyMjR4BrsD4Xkhqq7uZmBtGCV KzN0wB+9XmvL/Zf29ZyfIQG5zq2IHtfGFVP3GYuknpuJ3/mHGGLcoN+4hR38ilQaTaIMnCnLN HM5D1Z7aqkrYbcyHL96u/M+kYqZF5pTMZ9muIdZPqCjPS1e+WgebMJusVAMhF4RjfhIjFXUq8 KzGoFTem7EYEKi3PciD1Q886ocKlfpbm+sxGuiu+krCoCiKRZzazUOJC/G6F3plzQa2lyFtB9 iGfgitufnEtX8RF8oJYsQY6MpMcwefZLSPD232z/juie1SywmIRArABWj4vEAoyIIRYbpSomI CvP0yYBuT8s8EIumQTFFq6vAKDrIj9u1ac88U5Kl1HBWdSl+y5E6ULbp104EhdlPsCIM5xs8/ el97QsI7yhw6VtoJV9FiXecxJs/rESK+cHveTCsUr2VMWSngvhoTYukrh58HInmv+OvuEz8r4 k1iz7QTqgh4XATz9H7Do/HvwLFRAKkzuJ5J1vhWz+xdC3Q7YxXHyKPXzqcSDFjx0DdW0laXEd dUWg6OIxJCtxvuyZPM4c+0lalJsB9gXzGQoQmt029+wtHgvNhIRzDx3tJRXbhZeTmOq45K7LG Ha2coMHjO21k6mOSrw3YmrhTmG6rp05+PUxuvxNB3MB9IXGY9bBJxGYL8NUP38RImeoSsSaSU PEUiLA== X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 67688 Cc: Gregor Zattler , 67688@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) Gregor Zattler via "Bug reports for GNU Emacs, the Swiss army knife of text editors" writes: > Dear Emacs developers, Hi Gregor, > following this recipe (in > some Gnu/Linux shell): > > $ cd /tmp > tmp$ emacs -Q -nw > # type /ssh:user@server:/home/test > # type M-x ffap RET > > the proposed file name in minibuffer then is: > /tmp/ssh:user@server:/home/test > instead of > /ssh:user@server:/home/test > > Therefore it's not possible to just hit RET in order > to open that file. But that would be nice. I can reproduce the behavior for all Emacsen down to Emacs 25 (the oldest I have a running copy of), so I guess it didn't work ever. The problem is, that `ffap-guesser' returns "ssh:user@server:/home/test", which looks like a relative file name. Therefore, it is expanded to the default directory "/tmp/". I have no idea about ffap.el and thingatpt.el, so I fear I cannot do too much. Somebody else who knows these libraries might fix it. > Thanks for your attention, Gregor Best regards, Michael. From debbugs-submit-bounces@debbugs.gnu.org Tue Dec 12 09:54:19 2023 Received: (at 67688) by debbugs.gnu.org; 12 Dec 2023 14:54:19 +0000 Received: from localhost ([127.0.0.1]:55626 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rD49L-00070R-Fa for submit@debbugs.gnu.org; Tue, 12 Dec 2023 09:54:19 -0500 Received: from mail-pg1-x541.google.com ([2607:f8b0:4864:20::541]:43148) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rD49H-00070D-Uz for 67688@debbugs.gnu.org; Tue, 12 Dec 2023 09:54:17 -0500 Received: by mail-pg1-x541.google.com with SMTP id 41be03b00d2f7-5c66b093b86so5076864a12.0 for <67688@debbugs.gnu.org>; Tue, 12 Dec 2023 06:54:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1702392834; x=1702997634; darn=debbugs.gnu.org; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=hzaWSo1yGGEkKB0XJrzac6iHw78ZqxwK6nS7Yw+3Z4M=; b=RzQkoPMZChpy1C7LaNaxwpZVh13ewzE4nv2Poc3EAztfKbMIbMiXbvcvCLsVRrH4sS 3ZkBDLUpvLSxdF4vz7liAH54L5lmc/W0eVpKkfnvZOcspMPWpeRerUhSzR4JFNK5PMA6 Vct43VTH5upQL454VPQFuatAie0RQvxzX0HUeh1sy8PoWn/JZBttrttLt/kuDl5kI5nd ZCx5bAYITI00iLW00CsNKMFFMd/27R2LB4gOZ4ZJzrlbEKcRpWdMgNMu9TcSAAPWJtdF JyBEfu36ZxDbIobtJZDGLd2tOSN/JvE1uy9RYzF07YGy9ResRpBQfP34wMYlxOUdzyqH iWYA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702392834; x=1702997634; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=hzaWSo1yGGEkKB0XJrzac6iHw78ZqxwK6nS7Yw+3Z4M=; b=siYl/EHTo9olLMvgkKxSaTjKjH5KiizimWw0BclmM577yNxYgZ086IjL/z0Onuw/oF X20PY/XvqKIbtIcD63uAf8mbwQSs0dkDLhX3VFbvseIVJg0+whuGcG7x5MZhv518Hmj+ tEL+N47ZaMZ8G9PR0/fgg61Kae70mb8cmTmn8q+RCGTTE9S84jCDOUOXxiDPysYfH/1a id9nKNklhS7rkkInUy6D4pHue0XyD63RZ+wJZCVjyr+6v30MLv/5mQ6V5KxMpMW8y1Tl Bvk+H74zy/rYO437I/WyLHdGCn0HqHW0qH+LNBFhC4iCjyYW3aixebo9DmOhOcz02DJ7 uZ7Q== X-Gm-Message-State: AOJu0YzgnsZYyXyzw91YT6Gveb6lcPEElB6EAPjO2OsJTjkyrf+YkH/9 F7zbrQESx0E3G+LvlE+5wyk= X-Google-Smtp-Source: AGHT+IHkXh4k/T+t14zS/DouzFma0mXswzWCDIs00Xn/F5hsZFMmJd+Po9RtA1XDAwSlI3JEaE5mOQ== X-Received: by 2002:a17:90b:23c4:b0:286:6cc0:62b2 with SMTP id md4-20020a17090b23c400b002866cc062b2mr6658062pjb.49.1702392834349; Tue, 12 Dec 2023 06:53:54 -0800 (PST) Received: from localhost ([49.204.128.180]) by smtp.gmail.com with ESMTPSA id pf6-20020a17090b1d8600b0028658c6209dsm10627338pjb.2.2023.12.12.06.53.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Dec 2023 06:53:53 -0800 (PST) From: Visuwesh To: Michael Albinus Subject: Re: bug#67688: 30.0.50; ffap prepends buffers default-directory to guessed file name in case of tramp's file name syntax In-Reply-To: <87fs0cg3rr.fsf@gmx.de> (Michael Albinus's message of "Fri, 08 Dec 2023 15:36:24 +0100") References: <87r0jy3z41.fsf@no.lan> <87fs0cg3rr.fsf@gmx.de> Date: Tue, 12 Dec 2023 20:23:51 +0530 Message-ID: <871qbrtqtc.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 67688 Cc: grfz@gmx.de, 67688@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) [Friday December 08, 2023] Michael Albinus wrote: > Gregor Zattler via "Bug reports for GNU Emacs, the Swiss army knife of > text editors" writes: > >> Dear Emacs developers, > > Hi Gregor, > >> following this recipe (in >> some Gnu/Linux shell): >> >> $ cd /tmp >> tmp$ emacs -Q -nw >> # type /ssh:user@server:/home/test >> # type M-x ffap RET >> >> the proposed file name in minibuffer then is: >> /tmp/ssh:user@server:/home/test >> instead of >> /ssh:user@server:/home/test >> >> Therefore it's not possible to just hit RET in order >> to open that file. But that would be nice. > > I can reproduce the behavior for all Emacsen down to Emacs 25 (the > oldest I have a running copy of), so I guess it didn't work ever. You were quite close. That was when ffap-lax-url was set to t, previous versions would have done the right thing I think. > The problem is, that `ffap-guesser' returns "ssh:user@server:/home/test", > which looks like a relative file name. Therefore, it is expanded to the > default directory "/tmp/". > > I have no idea about ffap.el and thingatpt.el, so I fear I cannot do too > much. Somebody else who knows these libraries might fix it. With the default value of ffap-lax-url=t, thing-at-point-bounds-url-at-point does not check the scheme of the url so it ends up matching ssh:user@server alone. With the nil value, ffap correctly suggests /ssh:user@server:/home/test because the correct scheme is ssh:// not ssh:. But with ffap-lax-url=nil, you lose the ability to insert mailto:user@host when the point is on user@host because it is not a "well-formed" url [1] and thusly does not get picked up by thing-at-point-url-at-point. I hope my explanation is understandable. I'm not sure what to do here frankly. Hmm... looking at the region history for the defcustom, it was changed to t by Eli for bug#25264: the user wanted the email address like user@host to be matched by ffap. I suppose we can try to see if the point is on an email address in ffap-guesser after URL and filename guesses, then we can turn ffap-lax-url back to nil and everyone will be happy. 1. See thing-at-point--bounds-of-well-formed-url. From debbugs-submit-bounces@debbugs.gnu.org Tue Dec 12 10:11:55 2023 Received: (at 67688) by debbugs.gnu.org; 12 Dec 2023 15:11:55 +0000 Received: from localhost ([127.0.0.1]:57197 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rD4QM-0007pT-Kg for submit@debbugs.gnu.org; Tue, 12 Dec 2023 10:11:55 -0500 Received: from mail-pf1-x441.google.com ([2607:f8b0:4864:20::441]:53587) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rD4QL-0007pC-5W for 67688@debbugs.gnu.org; Tue, 12 Dec 2023 10:11:53 -0500 Received: by mail-pf1-x441.google.com with SMTP id d2e1a72fcca58-6d089e8b1b2so1348588b3a.3 for <67688@debbugs.gnu.org>; Tue, 12 Dec 2023 07:11:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1702393892; x=1702998692; darn=debbugs.gnu.org; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=4LkBl0wlKoVjLJk0FK+r3TKMqsOULDo1MOjoBA77YII=; b=NT1W3GLSj5FZMKPeEUrDngLddkByfJ3nrV8JWkrD4Fs5v6I0zFVpT/pDH2Kad4OiJx x6VeAamf+2xlBb3Mj0QXRudtYyltyZbV0RUeLc6A/OJ/GP80tYHrJJiYjseYqMbNn1sh ASihzETJrZesVe1X+ZE7AM0Pfv+zgCcp5styCTaVAx6OSvY+jryAcvejj1vfHXleCTpo way2uNGikjq7+qaSqqXt6hRLKkfVrrGW4/uwfjgbX7Bclq7RgSHXkq4cTHFX12VXD16/ B0OO5/F78t1TiS/hlzpj0epiuH9F1HMKnrSg8+3N2xENphOx1YbfpvbTtX+wJgpmIrG0 g7XQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702393892; x=1702998692; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=4LkBl0wlKoVjLJk0FK+r3TKMqsOULDo1MOjoBA77YII=; b=t/9zbiUb45i0i4b/Xmlmcj+2BfdpHWNt0gPVNZes6DjofWoeAZ5sZBBNpIye/zDId7 pILmCbN4suw0M1zXpKl51H53QghR1KevyeZnVREEdD1TnZPKxaaNXTbhdLvP98avSSzC f021Om/gRXr5B/bk6FrAmz+nFyVfKgBc7U1dMg4d4Z4BJpSciLnlS7srMBlgeH0kx+Gj JbfSmvbimTGaP4MHZZAhxDs+LgkqDI/NRvZJ+LB80NhGIJFTipe3duG3lCM2HjOTX/lm QUkzAgIzEfKRfSu87yGE1+tRoEbLSQPCdzw6WOlWHbYF6oS2ycTxqwg4wrhd3tYF+9Ai ukrQ== X-Gm-Message-State: AOJu0YxJCTB2T3p7lHSsZfO06f/KwRxYcBQlm2pstnfYivIk1rmLGAb3 lmBfnDnzHJN0lsJucs79gcF0VVzLUKsk5w== X-Google-Smtp-Source: AGHT+IG6veFW/LjIvR+CWISydxqRTF/V4miCGPn2L5NJIulCxY8v0KacEg6LveVirXUTYyc9jtUu/g== X-Received: by 2002:a05:6a00:22c3:b0:6ce:3876:d730 with SMTP id f3-20020a056a0022c300b006ce3876d730mr3975234pfj.24.1702393891622; Tue, 12 Dec 2023 07:11:31 -0800 (PST) Received: from localhost ([49.204.128.180]) by smtp.gmail.com with ESMTPSA id a6-20020aa78e86000000b006cb6119f516sm8200378pfr.163.2023.12.12.07.11.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Dec 2023 07:11:31 -0800 (PST) From: Visuwesh To: Michael Albinus Subject: Re: bug#67688: 30.0.50; ffap prepends buffers default-directory to guessed file name in case of tramp's file name syntax In-Reply-To: <871qbrtqtc.fsf@gmail.com> (Visuwesh's message of "Tue, 12 Dec 2023 20:23:51 +0530") References: <87r0jy3z41.fsf@no.lan> <87fs0cg3rr.fsf@gmx.de> <871qbrtqtc.fsf@gmail.com> Date: Tue, 12 Dec 2023 20:41:28 +0530 Message-ID: <87wmtjsbfj.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 67688 Cc: grfz@gmx.de, 67688@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) [Tuesday December 12, 2023] Visuwesh wrote: > [Friday December 08, 2023] Michael Albinus wrote: > >> Gregor Zattler via "Bug reports for GNU Emacs, the Swiss army knife of >> text editors" writes: >> >>> Dear Emacs developers, >> >> Hi Gregor, >> >>> following this recipe (in >>> some Gnu/Linux shell): >>> >>> $ cd /tmp >>> tmp$ emacs -Q -nw >>> # type /ssh:user@server:/home/test >>> # type M-x ffap RET >>> >>> the proposed file name in minibuffer then is: >>> /tmp/ssh:user@server:/home/test >>> instead of >>> /ssh:user@server:/home/test >>> >>> Therefore it's not possible to just hit RET in order >>> to open that file. But that would be nice. >> >> I can reproduce the behavior for all Emacsen down to Emacs 25 (the >> oldest I have a running copy of), so I guess it didn't work ever. > > You were quite close. That was when ffap-lax-url was set to t, previous > versions would have done the right thing I think. > >> The problem is, that `ffap-guesser' returns "ssh:user@server:/home/test", >> which looks like a relative file name. Therefore, it is expanded to the >> default directory "/tmp/". >> >> I have no idea about ffap.el and thingatpt.el, so I fear I cannot do too >> much. Somebody else who knows these libraries might fix it. > > With the default value of ffap-lax-url=t, > thing-at-point-bounds-url-at-point does not check the scheme of the url > so it ends up matching ssh:user@server alone. With the nil value, ffap > correctly suggests /ssh:user@server:/home/test because the correct > scheme is ssh:// not ssh:. > But with ffap-lax-url=nil, you lose the ability to insert > mailto:user@host when the point is on user@host because it is not a > "well-formed" url [1] and thusly does not get picked up by > thing-at-point-url-at-point. I hope my explanation is understandable. > > I'm not sure what to do here frankly. > > Hmm... looking at the region history for the defcustom, it was changed > to t by Eli for bug#25264: the user wanted the email address like > user@host to be matched by ffap. I suppose we can try to see if the > point is on an email address in ffap-guesser after URL and filename > guesses, then we can turn ffap-lax-url back to nil and everyone will be > happy. > > 1. See thing-at-point--bounds-of-well-formed-url. I was thinking of the patch below. There is probably a better solution out there but I am not sure what other lax URL we will miss out by setting ffap-lax-url to nil. It feels like a hack though... diff --git a/lisp/ffap.el b/lisp/ffap.el index 530e3da182e..b8da1292d4f 100644 --- a/lisp/ffap.el +++ b/lisp/ffap.el @@ -152,7 +152,7 @@ ffap-url-unwrap-remote :group 'ffap :version "24.3") -(defcustom ffap-lax-url t +(defcustom ffap-lax-url nil "If non-nil, allow lax URL matching. The default non-nil value might produce false URLs in C++ code with symbols like \"std::find\". On the other hand, setting @@ -160,7 +160,7 @@ ffap-lax-url well-formed, such as \"user@host\" or \"\"." :type 'boolean :group 'ffap - :version "25.2") ; nil -> t + :version "30.1") (defcustom ffap-ftp-default-user "anonymous" "User name in FTP file names generated by `ffap-host-to-filename'. @@ -609,6 +609,13 @@ ffap-fixup-url ((and ffap-url-unwrap-remote (ffap-url-unwrap-remote url))) (url))) +(defun ffap-fixup-email (email) + "Clean up EMAIL and return it as a mailto: URL." + (when (stringp email) + (if (string-prefix-p "mailto:" email) + email + (concat "mailto:" email)))) + ;;; File Name Handling: @@ -1571,6 +1578,7 @@ ffap-guesser (ffap-fixup-url (or (ffap-url-at-point) (ffap-gopher-at-point)))) (ffap-file-at-point) ; may yield url! + (ffap-fixup-email (thing-at-point 'email)) (ffap-fixup-machine (ffap-machine-at-point)))) (defun ffap-prompter (&optional guess suffix) From debbugs-submit-bounces@debbugs.gnu.org Tue Dec 12 10:18:40 2023 Received: (at 67688) by debbugs.gnu.org; 12 Dec 2023 15:18:40 +0000 Received: from localhost ([127.0.0.1]:57209 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rD4Wq-00080Z-TQ for submit@debbugs.gnu.org; Tue, 12 Dec 2023 10:18:40 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:36634) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rD4Wo-00080K-UQ for 67688@debbugs.gnu.org; Tue, 12 Dec 2023 10:18:35 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rD4WT-0006QK-GB; Tue, 12 Dec 2023 10:18:13 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=ld9wg4TQh+6Biang00cXyFieJxnwWLxPiIAED6ftd/4=; b=sYloAVef/pRt 4kBj16JgWw10BNyin8HrxsmrhqdhIgeKHmWXoW8uZlAeEsILyGKwsYJyswSGN44CaYr8hjr9s52CZ /+6AcRkh9iGC1BVhhl8MZEhDggygI9bf2NlTtzEbci1v2eVFhKvNVEq+ORA3HYE0hGEQmJ9k63cGj 9LWURvVU/sxoyAWYyEqC8TxwN1iQDvPxRoK9jIcULGvXllwfe86X5Y2Oc1qtCGnVBFF+ugVwnbw1i hgmuEPJ6fOXWYJJqN052WgAJDrZLD+ne8iqVu7ZDYyIKi02GrsDealm+UqPGbahIBX7p6BjjAhiZ9 aowCWZ2GcRQMdj/63gNDaQ==; Date: Tue, 12 Dec 2023 17:17:47 +0200 Message-Id: <83jzpjtppg.fsf@gnu.org> From: Eli Zaretskii To: Visuwesh In-Reply-To: <87wmtjsbfj.fsf@gmail.com> (message from Visuwesh on Tue, 12 Dec 2023 20:41:28 +0530) Subject: Re: bug#67688: 30.0.50; ffap prepends buffers default-directory to guessed file name in case of tramp's file name syntax References: <87r0jy3z41.fsf@no.lan> <87fs0cg3rr.fsf@gmx.de> <871qbrtqtc.fsf@gmail.com> <87wmtjsbfj.fsf@gmail.com> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 67688 Cc: michael.albinus@gmx.de, grfz@gmx.de, 67688@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > Cc: grfz@gmx.de, 67688@debbugs.gnu.org > From: Visuwesh > Date: Tue, 12 Dec 2023 20:41:28 +0530 > > -(defcustom ffap-lax-url t > +(defcustom ffap-lax-url nil This change of the default requires a NEWS entry. Thanks. From debbugs-submit-bounces@debbugs.gnu.org Tue Dec 12 10:45:29 2023 Received: (at 67688) by debbugs.gnu.org; 12 Dec 2023 15:45:29 +0000 Received: from localhost ([127.0.0.1]:57256 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rD4wq-0000M5-RV for submit@debbugs.gnu.org; Tue, 12 Dec 2023 10:45:29 -0500 Received: from mail-pl1-x642.google.com ([2607:f8b0:4864:20::642]:56632) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rD4wo-0000Lq-Bu for 67688@debbugs.gnu.org; Tue, 12 Dec 2023 10:45:27 -0500 Received: by mail-pl1-x642.google.com with SMTP id d9443c01a7336-1d0c4d84bf6so33707355ad.1 for <67688@debbugs.gnu.org>; Tue, 12 Dec 2023 07:45:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1702395905; x=1703000705; darn=debbugs.gnu.org; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=iGier6f2EMpAhTYia4q4shjNv6pGXqpW5ULHCWxksT4=; b=RKliHTZP9lK8yRBvbNA7gcL4tlMpLK1JfcmB6S3Jh2iMV7NBK5rXVd9qKU3Ri9a2Y+ uOtpjmi07+ohkX0gX0+QujIjb86ccoOelf+NrxQNcEXA8TEihYE+qVldmbBpFwuNjNVY muT5do/bkqFBonFV3JL99WiOwHKJQjeLsGtdMGgXMvvWvb5Kx+nIprliRuuHJwre+WKK ohwBN2BLKvLGw6hy+JKkYQ3WpNXDKYyNaTwlt7a3pB/cqjEpeH/z33W0HI8p+ZtYidgl 9nRLJCYqN8/M8eAybAEIQ8v41OXqF1YTLa9t4qr+aqHhp7mJuGk5TY30K8KZeN3unWsI lF0Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702395905; x=1703000705; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=iGier6f2EMpAhTYia4q4shjNv6pGXqpW5ULHCWxksT4=; b=OANzH8+ARcOVpdokqrAsuMQbnjslnPbj+lkxBSNi+heToDmS9AEQq7z+V1RIhbGSst 641n7aBXUm7fvXECJjDKYFSPEJTMUpOdyLd7dCUtgOMI3Lg7AgMpMUlVqQX4kH5QzpQb yuM7U9j9nSoL0LJdZ2mhWIgz7Zs8MS09639ayc4qTUAughjoPyL2OI+tl8FBBgru5Q/j NFO+8o65Ilx1LrNcdKByLhBvm+8Wtb1WsaSau2byaZPHuUXRongHQozCAevpSVWyw6Nk yBRFfBtL6PUVquCVcq1+2meeQVdF6iHKYsPuVdWx3uo0is7LVMd91hj9JYiDWCM77Yrm IUUg== X-Gm-Message-State: AOJu0Ywr7ler6bE2HUMuV8T8LYLB7yNFdBs8/kFiBz2V+uljzzIJGYv6 ptKRpFZquPJ6irkQkJjJY4g= X-Google-Smtp-Source: AGHT+IGZ0L5PTfvb0ZYUhn1c1ZuDhfrN5llxFBBfOEZiI7mfR089xn7DOoi21kit2pL/0h0O7BGKsg== X-Received: by 2002:a17:903:41c1:b0:1d0:c6fd:3170 with SMTP id u1-20020a17090341c100b001d0c6fd3170mr3521076ple.75.1702395905146; Tue, 12 Dec 2023 07:45:05 -0800 (PST) Received: from localhost ([49.204.128.180]) by smtp.gmail.com with ESMTPSA id g14-20020a1709029f8e00b001d0d3795b25sm8773645plq.172.2023.12.12.07.45.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Dec 2023 07:45:04 -0800 (PST) From: Visuwesh To: Eli Zaretskii Subject: Re: bug#67688: 30.0.50; ffap prepends buffers default-directory to guessed file name in case of tramp's file name syntax In-Reply-To: <83jzpjtppg.fsf@gnu.org> (Eli Zaretskii's message of "Tue, 12 Dec 2023 17:17:47 +0200") References: <87r0jy3z41.fsf@no.lan> <87fs0cg3rr.fsf@gmx.de> <871qbrtqtc.fsf@gmail.com> <87wmtjsbfj.fsf@gmail.com> <83jzpjtppg.fsf@gnu.org> Date: Tue, 12 Dec 2023 21:15:02 +0530 Message-ID: <87plzbs9vl.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 67688 Cc: michael.albinus@gmx.de, grfz@gmx.de, 67688@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --=-=-= Content-Type: text/plain [Tuesday December 12, 2023] Eli Zaretskii wrote: >> Cc: grfz@gmx.de, 67688@debbugs.gnu.org >> From: Visuwesh >> Date: Tue, 12 Dec 2023 20:41:28 +0530 >> >> -(defcustom ffap-lax-url t >> +(defcustom ffap-lax-url nil > > This change of the default requires a NEWS entry. > > Thanks. I was waiting for review from others. Nevertheless, I have attached a proper patch. --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=0001-Make-ffap-correctly-guess-remote-file-names-at-point.patch >From d2775636e8468490ffba50df888f92000ef5286b Mon Sep 17 00:00:00 2001 From: Visuwesh Date: Tue, 12 Dec 2023 21:14:12 +0530 Subject: [PATCH] Make ffap correctly guess remote file names at point * lisp/ffap.el (ffap-lax-url): Set it to nil so that remote file names may be matched. (bug#67688) (ffap-fixup-email): New function. (ffap-guesser): Specially handle email addresses now that ffap-lax-url is nil as user@host fails to be matched as an email address with that setting. * etc/NEWS: Announce the new value of the defcustom. --- etc/NEWS | 5 +++++ lisp/ffap.el | 14 +++++++++++--- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/etc/NEWS b/etc/NEWS index 29f4e5c0b66..d4a15f08eae 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -258,6 +258,11 @@ called in the '--eval' expression, which is useful when those arguments contain arbitrary characters that otherwise might require elaborate and error-prone escaping (to protect them from the shell). +--- +** ffap-lax-url now defaults to nil. +Previously, it was set to ffap-lax-url to t but this broke remote file +name detection. + * Editing Changes in Emacs 30.1 diff --git a/lisp/ffap.el b/lisp/ffap.el index 530e3da182e..9cea11cf540 100644 --- a/lisp/ffap.el +++ b/lisp/ffap.el @@ -152,15 +152,15 @@ ffap-url-unwrap-remote :group 'ffap :version "24.3") -(defcustom ffap-lax-url t +(defcustom ffap-lax-url nil "If non-nil, allow lax URL matching. The default non-nil value might produce false URLs in C++ code with symbols like \"std::find\". On the other hand, setting this to nil will disable recognition of URLs that are not -well-formed, such as \"user@host\" or \"\"." +well-formed." :type 'boolean :group 'ffap - :version "25.2") ; nil -> t + :version "30.1") (defcustom ffap-ftp-default-user "anonymous" "User name in FTP file names generated by `ffap-host-to-filename'. @@ -609,6 +609,13 @@ ffap-fixup-url ((and ffap-url-unwrap-remote (ffap-url-unwrap-remote url))) (url))) +(defun ffap-fixup-email (email) + "Clean up EMAIL and return it as a mailto: URL." + (when (stringp email) + (if (string-prefix-p "mailto:" email) + email + (concat "mailto:" email)))) + ;;; File Name Handling: @@ -1571,6 +1578,7 @@ ffap-guesser (ffap-fixup-url (or (ffap-url-at-point) (ffap-gopher-at-point)))) (ffap-file-at-point) ; may yield url! + (ffap-fixup-email (thing-at-point 'email)) (ffap-fixup-machine (ffap-machine-at-point)))) (defun ffap-prompter (&optional guess suffix) -- 2.42.0 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Tue Dec 12 17:04:54 2023 Received: (at 67688) by debbugs.gnu.org; 12 Dec 2023 22:04:54 +0000 Received: from localhost ([127.0.0.1]:57859 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rDAs2-0002OH-5a for submit@debbugs.gnu.org; Tue, 12 Dec 2023 17:04:54 -0500 Received: from mout.gmx.net ([212.227.15.18]:36157) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rDArv-0002Nw-7u for 67688@debbugs.gnu.org; Tue, 12 Dec 2023 17:04:52 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.de; s=s31663417; t=1702418664; x=1703023464; i=grfz@gmx.de; bh=MzvF1xAX6atilp6FTTmN4CwZ1D0lXJRkMSnsz86/52U=; h=X-UI-Sender-Class:From:To:Cc:Subject:In-Reply-To:References: Date; b=K3O18VxjvbbOyd0ryDz9o7+kJ6mZyef7Zs09VhqFXURFn6pm8P81IdLN/5s1nSx/ 8y+BbnFHYYbQJl8pXDEp5U4bvsuoxu0diUsuhz+vdiEMfBMG2xytnAkZHqotdmGZR 1+xYkAQbRG3XrCE2+DuJS8q1196c+dlKy4gF1i50vuXmm879OUDVxmkexLcsI3ICo OmbXR3BX/a0+9YAyiWqfHKSM92Kka5d9YCA50CU6uXr1u8OQaIp68y+wpi2cSqHga 513VfpgBdURjrS5PVDbeBThH++DOAMmLVzeIT++/p3dqRq3ge6VTt4WUYhtjRMkkk CEkwlfoc7NeLASL8GA== X-UI-Sender-Class: 724b4f7f-cbec-4199-ad4e-598c01a50d3a Received: from localhost ([95.90.236.232]) by mail.gmx.net (mrgmx005 [212.227.17.190]) with ESMTPSA (Nemesis) id 1N2mFi-1rKhFc2IqS-0132eu; Tue, 12 Dec 2023 23:04:24 +0100 From: Gregor Zattler To: Visuwesh , Eli Zaretskii Subject: Re: bug#67688: 30.0.50; ffap prepends buffers default-directory to guessed file name in case of tramp's file name syntax In-Reply-To: <87plzbs9vl.fsf@gmail.com> References: <87r0jy3z41.fsf@no.lan> <87fs0cg3rr.fsf@gmx.de> <871qbrtqtc.fsf@gmail.com> <87wmtjsbfj.fsf@gmail.com> <83jzpjtppg.fsf@gnu.org> <87plzbs9vl.fsf@gmail.com> Date: Tue, 12 Dec 2023 23:03:48 +0100 Message-ID: <87sf47t6wr.fsf@no.lan> MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K1:ILOLf8oZjltkN33z7PMoeF7NvpRt9RA1v1dbyFAaZj6VQyM65/P AAf9ryVN8/IH3SqjJtLJ4LfZ15qTIUMaVs6ES8LJPM1cYP6hKT5VeDlfRoLemO+GfUYaflo EjB2rdCyVtPpyYZAuuvlBVVb2yzHPLVJRFYAcBgAtP37ILkRJEbKGP6J/H/JbvHzv7YW6LF GIpYNtaUdZC9W75tZhQ7g== X-Spam-Flag: NO UI-OutboundReport: notjunk:1;M01:P0:cG80ptEusfU=;W44TMbos/T1tEmkyOldQokYtHGq XTj7uLFg6UVgqOShxG6bjD1+OSXAX4wsLcxVTBFF48xqlcZjzbx5b85i4AftXb8fpsJRnA/aN URgiEiQbKHiloD2e5eCBt8ZRN0jp3T/XpFcw+RImxLLC9bLKqwqwhVj0IyFwaN3Kpd5Yq3+4g qkEWbQliS0JqoKrMQhsC0/6YyHr3eMw/9Gv3Iki9tbnHUc6S7PyT8wkub9jGxL+AOg855oiHS dyuShO1AeT/6lPWFNcqrRw2JULrhjgzRTb7QO5hsrWDnNa0D9eJgDsH4YLWl+VsiaqY7VFDrA tjBs4GbEvQSS9bX5fIIC2fRdrLEKzA6r3oJ+WRzauUxOGkFmDZtBFi161TgVLNXq+qKeao1Bv dF/79wQIO6nkfiHJWRwosqR1pINTH9LjD7mSKJIiYmfOMHsSS5VuL+K/dmbFrQrdJyHzF3uDe zLTO1KrBC8VahjLFNpxlj8Xv1YhQ1ctVX3/VF46rs6yBeAApGuWq0Vyiq/I3frc6KHdVxt3O5 juHkYrYoxWo0Y5KF5D4wlw4V6B3Ode1hCPuh5BJVg+6sbAL+H7v+eba7ktkcmxX4NXdT4rlmr EkUQCc3E0rhWqgWreHZvWS/y+bn0R5aO/fJ/mDlAFPxK5V3Mnl7I6dXLVmziQOcOF91MHLj4l QIK76+tBwT2N+TvJZM37g+QL5j/AgN/8UhvKciJ0MNnQg2Bl+9dXBw5VoAJwZ18uHFyblZPe4 pvTF2XLDbwKLv+Y68tq/TmszADbcz8TYoPnD/reFt/QON59ZA0s785/XbPbf7PQbeX7dAH6mc KcY3dbrR33Cpte5d8Qw5lQLePdCUpMOTuIh/a2AaOHlVlk33VAfqS62gtBRHzcbnuhKp286pl u5C2NXsiE8RX/sbu9qn1qaOUhhcn8l1xAF8/NPXsFQjfK2WwPW/1Zeo6mxSmd8Sywyj9Z9WwU /Ho8yCUWQRtB4tYo6cyo4VU3aAk= X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 67688 Cc: michael.albinus@gmx.de, 67688@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.7 (-) * Visuwesh [2023-12-12; 21:15 +0530]: > I was waiting for review from others. Nevertheless, I have attached a > proper patch. I cannot review the patch but for me it works as expected after applying the patch. Thanks, Gregor From debbugs-submit-bounces@debbugs.gnu.org Sat Dec 16 07:55:50 2023 Received: (at 67688) by debbugs.gnu.org; 16 Dec 2023 12:55:50 +0000 Received: from localhost ([127.0.0.1]:54174 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rEUCr-0007J9-T4 for submit@debbugs.gnu.org; Sat, 16 Dec 2023 07:55:50 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:36586) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rEUCq-0007Iy-M3 for 67688@debbugs.gnu.org; Sat, 16 Dec 2023 07:55:49 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rEUCk-000144-Hq; Sat, 16 Dec 2023 07:55:42 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=txjJbQgLzgZ7V+KSQrga1VtliR3C9/Ht6vlbSFS99gw=; b=jbaCOYlvh9xK HoxyleVmdeErB5vQCX+CZKEUEpLyapMs6kw6fcPaEhxhHObNSqGRMI8TefkseGk5Cvd+3sTaJnN0s o4PG+M8VndkNw/rv7zE0LBdSlPkWudh3Lk9E7PRB92NhTIDGOCd9iv2haI3jRAG7cG1d872qgaYfE Aj4F273bbzJkmkSPW3Ylja8SKbJ2nsPc65smA0hi2ltC/5gRLTXhes4n5hINo+sL+rFQXKP9t65Dd xYJpdgQQ7dtCpLvdp29pOV8LCr6slISCRt1Tj1lAjviMVUdgErQR8Fl5O7CnFD4o4tt9Tj91q9c4I w8cI/0a5c7Av6hW94S+Spw==; Date: Sat, 16 Dec 2023 14:55:24 +0200 Message-Id: <83il4ymhmr.fsf@gnu.org> From: Eli Zaretskii To: Visuwesh In-Reply-To: <87plzbs9vl.fsf@gmail.com> (message from Visuwesh on Tue, 12 Dec 2023 21:15:02 +0530) Subject: Re: bug#67688: 30.0.50; ffap prepends buffers default-directory to guessed file name in case of tramp's file name syntax References: <87r0jy3z41.fsf@no.lan> <87fs0cg3rr.fsf@gmx.de> <871qbrtqtc.fsf@gmail.com> <87wmtjsbfj.fsf@gmail.com> <83jzpjtppg.fsf@gnu.org> <87plzbs9vl.fsf@gmail.com> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 67688 Cc: michael.albinus@gmx.de, grfz@gmx.de, 67688@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Visuwesh > Cc: michael.albinus@gmx.de, grfz@gmx.de, 67688@debbugs.gnu.org > Date: Tue, 12 Dec 2023 21:15:02 +0530 > > [Tuesday December 12, 2023] Eli Zaretskii wrote: > > >> Cc: grfz@gmx.de, 67688@debbugs.gnu.org > >> From: Visuwesh > >> Date: Tue, 12 Dec 2023 20:41:28 +0530 > >> > >> -(defcustom ffap-lax-url t > >> +(defcustom ffap-lax-url nil > > > > This change of the default requires a NEWS entry. > > > > Thanks. > > I was waiting for review from others. Nevertheless, I have attached a > proper patch. Thanks. Let's wait a bit longer, but meanwhile, a nit: > --- a/etc/NEWS > +++ b/etc/NEWS > @@ -258,6 +258,11 @@ called in the '--eval' expression, which is useful when those > arguments contain arbitrary characters that otherwise might require > elaborate and error-prone escaping (to protect them from the shell). > > +--- > +** ffap-lax-url now defaults to nil. > +Previously, it was set to ffap-lax-url to t but this broke remote file > +name detection. Please quote symbols in NEWS 'like this'. From debbugs-submit-bounces@debbugs.gnu.org Sat Dec 16 09:46:02 2023 Received: (at 67688) by debbugs.gnu.org; 16 Dec 2023 14:46:03 +0000 Received: from localhost ([127.0.0.1]:54274 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rEVvW-0005Tv-95 for submit@debbugs.gnu.org; Sat, 16 Dec 2023 09:46:02 -0500 Received: from mail-pl1-x641.google.com ([2607:f8b0:4864:20::641]:58476) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rEVvT-0005Fa-6D for 67688@debbugs.gnu.org; Sat, 16 Dec 2023 09:46:01 -0500 Received: by mail-pl1-x641.google.com with SMTP id d9443c01a7336-1d38bedd799so12212875ad.0 for <67688@debbugs.gnu.org>; Sat, 16 Dec 2023 06:45:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1702737952; x=1703342752; darn=debbugs.gnu.org; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=v5N2zLTIewb6ueNiY34W5Uy3FfHlwBp2qbJm1tfcraU=; b=TPLL9RlrLxEZy4lp1J+nzhXH4efK6p/1nbkTQMNrsfVSapV3SCrdWOYnuwJGcrnEY/ 7XpcdmKW3nl8O7j6kTupNdkT8tPbGY5cPnOMxW1TKDN+RZSR7QR5agrg3/KoznpwULt1 mjiXVuWKpWdV/WWVo3dkcX94XPPubAFpJ3ojYvc6l87fM4ZN9osPKemoDPAQBVuT6PhZ R2VrjA7kKjE+RrU52ZRfMQJBJLSlpYyc5eVrcIXr9Lr0w6eDVuDXgXCePFfta8YXL8BJ Y5zlhAf3/sV6e+056TIURnp2clFfJPL04KrBmACWnBG0mF0hbcAmYT8jbLfSBRFAHADW t+hA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702737952; x=1703342752; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=v5N2zLTIewb6ueNiY34W5Uy3FfHlwBp2qbJm1tfcraU=; b=owv45B6GuqPLxNU8rBLJTiG7vD7MF+xzJEg9YKH21YA/M8Hr+s5uRKMZqkLYbrSjiQ vjveoYjrEnEStZb/kZ+Wbjou9aJI0zuxkZ2oxosg9Ou9EI5BSnOYm9SlSBGM2v/CUf6k IFykgJ6IGoLUI0QgappNU/k1OnguDufoqX14Yk3oHlnY6lVaga6B1M5xuqQi9FXMDCZJ 9J8R6xCJhQBjYywWNPR5i8sA9tHq8BYteVn7sZRIfhc65GvRqjT0RE6tn+mBfFHa2ulY pvFrpf+e63D33Zp2ATv/gqceYHUL9C2SE/htlfZ4RRX64gHriHgU5O8BUcASkMWk1zDr pQfw== X-Gm-Message-State: AOJu0YxmFb9WaTQbE5XCXx45UTJBSQyxQPGUsWbnbdU7zZL8wHYPN7Jx xYop77vcvbnkRyqgxIoq+MU= X-Google-Smtp-Source: AGHT+IEjvXPO2IMRZBYQcpcBEEKtUcZzrNPBAkqRUUkuMcO8n3pJ3NMAv8ZG9k8owDGbm1EO8wc/Rg== X-Received: by 2002:a17:903:24a:b0:1d0:68a:4a45 with SMTP id j10-20020a170903024a00b001d0068a4a45mr18357806plh.35.1702737952483; Sat, 16 Dec 2023 06:45:52 -0800 (PST) Received: from localhost ([49.204.142.139]) by smtp.gmail.com with ESMTPSA id jw22-20020a170903279600b001cfc01a265fsm16062289plb.170.2023.12.16.06.45.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 16 Dec 2023 06:45:51 -0800 (PST) From: Visuwesh To: Eli Zaretskii Subject: Re: bug#67688: 30.0.50; ffap prepends buffers default-directory to guessed file name in case of tramp's file name syntax In-Reply-To: <83il4ymhmr.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 16 Dec 2023 14:55:24 +0200") References: <87r0jy3z41.fsf@no.lan> <87fs0cg3rr.fsf@gmx.de> <871qbrtqtc.fsf@gmail.com> <87wmtjsbfj.fsf@gmail.com> <83jzpjtppg.fsf@gnu.org> <87plzbs9vl.fsf@gmail.com> <83il4ymhmr.fsf@gnu.org> Date: Sat, 16 Dec 2023 20:15:48 +0530 Message-ID: <877clexl2b.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: 4.5 (++++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: [சனி டிசம்பர் 16, 2023] Eli Zaretskii wrote: >> From: Visuwesh >> Cc: michael.albinus@gmx.de, grfz@gmx.de, 67688@debbugs.gnu.org >> Date: Tue, 12 Dec 2023 21:15:02 +0530 >> >> [Tuesday December 12, 2023] Eli Zaretskii wrote: >> >> >> Cc: grfz@ [...] Content analysis details: (4.5 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (visuweshm[at]gmail.com) 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record 3.6 RCVD_IN_SBL_CSS RBL: Received via a relay in Spamhaus SBL-CSS [49.204.142.139 listed in zen.spamhaus.org] -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2607:f8b0:4864:20:0:0:0:641 listed in] [list.dnswl.org] -0.0 T_SCC_BODY_TEXT_LINE No description available. 1.0 FREEMAIL_REPLY From and body contain different freemails X-Debbugs-Envelope-To: 67688 Cc: michael.albinus@gmx.de, grfz@gmx.de, 67688@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 2.5 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: [சனி டிசம்பர் 16, 2023] Eli Zaretskii wrote: >> From: Visuwesh >> Cc: michael.albinus@gmx.de, grfz@gmx.de, 67688@debbugs.gnu.org >> Date: Tue, 12 Dec 2023 21:15:02 +0530 >> >> [Tuesday December 12, 2023] Eli Zaretskii wrote: >> >> >> Cc: grfz@ [...] Content analysis details: (2.5 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 3.6 RCVD_IN_SBL_CSS RBL: Received via a relay in Spamhaus SBL-CSS [49.204.142.139 listed in zen.spamhaus.org] -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2607:f8b0:4864:20:0:0:0:641 listed in] [list.dnswl.org] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (visuweshm[at]gmail.com) 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record -0.0 T_SCC_BODY_TEXT_LINE No description available. -1.0 MAILING_LIST_MULTI Multiple indicators imply a widely-seen list manager --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable [=E0=AE=9A=E0=AE=A9=E0=AE=BF =E0=AE=9F=E0=AE=BF=E0=AE=9A=E0=AE=AE=E0=AF=8D= =E0=AE=AA=E0=AE=B0=E0=AF=8D 16, 2023] Eli Zaretskii wrote: >> From: Visuwesh >> Cc: michael.albinus@gmx.de, grfz@gmx.de, 67688@debbugs.gnu.org >> Date: Tue, 12 Dec 2023 21:15:02 +0530 >>=20 >> [Tuesday December 12, 2023] Eli Zaretskii wrote: >>=20 >> >> Cc: grfz@gmx.de, 67688@debbugs.gnu.org >> >> From: Visuwesh >> >> Date: Tue, 12 Dec 2023 20:41:28 +0530 >> >>=20 >> >> -(defcustom ffap-lax-url t >> >> +(defcustom ffap-lax-url nil >> > >> > This change of the default requires a NEWS entry. >> > >> > Thanks. >>=20 >> I was waiting for review from others. Nevertheless, I have attached a >> proper patch. > > Thanks. Let's wait a bit longer, but meanwhile, a nit: > >> --- a/etc/NEWS >> +++ b/etc/NEWS >> @@ -258,6 +258,11 @@ called in the '--eval' expression, which is useful = when those >> arguments contain arbitrary characters that otherwise might require >> elaborate and error-prone escaping (to protect them from the shell). >>=20=20 >> +--- >> +** ffap-lax-url now defaults to nil. >> +Previously, it was set to ffap-lax-url to t but this broke remote file >> +name detection. > > Please quote symbols in NEWS 'like this'. Oops, fixed in attached patch. --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=0001-Make-ffap-correctly-guess-remote-file-names-at-point.patch >From 7769b62cd23bf3eb879c34e0c78ed7f367791993 Mon Sep 17 00:00:00 2001 From: Visuwesh Date: Tue, 12 Dec 2023 21:14:12 +0530 Subject: [PATCH] Make ffap correctly guess remote file names at point * lisp/ffap.el (ffap-lax-url): Set it to nil so that remote file names may be matched. (bug#67688) (ffap-fixup-email): New function. (ffap-guesser): Specially handle email addresses now that ffap-lax-url is nil as user@host fails to be matched as an email address with that setting. * etc/NEWS: Announce the new value of the defcustom. --- etc/NEWS | 5 +++++ lisp/ffap.el | 14 +++++++++++--- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/etc/NEWS b/etc/NEWS index 29f4e5c0b66..3e527fcd2ad 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -258,6 +258,11 @@ called in the '--eval' expression, which is useful when those arguments contain arbitrary characters that otherwise might require elaborate and error-prone escaping (to protect them from the shell). +--- +** 'ffap-lax-url' now defaults to nil. +Previously, it was set to 'ffap-lax-url' to t but this broke remote file +name detection. + * Editing Changes in Emacs 30.1 diff --git a/lisp/ffap.el b/lisp/ffap.el index 530e3da182e..9cea11cf540 100644 --- a/lisp/ffap.el +++ b/lisp/ffap.el @@ -152,15 +152,15 @@ ffap-url-unwrap-remote :group 'ffap :version "24.3") -(defcustom ffap-lax-url t +(defcustom ffap-lax-url nil "If non-nil, allow lax URL matching. The default non-nil value might produce false URLs in C++ code with symbols like \"std::find\". On the other hand, setting this to nil will disable recognition of URLs that are not -well-formed, such as \"user@host\" or \"\"." +well-formed." :type 'boolean :group 'ffap - :version "25.2") ; nil -> t + :version "30.1") (defcustom ffap-ftp-default-user "anonymous" "User name in FTP file names generated by `ffap-host-to-filename'. @@ -609,6 +609,13 @@ ffap-fixup-url ((and ffap-url-unwrap-remote (ffap-url-unwrap-remote url))) (url))) +(defun ffap-fixup-email (email) + "Clean up EMAIL and return it as a mailto: URL." + (when (stringp email) + (if (string-prefix-p "mailto:" email) + email + (concat "mailto:" email)))) + ;;; File Name Handling: @@ -1571,6 +1578,7 @@ ffap-guesser (ffap-fixup-url (or (ffap-url-at-point) (ffap-gopher-at-point)))) (ffap-file-at-point) ; may yield url! + (ffap-fixup-email (thing-at-point 'email)) (ffap-fixup-machine (ffap-machine-at-point)))) (defun ffap-prompter (&optional guess suffix) -- 2.42.0 --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Sat Dec 23 04:34:18 2023 Received: (at 67688-done) by debbugs.gnu.org; 23 Dec 2023 09:34:18 +0000 Received: from localhost ([127.0.0.1]:48575 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rGyOg-0002qF-0T for submit@debbugs.gnu.org; Sat, 23 Dec 2023 04:34:18 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:48924) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rGyOe-0002q3-Io for 67688-done@debbugs.gnu.org; Sat, 23 Dec 2023 04:34:17 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rGyOU-0003OL-4p; Sat, 23 Dec 2023 04:34:06 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=tJYokB9POCxMHB42P7d3zPbsdfAJ6OavLELLVCNgZ1c=; b=CmWQWGPJmHnW RBdAMsvlgaq5kwxX3G6Oc7Yes3fKUCIKunh82J29aDMfzCot1Hty6i1vEBrwNLo/CpNTJodawqyuC xgZFQ28JUxhLw+qr2VzFDqQgRienoulRhiI8lZqaPs0pX9zMhNf7JpJceUV1ZgObG1Ranw3GfIBOM d19fJnQHuUQK36lJxDKTmS4rJA38HJxhmQssnxkRMhwW41I6qaWM8hWlFcAt13WWdLgFgZ/KW7Ff4 6/b39DvpnUukkFzmY/FBNLxSLRgMTiPWSepsbywHxtyYy1RC3SH0OAW1voVR0b6ybCdUdO8/ZJQ69 9+ew3DEsZ+qD4z+qudAfjQ==; Date: Sat, 23 Dec 2023 11:33:56 +0200 Message-Id: <83jzp5dzzv.fsf@gnu.org> From: Eli Zaretskii To: Visuwesh In-Reply-To: <877clexl2b.fsf@gmail.com> (message from Visuwesh on Sat, 16 Dec 2023 20:15:48 +0530) Subject: Re: bug#67688: 30.0.50; ffap prepends buffers default-directory to guessed file name in case of tramp's file name syntax References: <87r0jy3z41.fsf@no.lan> <87fs0cg3rr.fsf@gmx.de> <871qbrtqtc.fsf@gmail.com> <87wmtjsbfj.fsf@gmail.com> <83jzpjtppg.fsf@gnu.org> <87plzbs9vl.fsf@gmail.com> <83il4ymhmr.fsf@gnu.org> <877clexl2b.fsf@gmail.com> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 67688-done Cc: michael.albinus@gmx.de, grfz@gmx.de, 67688-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Visuwesh > Cc: michael.albinus@gmx.de, grfz@gmx.de, 67688@debbugs.gnu.org > Date: Sat, 16 Dec 2023 20:15:48 +0530 > > >> --- a/etc/NEWS > >> +++ b/etc/NEWS > >> @@ -258,6 +258,11 @@ called in the '--eval' expression, which is useful when those > >> arguments contain arbitrary characters that otherwise might require > >> elaborate and error-prone escaping (to protect them from the shell). > >> > >> +--- > >> +** ffap-lax-url now defaults to nil. > >> +Previously, it was set to ffap-lax-url to t but this broke remote file > >> +name detection. > > > > Please quote symbols in NEWS 'like this'. > > Oops, fixed in attached patch. Thanks, installed on master, and closing the bug. From unknown Sun Jun 22 03:57:09 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sat, 20 Jan 2024 12:24:24 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator