emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* flycheck orgmode on windows invalid output file name
@ 2016-06-05 10:45 Guido Van Hoecke
  2016-06-05 15:25 ` Eli Zaretskii
  0 siblings, 1 reply; 6+ messages in thread
From: Guido Van Hoecke @ 2016-06-05 10:45 UTC (permalink / raw)
  To: Emacs, orgmode

Hi,

Environment:
Windows 10 (Insider preview 14352)
GNU Emacs 25.0.92.1 (x86_64-w64-mingw32) of 2016-03-03

I just installed flycheck-20160604.154/

I read that it does not officially support windows 'although it should
mostly work fine on Windows'

And indeed flycheck works fine when editing .el, .js, .php et al. files.

However, my emacs.el file is generated from an emacs-guivho.org
file. When I issue C-' to edit an elisp code block, flycheck barks at
me:

Error while checking syntax automatically: (file-error "Opening output file" "Invalid argument" "c:/Users/guivh/emacs-guivho/.flycheck_emacs-guivho.org[*Org Src emacs-guivho.org[ emacs-lisp ]*]")

I checked the windows only issues but did not see something similar.

Apparently flycheck has a problem with the fact that the buffer does not
correspond to a physical file.

I hope there is a known or suggested workaround...

TIA,


-- 
Guido

If you try to please everyone, somebody is not going to like it.

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

* Re: flycheck orgmode on windows invalid output file name
  2016-06-05 10:45 flycheck orgmode on windows invalid output file name Guido Van Hoecke
@ 2016-06-05 15:25 ` Eli Zaretskii
  2016-06-05 19:41   ` Guido Van Hoecke
  0 siblings, 1 reply; 6+ messages in thread
From: Eli Zaretskii @ 2016-06-05 15:25 UTC (permalink / raw)
  To: help-gnu-emacs; +Cc: emacs-orgmode

> From: Guido Van Hoecke <guivho@gmail.com>
> Date: Sun, 05 Jun 2016 12:45:45 +0200
> 
> Error while checking syntax automatically: (file-error "Opening output file" "Invalid argument" "c:/Users/guivh/emacs-guivho/.flycheck_emacs-guivho.org[*Org Src emacs-guivho.org[ emacs-lisp ]*]")
> 
> I checked the windows only issues but did not see something similar.
> 
> Apparently flycheck has a problem with the fact that the buffer does not
> correspond to a physical file.

No, I think the problem is that flycheck assumes it can create a file
whose name includes '*', which is false on Windows.

> I hope there is a known or suggested workaround...

If I'm right, the only solution is to modify flycheck so that it runs
the file name through convert-standard-filename.

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

* Re: flycheck orgmode on windows invalid output file name
  2016-06-05 15:25 ` Eli Zaretskii
@ 2016-06-05 19:41   ` Guido Van Hoecke
  2016-06-06  2:29     ` Eli Zaretskii
  0 siblings, 1 reply; 6+ messages in thread
From: Guido Van Hoecke @ 2016-06-05 19:41 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: help-gnu-emacs, orgmode

On 5 June 2016 at 17:25, Eli Zaretskii <eliz@gnu.org> wrote:
>> From: Guido Van Hoecke <guivho@gmail.com>
>> Date: Sun, 05 Jun 2016 12:45:45 +0200
>>
>> Error while checking syntax automatically: (file-error "Opening output file" "Invalid argument" "c:/Users/guivh/emacs-guivho/.flycheck_emacs-guivho.org[*Org Src emacs-guivho.org[ emacs-lisp ]*]")
>>
>> I checked the windows only issues but did not see something similar.
>>
>> Apparently flycheck has a problem with the fact that the buffer does not
>> correspond to a physical file.
>
> No, I think the problem is that flycheck assumes it can create a file
> whose name includes '*', which is false on Windows.
>
>> I hope there is a known or suggested workaround...
>
> If I'm right, the only solution is to modify flycheck so that it runs
> the file name through convert-standard-filenam

For testing i went to change flycheck-temp-file-system in flycheck.el
so that it reads

(setq tempfile (convert-standard-filename (expand-file-name
(file-name-nondirectory filename)
           directory)))

rather than the original

(setq tempfile (expand-file-name (file-name-nondirectory filename)
           directory))

I than edebugged the flycheck-temp-file-system with the
"c:/Users/guivh/emacs-guivho/.flycheck_emacs-guivho.org[*Org Src
emacs-guivho.org[ emacs-lisp ]*]") filename, and it nicely produced a
tempfile where the '*'s are replaced by '!'s.

Still, when editing elisp blocks from my elisp.org files, I keep
hitting the '*' problem...

Anyway, I do think that your suggestion is to the point, so I am going
to suggest it to the flycheck people. It certainly can't heart to call
this ectra function in non-windows ebvironments, as it doesn't do
anything there.

Thanks Eli,

Guido



>

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

* Re: flycheck orgmode on windows invalid output file name
  2016-06-05 19:41   ` Guido Van Hoecke
@ 2016-06-06  2:29     ` Eli Zaretskii
  2016-06-06  6:43       ` Guido Van Hoecke
  0 siblings, 1 reply; 6+ messages in thread
From: Eli Zaretskii @ 2016-06-06  2:29 UTC (permalink / raw)
  To: help-gnu-emacs; +Cc: emacs-orgmode

> From: Guido Van Hoecke <guivho@gmail.com>
> Date: Sun, 5 Jun 2016 21:41:18 +0200
> Cc: help-gnu-emacs <help-gnu-emacs@gnu.org>, orgmode <emacs-orgmode@gnu.org>
> 
> For testing i went to change flycheck-temp-file-system in flycheck.el
> so that it reads
> 
> (setq tempfile (convert-standard-filename (expand-file-name
> (file-name-nondirectory filename)
>            directory)))
> 
> rather than the original
> 
> (setq tempfile (expand-file-name (file-name-nondirectory filename)
>            directory))
> 
> I than edebugged the flycheck-temp-file-system with the
> "c:/Users/guivh/emacs-guivho/.flycheck_emacs-guivho.org[*Org Src
> emacs-guivho.org[ emacs-lisp ]*]") filename, and it nicely produced a
> tempfile where the '*'s are replaced by '!'s.
> 
> Still, when editing elisp blocks from my elisp.org files, I keep
> hitting the '*' problem...

What is "the '*' problem", exactly?

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

* Re: flycheck orgmode on windows invalid output file name
  2016-06-06  2:29     ` Eli Zaretskii
@ 2016-06-06  6:43       ` Guido Van Hoecke
  2016-06-06 14:51         ` Eli Zaretskii
  0 siblings, 1 reply; 6+ messages in thread
From: Guido Van Hoecke @ 2016-06-06  6:43 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: help-gnu-emacs, orgmode

On 6 June 2016 at 04:29, Eli Zaretskii <eliz@gnu.org> wrote:
>> From: Guido Van Hoecke <guivho@gmail.com>
>> Date: Sun, 5 Jun 2016 21:41:18 +0200
>> Cc: help-gnu-emacs <help-gnu-emacs@gnu.org>, orgmode <emacs-orgmode@gnu.org>
>>
>> For testing i went to change flycheck-temp-file-system in flycheck.el
>> so that it reads
>>
>> (setq tempfile (convert-standard-filename (expand-file-name
>> (file-name-nondirectory filename)
>>            directory)))
>>
>> rather than the original
>>
>> (setq tempfile (expand-file-name (file-name-nondirectory filename)
>>            directory))
>>
>> I than edebugged the flycheck-temp-file-system with the
>> "c:/Users/guivh/emacs-guivho/.flycheck_emacs-guivho.org[*Org Src
>> emacs-guivho.org[ emacs-lisp ]*]") filename, and it nicely produced a
>> tempfile where the '*'s are replaced by '!'s.
>>
>> Still, when editing elisp blocks from my elisp.org files, I keep
>> hitting the '*' problem...
>
> What is "the '*' problem", exactly?
>
Filenames with '*'.
Flycheck member lunaryorn accepted to implement your
convert-standard-filename suggestion and implemented it in master.

Thanks again Eli.

Guido

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

* Re: flycheck orgmode on windows invalid output file name
  2016-06-06  6:43       ` Guido Van Hoecke
@ 2016-06-06 14:51         ` Eli Zaretskii
  0 siblings, 0 replies; 6+ messages in thread
From: Eli Zaretskii @ 2016-06-06 14:51 UTC (permalink / raw)
  To: help-gnu-emacs; +Cc: emacs-orgmode

> From: Guido Van Hoecke <guivho@gmail.com>
> Date: Mon, 6 Jun 2016 08:43:00 +0200
> Cc: help-gnu-emacs <help-gnu-emacs@gnu.org>, orgmode <emacs-orgmode@gnu.org>
> 
> >> Still, when editing elisp blocks from my elisp.org files, I keep
> >> hitting the '*' problem...
> >
> > What is "the '*' problem", exactly?
> >
> Filenames with '*'.

But I thought my suggested change fixed that, as the file names no
longer have '*'.  Right?

> Flycheck member lunaryorn accepted to implement your
> convert-standard-filename suggestion and implemented it in master.
> 
> Thanks again Eli.

You are welcome.

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

end of thread, other threads:[~2016-06-06 14:51 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-06-05 10:45 flycheck orgmode on windows invalid output file name Guido Van Hoecke
2016-06-05 15:25 ` Eli Zaretskii
2016-06-05 19:41   ` Guido Van Hoecke
2016-06-06  2:29     ` Eli Zaretskii
2016-06-06  6:43       ` Guido Van Hoecke
2016-06-06 14:51         ` Eli Zaretskii

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

	https://git.savannah.gnu.org/cgit/emacs/org-mode.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).