Ted Zlatanov <[EMAIL PROTECTED]> writes: > Very often I need to do a chmod for specific files after saving them, > for instance I would like a rule that all files matching > > .*lifelogs.com:.*html > > should have permissions "a+r" set after writing. I don't want to set > the umask open for all new files on this host, so I can't do it > through the shell variables. Is there a hook I can use in tramp, and > a command I can run in that hook to do what I want?
There is no predefined functionality in Tramp for doing this. It seems that set-default-file-modes sets a default which is Emacs-wide, so this is not a solution for you. Hm. But it seems to me that any mechanism for this should not be specific to Tramp, instead it should work for any files. How about writing a function that looks up the right modes in an alist and then invoke that function from after-save-hook? Would that work? I'm thinking that shell mode might have a mechanism for this. I vaguely recall that someone mentioned that shell mode can make sure that the file is executable after it is saved. Maybe that mechanism is general enough to be (ab)used for your purpose. Let us know your findings, it's an interesting subject. (I hope the other readers here won't mind :-) kai -- ~/.signature is: umop ap!sdn (Frank Nobis) _______________________________________________ Tramp-devel mailing list [EMAIL PROTECTED] http://mail.freesoftware.fsf.org/mailman/listinfo/tramp-devel
