unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#9879: 23.3; making script executable with tramp
@ 2011-10-26 18:48 Dan Gildea
  2011-10-27 23:17 ` Glenn Morris
  0 siblings, 1 reply; 10+ messages in thread
From: Dan Gildea @ 2011-10-26 18:48 UTC (permalink / raw)
  To: 9879

emacs -Q

(add-hook 'after-save-hook
'executable-make-buffer-file-executable-if-script-p)

open new remote file with tramp with name ending in .sh

add #!/bin/bash

save file

receive following error message:
executable-make-buffer-file-executable-if-script-p: Wrong type
argument: number-or-marker-p, nil






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

* bug#9879: 23.3; making script executable with tramp
  2011-10-26 18:48 bug#9879: 23.3; making script executable with tramp Dan Gildea
@ 2011-10-27 23:17 ` Glenn Morris
  2011-10-27 23:42   ` Dan Gildea
  0 siblings, 1 reply; 10+ messages in thread
From: Glenn Morris @ 2011-10-27 23:17 UTC (permalink / raw)
  To: Dan Gildea; +Cc: 9879

Dan Gildea wrote:

> emacs -Q
>
> (add-hook 'after-save-hook
> 'executable-make-buffer-file-executable-if-script-p)
>
> open new remote file with tramp with name ending in .sh
>
> add #!/bin/bash
>
> save file
>
> receive following error message:
> executable-make-buffer-file-executable-if-script-p: Wrong type
> argument: number-or-marker-p, nil

I am unable to reproduce this using Emacs 23.3 and Tramp's scpc method.
The file is correctly made executable. Perhaps you could give more
details about what Tramp method you are using, etc. Also perhaps do M-x
toggle-debug-on-error, repeat the process, and post the resulting
backtrace. Though I guess the error can only be due to file-modes
returning nil.





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

* bug#9879: 23.3; making script executable with tramp
  2011-10-27 23:17 ` Glenn Morris
@ 2011-10-27 23:42   ` Dan Gildea
  2011-11-11 20:44     ` Glenn Morris
  0 siblings, 1 reply; 10+ messages in thread
From: Dan Gildea @ 2011-10-27 23:42 UTC (permalink / raw)
  To: Glenn Morris; +Cc: 9879

On Thu, October 27, 2011 at  7:17PM, Glenn Morris wrote:
>I am unable to reproduce this using Emacs 23.3 and Tramp's scpc method.
>The file is correctly made executable. Perhaps you could give more
>details about what Tramp method you are using, etc. Also perhaps do M-x
>toggle-debug-on-error, repeat the process, and post the resulting
>backtrace. Though I guess the error can only be due to file-modes
>returning nil.

Thanks for looking into this.  I am using the scpc method.  The
local machine is a Mac (10.7) and the remote machine is linux
(fedora 15).

Here is the backtrace:

Debugger entered--Lisp error: (wrong-type-argument number-or-marker-p nil)
   logand(nil 73)
   executable-make-buffer-file-executable-if-script-p()
   run-hooks(after-save-hook)
   basic-save-buffer()
   save-buffer(1)
   call-interactively(save-buffer nil nil)

emacs version:

GNU Emacs 23.3.1 (x86_64-apple-darwin11.2.0, GTK+ Version 2.24.6)






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

* bug#9879: 23.3; making script executable with tramp
  2011-10-27 23:42   ` Dan Gildea
@ 2011-11-11 20:44     ` Glenn Morris
  2011-11-13 10:42       ` Michael Albinus
  0 siblings, 1 reply; 10+ messages in thread
From: Glenn Morris @ 2011-11-11 20:44 UTC (permalink / raw)
  To: michael.albinus; +Cc: 9879, Dan Gildea


Hi Michael,

Might this be an issue with Tramp's file-modes handler?

Dan Gildea wrote:

> I am using the scpc method. The local machine is a Mac (10.7) and the
> remote machine is linux (fedora 15).
>
> Here is the backtrace:
>
> Debugger entered--Lisp error: (wrong-type-argument number-or-marker-p nil)
>   logand(nil 73)
>   executable-make-buffer-file-executable-if-script-p()
>   run-hooks(after-save-hook)
>   basic-save-buffer()
>   save-buffer(1)
>   call-interactively(save-buffer nil nil)
>
> emacs version:
>
> GNU Emacs 23.3.1 (x86_64-apple-darwin11.2.0, GTK+ Version 2.24.6)





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

* bug#9879: 23.3; making script executable with tramp
  2011-11-11 20:44     ` Glenn Morris
@ 2011-11-13 10:42       ` Michael Albinus
  2011-11-13 14:15         ` Daniel Gildea
  0 siblings, 1 reply; 10+ messages in thread
From: Michael Albinus @ 2011-11-13 10:42 UTC (permalink / raw)
  To: Glenn Morris; +Cc: 9879, Dan Gildea

Glenn Morris <rgm@gnu.org> writes:

> Hi Michael,

Hi,

> Might this be an issue with Tramp's file-modes handler?

Tramp's file name handler is very short:

(defun tramp-handle-file-modes (filename)
  "Like `file-modes' for Tramp files."
  (let ((truename (or (file-truename filename) filename)))
    (when (file-exists-p truename)
      (tramp-mode-string-to-int (nth 8 (file-attributes truename))))))

Maybe there are unexpected results for `file-truename', who knows.

Dan, could you, please, set tramp-verbose to 9 and rerun the test? There
will be a debug buffer, which you could show us for analysis.

Best regards, Michael.





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

* bug#9879: 23.3; making script executable with tramp
  2011-11-13 10:42       ` Michael Albinus
@ 2011-11-13 14:15         ` Daniel Gildea
  2011-11-13 16:14           ` Michael Albinus
  0 siblings, 1 reply; 10+ messages in thread
From: Daniel Gildea @ 2011-11-13 14:15 UTC (permalink / raw)
  To: Michael Albinus; +Cc: 9879, Dan Gildea


On Nov 13, 2011, at 5:42 AM, Michael Albinus wrote:

> Dan, could you, please, set tramp-verbose to 9 and rerun the test? There
> will be a debug buffer, which you could show us for analysis.

Here is what I get:


08:44:10.700102 tramp-get-connection-property (7) # stat \stat
08:44:10.700209 tramp-do-file-attributes-with-stat (5) # file attributes with stat: /u/gildea/xx.sh
08:44:10.700346 tramp-get-connection-property (7) # file-exists test -e
08:44:10.700474 tramp-get-connection-property (7) # test test
08:44:10.700590 tramp-get-connection-property (7) # stat \stat
08:44:10.700716 tramp-get-connection-property (7) # process-name nil
08:44:10.700835 tramp-get-connection-property (7) # process-name nil
08:44:10.700943 tramp-get-connection-property (7) # process-buffer nil
08:44:10.701080 tramp-get-connection-property (7) # last-cmd-time (20159 51626 636141)
08:44:10.701204 tramp-get-connection-property (7) # process-name nil
08:44:10.701335 tramp-get-connection-property (7) # remote-echo nil
08:44:10.701443 tramp-send-command (6) # ( (test -e /u/gildea/xx.sh || test -h /u/gildea/xx.sh) && \stat -c '(("%N") %h %u %g %Xe0 %Ye0 %Ze0 %se0 "%A" t %ie0 -1)' /u/gildea/xx.sh || echo nil) 2>/dev/null; echo tramp_exit_status $?
08:44:10.701553 tramp-get-connection-property (7) # process-name nil
08:44:10.701683 tramp-get-connection-property (7) # chunksize 0
08:44:10.701809 tramp-set-connection-property (7) # last-cmd-time (20159 51626 701746)
08:44:10.701924 tramp-get-connection-property (7) # process-buffer nil
08:44:10.702132 tramp-get-connection-property (7) # check-remote-echo nil
08:44:10.702257 tramp-get-connection-property (7) # check-remote-echo nil
08:44:10.769048 tramp-get-connection-property (7) # check-remote-echo nil
08:44:10.769183 tramp-get-connection-property (7) # check-remote-echo nil
08:44:10.769391 tramp-get-connection-property (7) # check-remote-echo nil
08:44:10.769513 tramp-get-connection-property (7) # check-remote-echo nil
08:44:10.769650 tramp-wait-for-regexp (6) # 
(("`/u/gildea/xx.sh'") 1 1255 103 1321191850e0 1321191850e0 1321191850e0 13e0 "-rw-r--r--" t 1409590e0 -1)
tramp_exit_status 0
///6c17ef10f19f5685b3493b84a4448f0c#$
08:44:10.769831 tramp-get-connection-property (7) # process-buffer nil
08:44:10.769969 tramp-get-connection-property (7) # process-buffer nil
08:44:10.770162 tramp-get-connection-property (7) # gid-integer 103
08:44:10.770339 tramp-set-file-property (8) # /u/gildea/xx.sh file-attributes-integer (nil 1 1255 103 (20159 51626) (20159 51626) (20159 51626) 13 -rw-r--r-- nil (21 . 33334) (-1 . 0))
08:44:10.770626 tramp-sh-handle-write-region (0) # Wrote /scpc:e15.cs.rochester.edu:/u/gildea/xx.sh
08:44:10.771659 tramp-get-file-property (8) # /u/gildea/xx.sh file-attributes-integer (nil 1 1255 103 (20159 51626) (20159 51626) (20159 51626) 13 -rw-r--r-- nil (21 . 33334) (-1 . 0))
08:44:10.772281 tramp-get-file-property (8) # /u/gildea/xx.sh file-truename undef
08:44:10.772404 tramp-sh-handle-file-truename (4) # Finding true name for `/scpc:e15.cs.rochester.edu:/u/gildea/xx.sh'
08:44:10.772512 tramp-get-connection-property (7) # readlink \readlink
08:44:10.772615 tramp-get-connection-property (7) # readlink \readlink
08:44:10.772748 tramp-get-connection-property (7) # process-name nil
08:44:10.772877 tramp-get-connection-property (7) # process-name nil
08:44:10.772995 tramp-get-connection-property (7) # process-buffer nil
08:44:10.773132 tramp-get-connection-property (7) # last-cmd-time (20159 51626 701746)
08:44:10.773256 tramp-get-connection-property (7) # process-name nil
08:44:10.773389 tramp-get-connection-property (7) # remote-echo nil
08:44:10.773494 tramp-send-command (6) # echo "\"`\readlink --canonicalize-missing /u/gildea/xx.sh`\"" 2>/dev/null; echo tramp_exit_status $?
08:44:10.773604 tramp-get-connection-property (7) # process-name nil
08:44:10.773736 tramp-get-connection-property (7) # chunksize 0
08:44:10.773863 tramp-set-connection-property (7) # last-cmd-time (20159 51626 773800)
08:44:10.773976 tramp-get-connection-property (7) # process-buffer nil
08:44:10.774170 tramp-get-connection-property (7) # check-remote-echo nil
08:44:10.774296 tramp-get-connection-property (7) # check-remote-echo nil
08:44:10.841034 tramp-get-connection-property (7) # check-remote-echo nil
08:44:10.841168 tramp-get-connection-property (7) # check-remote-echo nil
08:44:10.841385 tramp-get-connection-property (7) # check-remote-echo nil
08:44:10.841507 tramp-get-connection-property (7) # check-remote-echo nil
08:44:10.841642 tramp-wait-for-regexp (6) # 
"/home/vax7/u19/gildea/xx.sh"
tramp_exit_status 0
///6c17ef10f19f5685b3493b84a4448f0c#$
08:44:10.841827 tramp-get-connection-property (7) # process-buffer nil
08:44:10.854068 tramp-get-connection-property (7) # process-buffer nil
08:44:10.854256 tramp-sh-handle-file-truename (4) # True name of `/scpc:e15.cs.rochester.edu:/u/gildea/xx.sh' is `/home/vax7/u19/gildea/xx.sh'
08:44:10.854418 tramp-set-file-property (8) # /u/gildea/xx.sh file-truename /scpc:e15.cs.rochester.edu:/home/vax7/u19/gildea/xx.sh
08:44:10.854782 tramp-get-file-property (8) # /home/vax7/u19/gildea/xx.sh file-exists-p nil




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

* bug#9879: 23.3; making script executable with tramp
  2011-11-13 14:15         ` Daniel Gildea
@ 2011-11-13 16:14           ` Michael Albinus
  2011-11-16 19:59             ` Michael Albinus
  0 siblings, 1 reply; 10+ messages in thread
From: Michael Albinus @ 2011-11-13 16:14 UTC (permalink / raw)
  To: Daniel Gildea; +Cc: 9879, Dan Gildea

Daniel Gildea <gildea@cs.rochester.edu> writes:

> Here is what I get:

You are working on "/u/gildea/xx.sh", which is a symlink to
"/home/vax7/u19/gildea/xx.sh". You have written "/u/gildea/xx.sh". Tramp
tries to check "/home/vax7/u19/gildea/xx.sh" file properties afterwards,
and it decides that this file doesn't exist.

This is likely because of Tramp's cache, which hasn't been refreshed
accordingly for the symlink's target after writing.

I will check how to fix this; unfortunately there is no simple patch. It
might take a day, or two.

Thanks for testing, and best regards, Michael.





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

* bug#9879: 23.3; making script executable with tramp
  2011-11-13 16:14           ` Michael Albinus
@ 2011-11-16 19:59             ` Michael Albinus
  2011-11-16 20:26               ` Dan Gildea
  0 siblings, 1 reply; 10+ messages in thread
From: Michael Albinus @ 2011-11-16 19:59 UTC (permalink / raw)
  To: Daniel Gildea; +Cc: 9879, Dan Gildea

Michael Albinus <michael.albinus@gmx.de> writes:

> You are working on "/u/gildea/xx.sh", which is a symlink to
> "/home/vax7/u19/gildea/xx.sh". You have written "/u/gildea/xx.sh". Tramp
> tries to check "/home/vax7/u19/gildea/xx.sh" file properties afterwards,
> and it decides that this file doesn't exist.
>
> This is likely because of Tramp's cache, which hasn't been refreshed
> accordingly for the symlink's target after writing.
>
> I will check how to fix this; unfortunately there is no simple patch. It
> might take a day, or two.

The following two patches shall solve the problem, could you, please
verify?

The patches are for Emacs 23.3, however, the line numbers might be a
little bit different.

--8<---------------cut here---------------start------------->8---
Index: tramp.el
===================================================================
RCS file: /sources/tramp/tramp/lisp/tramp.el,v
retrieving revision 2.814.2.16
diff -c -r2.814.2.16 tramp.el
*** tramp.el	12 Oct 2011 14:56:21 -0000	2.814.2.16
--- tramp.el	16 Nov 2011 19:50:48 -0000
***************
*** 2671,2776 ****
  (defun tramp-handle-file-truename (filename &optional counter prev-dirs)
    "Like `file-truename' for Tramp files."
    (with-parsed-tramp-file-name (expand-file-name filename) nil
!     (with-file-property v localname "file-truename"
!       (let ((result nil))			; result steps in reverse order
! 	(tramp-message v 4 "Finding true name for `%s'" filename)
! 	(cond
! 	 ;; Use GNU readlink --canonicalize-missing where available.
! 	 ((tramp-get-remote-readlink v)
! 	  (setq result
! 		(tramp-send-command-and-read
! 		 v
! 		 (format "echo \"\\\"`%s --canonicalize-missing %s`\\\"\""
! 			 (tramp-get-remote-readlink v)
! 			 (tramp-shell-quote-argument localname)))))
! 
! 	 ;; Use Perl implementation.
! 	 ((and (tramp-get-remote-perl v)
! 	       (tramp-get-connection-property v "perl-file-spec" nil)
! 	       (tramp-get-connection-property v "perl-cwd-realpath" nil))
! 	  (tramp-maybe-send-script
! 	   v tramp-perl-file-truename "tramp_perl_file_truename")
! 	  (setq result
! 		(tramp-send-command-and-read
! 		 v
! 		 (format "tramp_perl_file_truename %s"
! 			 (tramp-shell-quote-argument localname)))))
! 
! 	 ;; Do it yourself.  We bind `directory-sep-char' here for
! 	 ;; XEmacs on Windows, which would otherwise use backslash.
! 	 (t (let* ((directory-sep-char ?/)
! 		   (steps (tramp-compat-split-string localname "/"))
! 		   (localnamedir (tramp-run-real-handler
! 				  'file-name-as-directory (list localname)))
! 		   (is-dir (string= localname localnamedir))
! 		   (thisstep nil)
! 		   (numchase 0)
! 		   ;; Don't make the following value larger than
! 		   ;; necessary.  People expect an error message in a
! 		   ;; timely fashion when something is wrong;
! 		   ;; otherwise they might think that Emacs is hung.
! 		   ;; Of course, correctness has to come first.
! 		   (numchase-limit 20)
! 		   symlink-target)
! 	      (while (and steps (< numchase numchase-limit))
! 		(setq thisstep (pop steps))
! 		(tramp-message
! 		 v 5 "Check %s"
! 		 (mapconcat 'identity
! 			    (append '("") (reverse result) (list thisstep))
! 			    "/"))
! 		(setq symlink-target
! 		      (nth 0 (file-attributes
! 			      (tramp-make-tramp-file-name
! 			       method user host
! 			       (mapconcat 'identity
! 					  (append '("")
! 						  (reverse result)
! 						  (list thisstep))
! 					  "/")))))
! 		(cond ((string= "." thisstep)
! 		       (tramp-message v 5 "Ignoring step `.'"))
! 		      ((string= ".." thisstep)
! 		       (tramp-message v 5 "Processing step `..'")
! 		       (pop result))
! 		      ((stringp symlink-target)
! 		       ;; It's a symlink, follow it.
! 		       (tramp-message v 5 "Follow symlink to %s" symlink-target)
! 		       (setq numchase (1+ numchase))
! 		       (when (file-name-absolute-p symlink-target)
! 			 (setq result nil))
! 		       ;; If the symlink was absolute, we'll get a string like
! 		       ;; "/user@host:/some/target"; extract the
! 		       ;; "/some/target" part from it.
! 		       (when (tramp-tramp-file-p symlink-target)
! 			 (unless (tramp-equal-remote filename symlink-target)
! 			   (tramp-error
! 			    v 'file-error
! 			    "Symlink target `%s' on wrong host" symlink-target))
! 			 (setq symlink-target localname))
! 		       (setq steps
! 			     (append (tramp-compat-split-string
! 				      symlink-target "/")
! 				     steps)))
! 		      (t
! 		       ;; It's a file.
! 		       (setq result (cons thisstep result)))))
! 	      (when (>= numchase numchase-limit)
! 		(tramp-error
! 		 v 'file-error
! 		 "Maximum number (%d) of symlinks exceeded" numchase-limit))
! 	      (setq result (reverse result))
! 	      ;; Combine list to form string.
! 	      (setq result
! 		    (if result
! 			(mapconcat 'identity (cons "" result) "/")
! 		      "/"))
! 	      (when (and is-dir (or (string= "" result)
! 				    (not (string= (substring result -1) "/"))))
! 		(setq result (concat result "/"))))))
  
!         (tramp-message v 4 "True name of `%s' is `%s'" filename result)
!         (tramp-make-tramp-file-name method user host result)))))
  
  ;; Basic functions.
  
--- 2671,2780 ----
  (defun tramp-handle-file-truename (filename &optional counter prev-dirs)
    "Like `file-truename' for Tramp files."
    (with-parsed-tramp-file-name (expand-file-name filename) nil
!     (tramp-make-tramp-file-name method user host
!       (with-file-property v localname "file-truename"
! 	(let ((result nil))			; result steps in reverse order
! 	  (tramp-message v 4 "Finding true name for `%s'" filename)
! 	  (cond
! 	   ;; Use GNU readlink --canonicalize-missing where available.
! 	   ((tramp-get-remote-readlink v)
! 	    (setq result
! 		  (tramp-send-command-and-read
! 		   v
! 		   (format "echo \"\\\"`%s --canonicalize-missing %s`\\\"\""
! 			   (tramp-get-remote-readlink v)
! 			   (tramp-shell-quote-argument localname)))))
! 
! 	   ;; Use Perl implementation.
! 	   ((and (tramp-get-remote-perl v)
! 		 (tramp-get-connection-property v "perl-file-spec" nil)
! 		 (tramp-get-connection-property v "perl-cwd-realpath" nil))
! 	    (tramp-maybe-send-script
! 	     v tramp-perl-file-truename "tramp_perl_file_truename")
! 	    (setq result
! 		  (tramp-send-command-and-read
! 		   v
! 		   (format "tramp_perl_file_truename %s"
! 			   (tramp-shell-quote-argument localname)))))
! 
! 	   ;; Do it yourself.  We bind `directory-sep-char' here for
! 	   ;; XEmacs on Windows, which would otherwise use backslash.
! 	   (t (let* ((directory-sep-char ?/)
! 		     (steps (tramp-compat-split-string localname "/"))
! 		     (localnamedir (tramp-run-real-handler
! 				    'file-name-as-directory (list localname)))
! 		     (is-dir (string= localname localnamedir))
! 		     (thisstep nil)
! 		     (numchase 0)
! 		     ;; Don't make the following value larger than
! 		     ;; necessary.  People expect an error message in
! 		     ;; a timely fashion when something is wrong;
! 		     ;; otherwise they might think that Emacs is hung.
! 		     ;; Of course, correctness has to come first.
! 		     (numchase-limit 20)
! 		     symlink-target)
! 		(while (and steps (< numchase numchase-limit))
! 		  (setq thisstep (pop steps))
! 		  (tramp-message
! 		   v 5 "Check %s"
! 		   (mapconcat 'identity
! 			      (append '("") (reverse result) (list thisstep))
! 			      "/"))
! 		  (setq symlink-target
! 			(nth 0 (file-attributes
! 				(tramp-make-tramp-file-name
! 				 method user host
! 				 (mapconcat 'identity
! 					    (append '("")
! 						    (reverse result)
! 						    (list thisstep))
! 					    "/")))))
! 		  (cond ((string= "." thisstep)
! 			 (tramp-message v 5 "Ignoring step `.'"))
! 			((string= ".." thisstep)
! 			 (tramp-message v 5 "Processing step `..'")
! 			 (pop result))
! 			((stringp symlink-target)
! 			 ;; It's a symlink, follow it.
! 			 (tramp-message
! 			  v 5 "Follow symlink to %s" symlink-target)
! 			 (setq numchase (1+ numchase))
! 			 (when (file-name-absolute-p symlink-target)
! 			   (setq result nil))
! 			 ;; If the symlink was absolute, we'll get a
! 			 ;; string like "/user@host:/some/target";
! 			 ;; extract the "/some/target" part from it.
! 			 (when (tramp-tramp-file-p symlink-target)
! 			   (unless (tramp-equal-remote filename symlink-target)
! 			     (tramp-error
! 			      v 'file-error
! 			      "Symlink target `%s' on wrong host"
! 			      symlink-target))
! 			   (setq symlink-target localname))
! 			 (setq steps
! 			       (append (tramp-compat-split-string
! 					symlink-target "/")
! 				       steps)))
! 			(t
! 			 ;; It's a file.
! 			 (setq result (cons thisstep result)))))
! 		(when (>= numchase numchase-limit)
! 		  (tramp-error
! 		   v 'file-error
! 		   "Maximum number (%d) of symlinks exceeded" numchase-limit))
! 		(setq result (reverse result))
! 		;; Combine list to form string.
! 		(setq result
! 		      (if result
! 			  (mapconcat 'identity (cons "" result) "/")
! 			"/"))
! 		(when (and is-dir
! 			   (or (string= "" result)
! 			       (not (string= (substring result -1) "/"))))
! 		  (setq result (concat result "/"))))))
  
! 	  (tramp-message v 4 "True name of `%s' is `%s'" filename result)
! 	  result)))))
  
  ;; Basic functions.
  
--8<---------------cut here---------------end--------------->8---

--8<---------------cut here---------------start------------->8---
Index: tramp-cache.el
===================================================================
RCS file: /sources/tramp/tramp/lisp/tramp-cache.el,v
retrieving revision 2.57.2.1
diff -c -r2.57.2.1 tramp-cache.el
*** tramp-cache.el	24 Jan 2011 10:09:40 -0000	2.57.2.1
--- tramp-cache.el	16 Nov 2011 19:54:34 -0000
***************
*** 145,150 ****
--- 145,155 ----
  
  (defun tramp-flush-file-property (vec file)
    "Remove all properties of FILE in the cache context of VEC."
+   ;; Remove file property of symlinks.
+   (let ((truename (tramp-get-file-property vec file "file-truename" nil)))
+     (when (and (stringp truename)
+ 	       (not (string-equal file truename)))
+       (tramp-flush-file-property vec truename)))
    ;; Unify localname.
    (setq vec (copy-sequence vec))
    (aset vec 3 (tramp-run-real-handler 'directory-file-name (list file)))
--8<---------------cut here---------------end--------------->8---

Best regards, Michael.





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

* bug#9879: 23.3; making script executable with tramp
  2011-11-16 19:59             ` Michael Albinus
@ 2011-11-16 20:26               ` Dan Gildea
  2011-11-16 21:55                 ` Michael Albinus
  0 siblings, 1 reply; 10+ messages in thread
From: Dan Gildea @ 2011-11-16 20:26 UTC (permalink / raw)
  To: Michael Albinus; +Cc: 9879

On Wed, November 16, 2011 at  8:59PM, Michael Albinus wrote:
>The following two patches shall solve the problem, could you, please
>verify?

works like a charm, thank you!

Dan





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

* bug#9879: 23.3; making script executable with tramp
  2011-11-16 20:26               ` Dan Gildea
@ 2011-11-16 21:55                 ` Michael Albinus
  0 siblings, 0 replies; 10+ messages in thread
From: Michael Albinus @ 2011-11-16 21:55 UTC (permalink / raw)
  To: Dan Gildea; +Cc: 9879-done

Dan Gildea <gildea@pobox.com> writes:

> works like a charm, thank you!

I've committed the patches to the trunk. Will be available with Emacs 24.1.

> Dan

Thanks for testing, and best regards, Michael.





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

end of thread, other threads:[~2011-11-16 21:55 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-10-26 18:48 bug#9879: 23.3; making script executable with tramp Dan Gildea
2011-10-27 23:17 ` Glenn Morris
2011-10-27 23:42   ` Dan Gildea
2011-11-11 20:44     ` Glenn Morris
2011-11-13 10:42       ` Michael Albinus
2011-11-13 14:15         ` Daniel Gildea
2011-11-13 16:14           ` Michael Albinus
2011-11-16 19:59             ` Michael Albinus
2011-11-16 20:26               ` Dan Gildea
2011-11-16 21:55                 ` 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).