GNU bug report logs - #19472
Eww in Emacs 24.4 refuses to open local files

Previous Next

Package: emacs;

Reported by: "Kelly Dean" <kelly <at> prtime.org>

Date: Tue, 30 Dec 2014 09:57:02 UTC

Severity: normal

Tags: moreinfo

Done: Ivan Shmakov <ivan <at> siamics.net>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 19472 in the body.
You can then email your comments to 19472 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#19472; Package emacs. (Tue, 30 Dec 2014 09:57:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to "Kelly Dean" <kelly <at> prtime.org>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Tue, 30 Dec 2014 09:57:03 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: "Kelly Dean" <kelly <at> prtime.org>
To: bug-gnu-emacs <at> gnu.org
Subject: Eww in Emacs 24.4 refuses to open local files
Date: Tue, 30 Dec 2014 09:56:02 +0000
M-x eww /home/test/test.html → fail
M-x eww file://home/test/test.html → fail
M-x eww file:///home/test/test.html → fail
(eww-open-file "/home/test/test.html") → fail
(eww-open-file "file://home/test/test.html") → fail
(eww-open-file "file:///home/test/test.html") → fail
(eat-flaming-death) → fail




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#19472; Package emacs. (Tue, 30 Dec 2014 11:54:01 GMT) Full text and rfc822 format available.

Message #8 received at 19472 <at> debbugs.gnu.org (full text, mbox):

From: Lars Magne Ingebrigtsen <larsi <at> gnus.org>
To: "Kelly Dean" <kelly <at> prtime.org>
Cc: 19472 <at> debbugs.gnu.org
Subject: Re: bug#19472: Eww in Emacs 24.4 refuses to open local files
Date: Tue, 30 Dec 2014 12:53:00 +0100
"Kelly Dean" <kelly <at> prtime.org> writes:

> M-x eww file:///home/test/test.html → fail

Works for me on the Emacs 24 branch:

`M-x eww RET file:///tmp/cert.html RET'

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




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#19472; Package emacs. (Tue, 30 Dec 2014 16:12:02 GMT) Full text and rfc822 format available.

Message #11 received at 19472 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Lars Magne Ingebrigtsen <larsi <at> gnus.org>
Cc: kelly <at> prtime.org, 19472 <at> debbugs.gnu.org
Subject: Re: bug#19472: Eww in Emacs 24.4 refuses to open local files
Date: Tue, 30 Dec 2014 18:10:47 +0200
> From: Lars Magne Ingebrigtsen <larsi <at> gnus.org>
> Date: Tue, 30 Dec 2014 12:53:00 +0100
> Cc: 19472 <at> debbugs.gnu.org
> 
> "Kelly Dean" <kelly <at> prtime.org> writes:
> 
> > M-x eww file:///home/test/test.html → fail
> 
> Works for me on the Emacs 24 branch:

And for me in stock Emacs 24.4.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#19472; Package emacs. (Thu, 01 Jan 2015 04:16:02 GMT) Full text and rfc822 format available.

Message #14 received at 19472 <at> debbugs.gnu.org (full text, mbox):

From: Kelly Dean <kelly <at> prtime.org>
To: Lars Magne Ingebrigtsen <larsi <at> gnus.org>
Cc: Eli Zaretskii <eliz <at> gnu.org>, 19472 <at> debbugs.gnu.org
Subject: Re: bug#19472: Eww in Emacs 24.4 refuses to open local files
Date: Thu, 01 Jan 2015 04:14:15 +0000
Lars Magne Ingebrigtsen wrote:
>Works for me on the Emacs 24 branch:
>
>`M-x eww RET file:///tmp/cert.html RET'

I get the error ⌜This function requires Emacs to be compiled with libxml2⌝.

IOW, I can't read.

In my defense, ⌜/home/test/test.html⌝ produced the error ⌜/80 Name or service not known⌝, and ⌜file://home/test/test.html⌝ produced an FTP buffer with the error ⌜home: No address associated with hostname⌝, so by the time I tried ⌜file:///home/test/test.html⌝ and the debugger popped up yet again, I assumed the error was just another complaint about my syntax.

Sorry for the mistaken bug report.




Reply sent to Ivan Shmakov <ivan <at> siamics.net>:
You have taken responsibility. (Thu, 01 Jan 2015 11:15:03 GMT) Full text and rfc822 format available.

Notification sent to "Kelly Dean" <kelly <at> prtime.org>:
bug acknowledged by developer. (Thu, 01 Jan 2015 11:15:04 GMT) Full text and rfc822 format available.

Message #19 received at 19472-done <at> debbugs.gnu.org (full text, mbox):

From: Ivan Shmakov <ivan <at> siamics.net>
To: 19472-done <at> debbugs.gnu.org
Subject: Re: bug#19472: Eww in Emacs 24.4 refuses to open local files 
Date: Thu, 01 Jan 2015 11:12:20 +0000
Tags: notabug

>>>>> Kelly Dean <kelly <at> prtime.org> writes:
>>>>> Lars Magne Ingebrigtsen wrote:

 >> Works for me on the Emacs 24 branch:

 >> `M-x eww RET file:///tmp/cert.html RET'

 > I get the error ⌜This function requires Emacs to be compiled with
 > libxml2⌝.

 > IOW, I can't read.

 > In my defense, ⌜/home/test/test.html⌝ produced the error ⌜/80 Name or
 > service not known⌝,

	This could probably be improved, – either the error message, or
	the treatment of URIs which look like (absolute?) filenames.

 > and ⌜file://home/test/test.html⌝ produced an FTP buffer with the
 > error ⌜home: No address associated with hostname⌝,

	Indeed, a file://home/ URI means “get files from the host named
	‘home’.”  Cf.: file:/home/, which means “a directory named
	/home/ on the local filesystem.”

 > so by the time I tried ⌜file:///home/test/test.html⌝ and the debugger
 > popped up yet again, I assumed the error was just another complaint
 > about my syntax.

 > Sorry for the mistaken bug report.

	ACK, closing.

-- 
FSF associate member #7257  http://boycottsystemd.org/  … 3013 B6A0 230E 334A




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#19472; Package emacs. (Fri, 02 Jan 2015 09:32:02 GMT) Full text and rfc822 format available.

Message #22 received at 19472 <at> debbugs.gnu.org (full text, mbox):

From: Lars Magne Ingebrigtsen <larsi <at> gnus.org>
To: 19472 <at> debbugs.gnu.org
Cc: kelly <at> prtime.org, ivan <at> siamics.net
Subject: Re: bug#19472: Eww in Emacs 24.4 refuses to open local files
Date: Fri, 02 Jan 2015 10:30:35 +0100
Ivan Shmakov <ivan <at> siamics.net> writes:

>  > and ⌜file://home/test/test.html⌝ produced an FTP buffer with the
>  > error ⌜home: No address associated with hostname⌝,
>
> 	Indeed, a file://home/ URI means “get files from the host named
> 	‘home’.”  Cf.: file:/home/, which means “a directory named
> 	/home/ on the local filesystem.”

Nobody can ever remember the syntax of a file: URI, though, so I think
`M-x eww' should DWIM it a bit.

If the URL is "/some/file/that/exists" or starts with "file:" and you
can then make (sort of) sense of it, then `M-x eww' should load that
file.

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




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#19472; Package emacs. (Fri, 02 Jan 2015 10:45:02 GMT) Full text and rfc822 format available.

Message #25 received at 19472 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Lars Magne Ingebrigtsen <larsi <at> gnus.org>
Cc: kelly <at> prtime.org, ivan <at> siamics.net, 19472 <at> debbugs.gnu.org
Subject: Re: bug#19472: Eww in Emacs 24.4 refuses to open local files
Date: Fri, 02 Jan 2015 12:44:12 +0200
> From: Lars Magne Ingebrigtsen <larsi <at> gnus.org>
> Date: Fri, 02 Jan 2015 10:30:35 +0100
> Cc: kelly <at> prtime.org, ivan <at> siamics.net
> 
> If the URL is "/some/file/that/exists" or starts with "file:" and you
> can then make (sort of) sense of it, then `M-x eww' should load that
> file.

What about "d:/some/file/that/exists" on Windows?




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#19472; Package emacs. (Fri, 02 Jan 2015 10:48:02 GMT) Full text and rfc822 format available.

Message #28 received at 19472 <at> debbugs.gnu.org (full text, mbox):

From: Lars Magne Ingebrigtsen <larsi <at> gnus.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: kelly <at> prtime.org, ivan <at> siamics.net, 19472 <at> debbugs.gnu.org
Subject: Re: bug#19472: Eww in Emacs 24.4 refuses to open local files
Date: Fri, 02 Jan 2015 11:46:43 +0100
Eli Zaretskii <eliz <at> gnu.org> writes:

>> From: Lars Magne Ingebrigtsen <larsi <at> gnus.org>
>> Date: Fri, 02 Jan 2015 10:30:35 +0100
>> Cc: kelly <at> prtime.org, ivan <at> siamics.net
>> 
>> If the URL is "/some/file/that/exists" or starts with "file:" and you
>> can then make (sort of) sense of it, then `M-x eww' should load that
>> file.
>
> What about "d:/some/file/that/exists" on Windows?

Sure, that too.  The DWIM code should call `file-exists-p' a bit on
strings that look like they could possibly be files.

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




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#19472; Package emacs. (Fri, 02 Jan 2015 11:00:03 GMT) Full text and rfc822 format available.

Message #31 received at 19472 <at> debbugs.gnu.org (full text, mbox):

From: Ivan Shmakov <ivan <at> siamics.net>
To: 19472 <at> debbugs.gnu.org
Subject: Re: bug#19472: Eww in Emacs 24.4 refuses to open local files 
Date: Fri, 02 Jan 2015 10:59:18 +0000
>>>>> Lars Magne Ingebrigtsen <larsi <at> gnus.org> writes:
>>>>> Eli Zaretskii <eliz <at> gnu.org> writes:
>>>>> From: Lars Magne Ingebrigtsen  Date: Fri, 02 Jan 2015 10:30:35 +0100

 >>> If the URL is "/some/file/that/exists" or starts with "file:" and
 >>> you can then make (sort of) sense of it, then `M-x eww' should load
 >>> that file.

 >> What about "d:/some/file/that/exists" on Windows?

 > Sure, that too.  The DWIM code should call `file-exists-p' a bit on
 > strings that look like they could possibly be files.

	Like, perhaps, the strings matching "^\\([a-z]:\\)?/"?

-- 
FSF associate member #7257  http://boycottsystemd.org/  … 3013 B6A0 230E 334A




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#19472; Package emacs. (Fri, 02 Jan 2015 11:06:02 GMT) Full text and rfc822 format available.

Message #34 received at 19472 <at> debbugs.gnu.org (full text, mbox):

From: Lars Magne Ingebrigtsen <larsi <at> gnus.org>
To: 19472 <at> debbugs.gnu.org
Subject: Re: bug#19472: Eww in Emacs 24.4 refuses to open local files
Date: Fri, 02 Jan 2015 12:04:52 +0100
Ivan Shmakov <ivan <at> siamics.net> writes:

>>>>>> Lars Magne Ingebrigtsen <larsi <at> gnus.org> writes:
>>>>>> Eli Zaretskii <eliz <at> gnu.org> writes:
>>>>>> From: Lars Magne Ingebrigtsen  Date: Fri, 02 Jan 2015 10:30:35 +0100
>
>  >>> If the URL is "/some/file/that/exists" or starts with "file:" and
>  >>> you can then make (sort of) sense of it, then `M-x eww' should load
>  >>> that file.
>
>  >> What about "d:/some/file/that/exists" on Windows?
>
>  > Sure, that too.  The DWIM code should call `file-exists-p' a bit on
>  > strings that look like they could possibly be files.
>
> 	Like, perhaps, the strings matching "^\\([a-z]:\\)?/"?

Yeah, perhaps.  Does have a "does this string look like a file name if
you squint at it?" function?

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




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#19472; Package emacs. (Fri, 02 Jan 2015 11:30:02 GMT) Full text and rfc822 format available.

Message #37 received at 19472 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: Lars Magne Ingebrigtsen <larsi <at> gnus.org>
Cc: kelly <at> prtime.org, ivan <at> siamics.net, 19472 <at> debbugs.gnu.org
Subject: Re: bug#19472: Eww in Emacs 24.4 refuses to open local files
Date: Fri, 02 Jan 2015 13:29:30 +0200
> From: Lars Magne Ingebrigtsen <larsi <at> gnus.org>
> Cc: 19472 <at> debbugs.gnu.org,  kelly <at> prtime.org,  ivan <at> siamics.net
> Date: Fri, 02 Jan 2015 11:46:43 +0100
> 
> > What about "d:/some/file/that/exists" on Windows?
> 
> Sure, that too.  The DWIM code should call `file-exists-p' a bit on
> strings that look like they could possibly be files.

Beware: file-exists-p calls file handlers, and can return non-nil for
remote files.  Not sure you want that here.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#19472; Package emacs. (Fri, 02 Jan 2015 12:17:02 GMT) Full text and rfc822 format available.

Message #40 received at 19472 <at> debbugs.gnu.org (full text, mbox):

From: Lars Magne Ingebrigtsen <larsi <at> gnus.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: kelly <at> prtime.org, ivan <at> siamics.net, 19472 <at> debbugs.gnu.org
Subject: Re: bug#19472: Eww in Emacs 24.4 refuses to open local files
Date: Fri, 02 Jan 2015 13:15:46 +0100
Eli Zaretskii <eliz <at> gnu.org> writes:

> Beware: file-exists-p calls file handlers, and can return non-nil for
> remote files.  Not sure you want that here.

Hm...  I think that would usually be fine?  If it's a file accessible
via Tramp (for instance), I think the user would normally want eww to
display it.

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




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#19472; Package emacs. (Sat, 03 Jan 2015 09:20:01 GMT) Full text and rfc822 format available.

Message #43 received at 19472 <at> debbugs.gnu.org (full text, mbox):

From: Michael Albinus <michael.albinus <at> gmx.de>
To: Lars Magne Ingebrigtsen <larsi <at> gnus.org>
Cc: Eli Zaretskii <eliz <at> gnu.org>, kelly <at> prtime.org, 19472 <at> debbugs.gnu.org
Subject: Re: bug#19472: Eww in Emacs 24.4 refuses to open local files
Date: Sat, 03 Jan 2015 10:18:48 +0100
Lars Magne Ingebrigtsen <larsi <at> gnus.org> writes:

> Eli Zaretskii <eliz <at> gnu.org> writes:
>
>> Beware: file-exists-p calls file handlers, and can return non-nil for
>> remote files.  Not sure you want that here.
>
> Hm...  I think that would usually be fine?  If it's a file accessible
> via Tramp (for instance), I think the user would normally want eww to
> display it.

Usually, it is the other way around: if `url-handler-mode' is enabled,
one shall be able to open a URL like "ssh://user <at> host/path/to/file".

Hmm, doesn't seem to work just now. Need to debug.

Best regards, Michael.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 31 Jan 2015 12:24:03 GMT) Full text and rfc822 format available.

This bug report was last modified 10 years and 136 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.