On Tue, Jul 9, 2013 at 2:00 AM, Allan Odgaard <mailinglist@textmate.org> wrote:
On 9 Jul 2013, at 2:31, Jeff Weinberger wrote:

[…] after I saved […] the execute permission was gone […]

1) Is this possible? Does Textmate do this?

No, TextMate will preserve the original file’s metadata.

It will do an automatic ‘chmod a+x’ for certain file types (with shebang), via a bundle item, but that is the opposite of your issue.

That said, if you open the file in Transmit then Transmit will download it to a temporary and open that temporary file in TextMate. When TextMate saves, Transmit will upload the file, so the issue is more likely with Transmit not preserving the server’s file meta data.

I assume you did “touch” and “chmod u+x” on the server (via ssh or similar).

First, thank you! This makes perfect sense. I will check to see if Transmit might be causing this. 

I wonder, though, when you say that TextMate preserves the original file's metadata, if that isn't the cause. Here's why I wonder:

The sequence of events is this:

- SSH to server with a terminal window 
- touch filename
- open filename with TextMate via Transmit
- edit file
- save file (but keep it open in TextMate)
- chmod u+x filename
- ./filename
- edit in TextMate
- Save from TextMate (and keep open)
----> 'x' permission is gone

If TextMate re-writes the file with the metadata from the time it was originally opened, then that would cause the issue. If it writes the file without changing the then-current metadata (which have changed since it was opened) then the issue is likely Transmit.

What do you think?

Thank you so much for your help and advice on this!