unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* How to disable flymake in tramp buffers
@ 2010-08-12  9:18 Gary
  2010-08-12 11:45 ` Michael Albinus
  2010-08-12 12:00 ` Andrea Crotti
  0 siblings, 2 replies; 6+ messages in thread
From: Gary @ 2010-08-12  9:18 UTC (permalink / raw)
  To: help-gnu-emacs

I'm pretty tired of the messages telling my flymake has been switched
off every time I visit a file on a remote host. Is there any way to
ensure it is only switched on for local files?

-- 
Gary
GNU Emacs 23.2.1
emacsclient 23.2
1.7.4(0.225/5/3) 2010-04-07 11:02 Cygwin




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

* Re: How to disable flymake in tramp buffers
  2010-08-12  9:18 How to disable flymake in tramp buffers Gary
@ 2010-08-12 11:45 ` Michael Albinus
  2010-08-12 12:00 ` Andrea Crotti
  1 sibling, 0 replies; 6+ messages in thread
From: Michael Albinus @ 2010-08-12 11:45 UTC (permalink / raw)
  To: Gary; +Cc: help-gnu-emacs

Gary <help-gnu-emacs@garydjones.name> writes:

> I'm pretty tired of the messages telling my flymake has been switched
> off every time I visit a file on a remote host. Is there any way to
> ensure it is only switched on for local files?

Maybe you can tweak `flymake-allowed-file-name-masks'.

Best regards, Michael.



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

* Re: How to disable flymake in tramp buffers
  2010-08-12  9:18 How to disable flymake in tramp buffers Gary
  2010-08-12 11:45 ` Michael Albinus
@ 2010-08-12 12:00 ` Andrea Crotti
  2010-08-12 15:10   ` Gary
  1 sibling, 1 reply; 6+ messages in thread
From: Andrea Crotti @ 2010-08-12 12:00 UTC (permalink / raw)
  To: help-gnu-emacs

Gary <help-gnu-emacs@garydjones.name> writes:

> I'm pretty tired of the messages telling my flymake has been switched
> off every time I visit a file on a remote host. Is there any way to
> ensure it is only switched on for local files?

Why is it switched off?
For which modes does it do that?




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

* Re: How to disable flymake in tramp buffers
  2010-08-12 12:00 ` Andrea Crotti
@ 2010-08-12 15:10   ` Gary
  2010-08-13  8:45     ` Andrea Crotti
  2010-08-18 18:34     ` Michael Albinus
  0 siblings, 2 replies; 6+ messages in thread
From: Gary @ 2010-08-12 15:10 UTC (permalink / raw)
  To: help-gnu-emacs

Andrea Crotti wrote:
> Gary writes:
>
>> I'm pretty tired of the messages telling my flymake has been switched
>> off every time I visit a file on a remote host. Is there any way to
>> ensure it is only switched on for local files?
>
> Why is it switched off?

"Error (flymake): Flymake: Configuration error has occurred while
running (php -f test_flymake.php -l). Flymake will be switched OFF"

> For which modes does it do that?

It is a known problem with flymake when opening files on a remote
host. It uses the wrong function to start the checking process, I
believe. Michael Albinus knows more than I do, it was one of his posts I
found explaining it :) - see
http://groups.google.com/group/gnu.emacs.help/browse_thread/thread/dda14275ce2b8b02/aa9533ce3666e0ca
Sadly it looks like it hasn't even been changed in CVS :(

-- 
Gary
GNU Emacs 23.2.1
emacsclient 23.2
1.7.4(0.225/5/3) 2010-04-07 11:02 Cygwin




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

* Re: How to disable flymake in tramp buffers
  2010-08-12 15:10   ` Gary
@ 2010-08-13  8:45     ` Andrea Crotti
  2010-08-18 18:34     ` Michael Albinus
  1 sibling, 0 replies; 6+ messages in thread
From: Andrea Crotti @ 2010-08-13  8:45 UTC (permalink / raw)
  To: help-gnu-emacs

>
> It is a known problem with flymake when opening files on a remote
> host. It uses the wrong function to start the checking process, I
> believe. Michael Albinus knows more than I do, it was one of his posts I
> found explaining it :) - see
> http://groups.google.com/group/gnu.emacs.help/browse_thread/thread/dda14275ce2b8b02/aa9533ce3666e0ca
> Sadly it looks like it hasn't even been changed in CVS :(

Maybe you can use something like (in the hook)
--8<---------------cut here---------------start------------->8---
(when (not (tramp-file-name-p current-file-name))
    ; start flymake
--8<---------------cut here---------------end--------------->8---
(not tested)




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

* Re: How to disable flymake in tramp buffers
  2010-08-12 15:10   ` Gary
  2010-08-13  8:45     ` Andrea Crotti
@ 2010-08-18 18:34     ` Michael Albinus
  1 sibling, 0 replies; 6+ messages in thread
From: Michael Albinus @ 2010-08-18 18:34 UTC (permalink / raw)
  To: Gary; +Cc: help-gnu-emacs

Gary <help-gnu-emacs@garydjones.name> writes:

> It is a known problem with flymake when opening files on a remote
> host. It uses the wrong function to start the checking process, I
> believe. Michael Albinus knows more than I do, it was one of his posts I
> found explaining it :) - see

IIRC, I've asked for a bug report. Nobody did report, consequently
nobody did work on it.

However, the change is not risky. I have committed the following patch
to the Emacs 23 branch:

--8<---------------cut here---------------start------------->8---
*** /usr/local/src/emacs-23/lisp/progmodes/flymake.el.~99985~"	2010-08-18 20:19:10.536199643 +0200
--- /usr/local/src/emacs-23/lisp/progmodes/flymake.el	2010-08-18 16:44:18.545857439 +0200
***************
*** 1152,1158 ****
  	  (when dir
  	    (let ((default-directory dir))
  	      (flymake-log 3 "starting process on dir %s" default-directory)))
! 	  (setq process (apply 'start-process "flymake-proc" (current-buffer) cmd args))
  	  (set-process-sentinel process 'flymake-process-sentinel)
  	  (set-process-filter process 'flymake-process-filter)
            (push process flymake-processes)
--- 1152,1159 ----
  	  (when dir
  	    (let ((default-directory dir))
  	      (flymake-log 3 "starting process on dir %s" default-directory)))
! 	  (setq process (apply 'start-file-process
! 			       "flymake-proc" (current-buffer) cmd args))
  	  (set-process-sentinel process 'flymake-process-sentinel)
  	  (set-process-filter process 'flymake-process-filter)
            (push process flymake-processes)
--8<---------------cut here---------------end--------------->8---

Could somebody, please, check, whether this is TRT? I do not use flymake.

Best regards, Michael.



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

end of thread, other threads:[~2010-08-18 18:34 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-08-12  9:18 How to disable flymake in tramp buffers Gary
2010-08-12 11:45 ` Michael Albinus
2010-08-12 12:00 ` Andrea Crotti
2010-08-12 15:10   ` Gary
2010-08-13  8:45     ` Andrea Crotti
2010-08-18 18:34     ` Michael Albinus

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).