all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Re: [Emacs-diffs] trunk r113420: * net/tramp-sh.el (tramp-sh-handle-vc-registered): Use `ignore-error'.
       [not found] <E1UyRIz-0005sJ-Kb@vcs.savannah.gnu.org>
@ 2013-07-15 23:50 ` Stefan Monnier
  2013-07-16  8:44   ` Michael Albinus
  0 siblings, 1 reply; 5+ messages in thread
From: Stefan Monnier @ 2013-07-15 23:50 UTC (permalink / raw
  To: Michael Albinus; +Cc: emacs-devel

> +	  (ignore-errors
> +	    (tramp-run-real-handler 'vc-registered (list file))))))))

Is it normal/common for (tramp-run-real-handler 'vc-registered (list
file)) to signal an error in some corner cases?


        Stefan



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

* Re: [Emacs-diffs] trunk r113420: * net/tramp-sh.el (tramp-sh-handle-vc-registered): Use `ignore-error'.
  2013-07-15 23:50 ` [Emacs-diffs] trunk r113420: * net/tramp-sh.el (tramp-sh-handle-vc-registered): Use `ignore-error' Stefan Monnier
@ 2013-07-16  8:44   ` Michael Albinus
  2013-07-16 21:16     ` Stefan Monnier
  0 siblings, 1 reply; 5+ messages in thread
From: Michael Albinus @ 2013-07-16  8:44 UTC (permalink / raw
  To: Stefan Monnier; +Cc: emacs-devel

Stefan Monnier <monnier@IRO.UMontreal.CA> writes:

>> +	  (ignore-errors
>> +	    (tramp-run-real-handler 'vc-registered (list file))))))))
>
> Is it normal/common for (tramp-run-real-handler 'vc-registered (list
> file)) to signal an error in some corner cases?

No. I have added this as self-defense of Tramp.

The error was triggered, when I have opened a file on a NAS via Tramp. I
have mounted the emacs source directory there, and I have tried to open
a file in that directory.

Due to the existence of .../emacs/.bzr, there was a call

  (process-file "bzr" nil t nil "status" "--no-classify" "README")

bzr is not installed on that machine, so this call failed.

The real cause of the problem is a design deficiency, I believe. vc-bzr
should check, whether bzr is installed. Unfortunately, we have only
`executable-find', which works on the local machine. We would need a
counterpart of this function for remote machines, like the pairs
`call-process'/`process-file' and `start-process'/`start-file-process'.

>         Stefan

Best regards, Michael.



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

* Re: [Emacs-diffs] trunk r113420: * net/tramp-sh.el (tramp-sh-handle-vc-registered): Use `ignore-error'.
  2013-07-16  8:44   ` Michael Albinus
@ 2013-07-16 21:16     ` Stefan Monnier
  2013-07-17  6:59       ` Michael Albinus
  2017-07-10 15:53       ` Michael Albinus
  0 siblings, 2 replies; 5+ messages in thread
From: Stefan Monnier @ 2013-07-16 21:16 UTC (permalink / raw
  To: Michael Albinus; +Cc: emacs-devel

>>> +	  (ignore-errors
>>> +	    (tramp-run-real-handler 'vc-registered (list file))))))))
>> Is it normal/common for (tramp-run-real-handler 'vc-registered (list
>> file)) to signal an error in some corner cases?
> No. I have added this as self-defense of Tramp.

So an error here indicates an error in some code somewhere.  In this
case, with-demoted-errors is preferable.

> The error was triggered, when I have opened a file on a NAS via Tramp.
> I have mounted the emacs source directory there, and I have tried to
> open a file in that directory.
> Due to the existence of .../emacs/.bzr, there was a call
>   (process-file "bzr" nil t nil "status" "--no-classify" "README")
> bzr is not installed on that machine, so this call failed.

Sounds like a bug in vc-bzr-register.  Could you either try and fix it
there (catching the error right there), or file a bug report for it?


        Stefan



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

* Re: [Emacs-diffs] trunk r113420: * net/tramp-sh.el (tramp-sh-handle-vc-registered): Use `ignore-error'.
  2013-07-16 21:16     ` Stefan Monnier
@ 2013-07-17  6:59       ` Michael Albinus
  2017-07-10 15:53       ` Michael Albinus
  1 sibling, 0 replies; 5+ messages in thread
From: Michael Albinus @ 2013-07-17  6:59 UTC (permalink / raw
  To: Stefan Monnier; +Cc: emacs-devel

Stefan Monnier <monnier@IRO.UMontreal.CA> writes:

> So an error here indicates an error in some code somewhere.  In this
> case, with-demoted-errors is preferable.

Not for Tramp, it must be backwards compatible. Maybe I could add a
respective compatibility macro to Tramp.

> Sounds like a bug in vc-bzr-register.  Could you either try and fix it
> there (catching the error right there),

Will try.

>         Stefan

Best regards, Michael.



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

* Re: [Emacs-diffs] trunk r113420: * net/tramp-sh.el (tramp-sh-handle-vc-registered): Use `ignore-error'.
  2013-07-16 21:16     ` Stefan Monnier
  2013-07-17  6:59       ` Michael Albinus
@ 2017-07-10 15:53       ` Michael Albinus
  1 sibling, 0 replies; 5+ messages in thread
From: Michael Albinus @ 2017-07-10 15:53 UTC (permalink / raw
  To: Stefan Monnier; +Cc: emacs-devel

Stefan Monnier <monnier@IRO.UMontreal.CA> writes:

>>>> +	  (ignore-errors
>>>> +	    (tramp-run-real-handler 'vc-registered (list file))))))))
>>> Is it normal/common for (tramp-run-real-handler 'vc-registered (list
>>> file)) to signal an error in some corner cases?
>> No. I have added this as self-defense of Tramp.
>
> So an error here indicates an error in some code somewhere.  In this
> case, with-demoted-errors is preferable.

It took almost 4 years, but now I've fixed this.

>> The error was triggered, when I have opened a file on a NAS via Tramp.
>> I have mounted the emacs source directory there, and I have tried to
>> open a file in that directory.
>> Due to the existence of .../emacs/.bzr, there was a call
>>   (process-file "bzr" nil t nil "status" "--no-classify" "README")
>> bzr is not installed on that machine, so this call failed.
>
> Sounds like a bug in vc-bzr-register.  Could you either try and fix it
> there (catching the error right there), or file a bug report for it?

This bug doesn't happen anymore. I don't remember whether I've filed a
bug report, but it is fixed now.

>         Stefan

Best regards, Michael (proud, 'cos I've shortened my todo list).



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

end of thread, other threads:[~2017-07-10 15:53 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <E1UyRIz-0005sJ-Kb@vcs.savannah.gnu.org>
2013-07-15 23:50 ` [Emacs-diffs] trunk r113420: * net/tramp-sh.el (tramp-sh-handle-vc-registered): Use `ignore-error' Stefan Monnier
2013-07-16  8:44   ` Michael Albinus
2013-07-16 21:16     ` Stefan Monnier
2013-07-17  6:59       ` Michael Albinus
2017-07-10 15:53       ` Michael Albinus

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.