all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Lars Ingebrigtsen <larsi@gnus.org>
To: dieter@duenenhof-wilhelm.de (H. Dieter Wilhelm)
Cc: 40425@debbugs.gnu.org
Subject: bug#40425: 26.3; eww-open-file is not working with a Tramp file name
Date: Fri, 17 Jul 2020 16:39:20 +0200	[thread overview]
Message-ID: <87r1tamciv.fsf@gnus.org> (raw)
In-Reply-To: <864ktzebmg.fsf@duenenhof-wilhelm.de> (H. Dieter Wilhelm's message of "Sat, 04 Apr 2020 13:25:27 +0200")

dieter@duenenhof-wilhelm.de (H. Dieter Wilhelm) writes:

> Debugger entered--Lisp error: (wrong-type-argument number-or-marker-p nil)
>   url-file-asynch-callback(nil nil nil
> "/:/ssh:stories:/home/larsi/.emacs.d/bookiez.data" #<buffer
> *url-file*-73983> eww-render (nil
> "file:///ssh:stories:/home/larsi/.emacs.d/bookiez.d..." nil #<buffer
> *eww*>))

This is due to the following patch, and the moron who committed it
neglected to say what problem it was trying to fix:

commit 023ec128fd95eadac7b607177969267cc8b9accf
Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
Date:   Tue Nov 16 14:46:12 2010 +0100

    Avoid interpreting file:/foo:/bar URLs via tramp.

The following patch makes the test case work again...  but this is
basically what I added in 2010:

diff --git a/lisp/url/url-file.el b/lisp/url/url-file.el
index eec7cdfbe8..77495d7e57 100644
--- a/lisp/url/url-file.el
+++ b/lisp/url/url-file.el
@@ -110,9 +110,6 @@ url-file-build-filename
 		    ((and (string-match "\\`/[a-zA-Z]:/" file)
 			  (memq system-type '(ms-dos windows-nt)))
 		     (substring file 1))
-		    ;; file: URL with a file:/bar:/foo-like spec.
-		    ((string-match "\\`/[^/]+:/" file)
-		     (concat "/:" file))
 		    (t
 		     file))))
 
*sigh*

My guess is that this attempt to fix the problem of file names that
contain colons without actually being tramp files?

I don't quite know what the solution is here...  it does seem odd for a
low-level library like URL to call out to tramp -- that may even have
security implications: It's very unexpected that (say) hitting a link on
a web page ends up with you ssh-ing to a local machine.  So in that
regard I agree with my 2010 self.

But it does make eww-open-file, which should accept tramp file names,
very awkward to implement...

Any opinions?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





  reply	other threads:[~2020-07-17 14:39 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-04 11:25 bug#40425: 26.3; eww-open-file is not working with a Tramp file name H. Dieter Wilhelm
2020-07-17 14:39 ` Lars Ingebrigtsen [this message]
2020-07-17 17:35   ` Michael Albinus
2020-07-18 15:16     ` Lars Ingebrigtsen
2020-07-18 15:18       ` Michael Albinus
2020-07-18 15:36         ` Lars Ingebrigtsen
2020-07-18 16:04           ` Lars Ingebrigtsen
2020-07-23 19:50             ` H. Dieter Wilhelm
2020-07-24 15:02               ` Lars Ingebrigtsen
2020-07-24 16:25                 ` Michael Albinus
2020-07-27 21:24                   ` Lars Ingebrigtsen
2022-02-20 15:09                     ` Lars Ingebrigtsen
2022-02-20 21:15                       ` H. Dieter Wilhelm
2022-02-20 21:37                         ` Lars Ingebrigtsen
2022-02-20 22:19                           ` H. Dieter Wilhelm

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=87r1tamciv.fsf@gnus.org \
    --to=larsi@gnus.org \
    --cc=40425@debbugs.gnu.org \
    --cc=dieter@duenenhof-wilhelm.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.