unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#19472: Eww in Emacs 24.4 refuses to open local files
@ 2014-12-30  9:56 Kelly Dean
  2014-12-30 11:53 ` Lars Magne Ingebrigtsen
  0 siblings, 1 reply; 13+ messages in thread
From: Kelly Dean @ 2014-12-30  9:56 UTC (permalink / raw)
  To: 19472

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





^ permalink raw reply	[flat|nested] 13+ messages in thread

* bug#19472: Eww in Emacs 24.4 refuses to open local files
  2014-12-30  9:56 bug#19472: Eww in Emacs 24.4 refuses to open local files Kelly Dean
@ 2014-12-30 11:53 ` Lars Magne Ingebrigtsen
  2014-12-30 16:10   ` Eli Zaretskii
  2015-01-01  4:14   ` Kelly Dean
  0 siblings, 2 replies; 13+ messages in thread
From: Lars Magne Ingebrigtsen @ 2014-12-30 11:53 UTC (permalink / raw)
  To: Kelly Dean; +Cc: 19472

"Kelly Dean" <kelly@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





^ permalink raw reply	[flat|nested] 13+ messages in thread

* bug#19472: Eww in Emacs 24.4 refuses to open local files
  2014-12-30 11:53 ` Lars Magne Ingebrigtsen
@ 2014-12-30 16:10   ` Eli Zaretskii
  2015-01-01  4:14   ` Kelly Dean
  1 sibling, 0 replies; 13+ messages in thread
From: Eli Zaretskii @ 2014-12-30 16:10 UTC (permalink / raw)
  To: Lars Magne Ingebrigtsen; +Cc: kelly, 19472

> From: Lars Magne Ingebrigtsen <larsi@gnus.org>
> Date: Tue, 30 Dec 2014 12:53:00 +0100
> Cc: 19472@debbugs.gnu.org
> 
> "Kelly Dean" <kelly@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.





^ permalink raw reply	[flat|nested] 13+ messages in thread

* bug#19472: Eww in Emacs 24.4 refuses to open local files
  2014-12-30 11:53 ` Lars Magne Ingebrigtsen
  2014-12-30 16:10   ` Eli Zaretskii
@ 2015-01-01  4:14   ` Kelly Dean
  2015-01-01 11:12     ` Ivan Shmakov
  1 sibling, 1 reply; 13+ messages in thread
From: Kelly Dean @ 2015-01-01  4:14 UTC (permalink / raw)
  To: Lars Magne Ingebrigtsen; +Cc: 19472

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.





^ permalink raw reply	[flat|nested] 13+ messages in thread

* bug#19472: Eww in Emacs 24.4 refuses to open local files
  2015-01-01  4:14   ` Kelly Dean
@ 2015-01-01 11:12     ` Ivan Shmakov
  2015-01-02  9:30       ` Lars Magne Ingebrigtsen
  0 siblings, 1 reply; 13+ messages in thread
From: Ivan Shmakov @ 2015-01-01 11:12 UTC (permalink / raw)
  To: 19472-done

Tags: notabug

>>>>> Kelly Dean <kelly@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





^ permalink raw reply	[flat|nested] 13+ messages in thread

* bug#19472: Eww in Emacs 24.4 refuses to open local files
  2015-01-01 11:12     ` Ivan Shmakov
@ 2015-01-02  9:30       ` Lars Magne Ingebrigtsen
  2015-01-02 10:44         ` Eli Zaretskii
  0 siblings, 1 reply; 13+ messages in thread
From: Lars Magne Ingebrigtsen @ 2015-01-02  9:30 UTC (permalink / raw)
  To: 19472; +Cc: kelly, ivan

Ivan Shmakov <ivan@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





^ permalink raw reply	[flat|nested] 13+ messages in thread

* bug#19472: Eww in Emacs 24.4 refuses to open local files
  2015-01-02  9:30       ` Lars Magne Ingebrigtsen
@ 2015-01-02 10:44         ` Eli Zaretskii
  2015-01-02 10:46           ` Lars Magne Ingebrigtsen
  0 siblings, 1 reply; 13+ messages in thread
From: Eli Zaretskii @ 2015-01-02 10:44 UTC (permalink / raw)
  To: Lars Magne Ingebrigtsen; +Cc: kelly, 19472, ivan

> From: Lars Magne Ingebrigtsen <larsi@gnus.org>
> Date: Fri, 02 Jan 2015 10:30:35 +0100
> Cc: kelly@prtime.org, ivan@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?





^ permalink raw reply	[flat|nested] 13+ messages in thread

* bug#19472: Eww in Emacs 24.4 refuses to open local files
  2015-01-02 10:44         ` Eli Zaretskii
@ 2015-01-02 10:46           ` Lars Magne Ingebrigtsen
  2015-01-02 10:59             ` Ivan Shmakov
  2015-01-02 11:29             ` Eli Zaretskii
  0 siblings, 2 replies; 13+ messages in thread
From: Lars Magne Ingebrigtsen @ 2015-01-02 10:46 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: kelly, 19472, ivan

Eli Zaretskii <eliz@gnu.org> writes:

>> From: Lars Magne Ingebrigtsen <larsi@gnus.org>
>> Date: Fri, 02 Jan 2015 10:30:35 +0100
>> Cc: kelly@prtime.org, ivan@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





^ permalink raw reply	[flat|nested] 13+ messages in thread

* bug#19472: Eww in Emacs 24.4 refuses to open local files
  2015-01-02 10:46           ` Lars Magne Ingebrigtsen
@ 2015-01-02 10:59             ` Ivan Shmakov
  2015-01-02 11:04               ` Lars Magne Ingebrigtsen
  2015-01-02 11:29             ` Eli Zaretskii
  1 sibling, 1 reply; 13+ messages in thread
From: Ivan Shmakov @ 2015-01-02 10:59 UTC (permalink / raw)
  To: 19472

>>>>> Lars Magne Ingebrigtsen <larsi@gnus.org> writes:
>>>>> Eli Zaretskii <eliz@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





^ permalink raw reply	[flat|nested] 13+ messages in thread

* bug#19472: Eww in Emacs 24.4 refuses to open local files
  2015-01-02 10:59             ` Ivan Shmakov
@ 2015-01-02 11:04               ` Lars Magne Ingebrigtsen
  0 siblings, 0 replies; 13+ messages in thread
From: Lars Magne Ingebrigtsen @ 2015-01-02 11:04 UTC (permalink / raw)
  To: 19472

Ivan Shmakov <ivan@siamics.net> writes:

>>>>>> Lars Magne Ingebrigtsen <larsi@gnus.org> writes:
>>>>>> Eli Zaretskii <eliz@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





^ permalink raw reply	[flat|nested] 13+ messages in thread

* bug#19472: Eww in Emacs 24.4 refuses to open local files
  2015-01-02 10:46           ` Lars Magne Ingebrigtsen
  2015-01-02 10:59             ` Ivan Shmakov
@ 2015-01-02 11:29             ` Eli Zaretskii
  2015-01-02 12:15               ` Lars Magne Ingebrigtsen
  1 sibling, 1 reply; 13+ messages in thread
From: Eli Zaretskii @ 2015-01-02 11:29 UTC (permalink / raw)
  To: Lars Magne Ingebrigtsen; +Cc: kelly, 19472, ivan

> From: Lars Magne Ingebrigtsen <larsi@gnus.org>
> Cc: 19472@debbugs.gnu.org,  kelly@prtime.org,  ivan@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.





^ permalink raw reply	[flat|nested] 13+ messages in thread

* bug#19472: Eww in Emacs 24.4 refuses to open local files
  2015-01-02 11:29             ` Eli Zaretskii
@ 2015-01-02 12:15               ` Lars Magne Ingebrigtsen
  2015-01-03  9:18                 ` Michael Albinus
  0 siblings, 1 reply; 13+ messages in thread
From: Lars Magne Ingebrigtsen @ 2015-01-02 12:15 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: kelly, 19472, ivan

Eli Zaretskii <eliz@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





^ permalink raw reply	[flat|nested] 13+ messages in thread

* bug#19472: Eww in Emacs 24.4 refuses to open local files
  2015-01-02 12:15               ` Lars Magne Ingebrigtsen
@ 2015-01-03  9:18                 ` Michael Albinus
  0 siblings, 0 replies; 13+ messages in thread
From: Michael Albinus @ 2015-01-03  9:18 UTC (permalink / raw)
  To: Lars Magne Ingebrigtsen; +Cc: kelly, 19472

Lars Magne Ingebrigtsen <larsi@gnus.org> writes:

> Eli Zaretskii <eliz@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@host/path/to/file".

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

Best regards, Michael.





^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2015-01-03  9:18 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-12-30  9:56 bug#19472: Eww in Emacs 24.4 refuses to open local files Kelly Dean
2014-12-30 11:53 ` Lars Magne Ingebrigtsen
2014-12-30 16:10   ` Eli Zaretskii
2015-01-01  4:14   ` Kelly Dean
2015-01-01 11:12     ` Ivan Shmakov
2015-01-02  9:30       ` Lars Magne Ingebrigtsen
2015-01-02 10:44         ` Eli Zaretskii
2015-01-02 10:46           ` Lars Magne Ingebrigtsen
2015-01-02 10:59             ` Ivan Shmakov
2015-01-02 11:04               ` Lars Magne Ingebrigtsen
2015-01-02 11:29             ` Eli Zaretskii
2015-01-02 12:15               ` Lars Magne Ingebrigtsen
2015-01-03  9:18                 ` Michael Albinus

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).