[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#67600: [PATCH] Add dashes to 'thing-at-point-email-regexp'
From: |
Visuwesh |
Subject: |
bug#67600: [PATCH] Add dashes to 'thing-at-point-email-regexp' |
Date: |
Tue, 12 Dec 2023 18:11:47 +0530 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
[Tuesday December 12, 2023] Eli Zaretskii wrote:
>> From: Visuwesh <visuweshm@gmail.com>
>> Cc: Philip Kaludercic <philipk@posteo.net>, 67600@debbugs.gnu.org
>> Date: Tue, 12 Dec 2023 17:51:32 +0530
>>
>> [Tuesday December 12, 2023] Eli Zaretskii wrote:
>>
>> > Thanks.
>> >
>> > My bother here is that this could cause false positives whereby
>> > thing-at-point would recognize file names with slashes as email
>> > addresses. Because otherwise I don't understand why the slash was
>> > omitted in the first place. Can we somehow make sure this won't
>> > happen?
>>
>> I am running Emacs with the same change before Philip created this bug
>> report and so far I haven't had false positives for email addresses
>> because files with a @ in its name is rare. In practise, I think this
>> patch is harmless in that regard.
>
> Remote files that have user@host in their names do have that
> character.
AFAIU, user cannot have slashes in them as per the POSIX standards [1]
and likewise with hostname so remote files should not pose a problem.
Of course this assumes that you're only looking at methods like ssh,
doas, sudo, etc. It seems like tramp disallows slashes in user and host
anyway, try:
(file-remote-p "/ssh:userwith/@host:/") ;; => nil
(file-remote-p "/ssh:userwith@host/:/") ;; => nil
(file-remote-p "/ssh:userwith@host:/") ;; => /ssh:userwith@host:
1. https://serverfault.com/a/578264
- bug#67600: [PATCH] Add dashes to 'thing-at-point-email-regexp', Philip Kaludercic, 2023/12/03
- bug#67600: [PATCH] Add dashes to 'thing-at-point-email-regexp', Eli Zaretskii, 2023/12/03
- bug#67600: [PATCH] Add dashes to 'thing-at-point-email-regexp', Philip Kaludercic, 2023/12/12
- bug#67600: [PATCH] Add dashes to 'thing-at-point-email-regexp', Eli Zaretskii, 2023/12/12
- bug#67600: [PATCH] Add dashes to 'thing-at-point-email-regexp', Visuwesh, 2023/12/12
- bug#67600: [PATCH] Add dashes to 'thing-at-point-email-regexp', Eli Zaretskii, 2023/12/12
- bug#67600: [PATCH] Add dashes to 'thing-at-point-email-regexp',
Visuwesh <=
- bug#67600: [PATCH] Add dashes to 'thing-at-point-email-regexp', Eli Zaretskii, 2023/12/12
- bug#67600: [PATCH] Add dashes to 'thing-at-point-email-regexp', Visuwesh, 2023/12/12
- bug#67600: [PATCH] Add dashes to 'thing-at-point-email-regexp', Eli Zaretskii, 2023/12/12
- bug#67600: [PATCH] Add dashes to 'thing-at-point-email-regexp', Visuwesh, 2023/12/12
- bug#67600: [PATCH] Add dashes to 'thing-at-point-email-regexp', Philip Kaludercic, 2023/12/16
- bug#67600: [PATCH] Add dashes to 'thing-at-point-email-regexp', Eli Zaretskii, 2023/12/16
- bug#67600: [PATCH] Add dashes to 'thing-at-point-email-regexp', Philip Kaludercic, 2023/12/16
- bug#67600: [PATCH] Add dashes to 'thing-at-point-email-regexp', Eli Zaretskii, 2023/12/16
- bug#67600: [PATCH] Add dashes to 'thing-at-point-email-regexp', Philip Kaludercic, 2023/12/17