with said:
You forgot ':w filename', which is likely what the OP meant if he's
using a vi clone. If he's using vim in particular, he might have meant
':saveas filename' which is like ':w filename' followed by ':r
filename'.
Me's corrected.
I was taking "Save as" (did he even use that term? I don't remember)
And this time, our prize goes toooooooooooooo... Uri!!!!
Message-ID: <
[email protected]>
Fsck, 20 days before!
as a generic name for the editor's "save the current buffer under a
different file name" functionality. Since that functionality is common
to just about every editor I've used in the past 25 years I don't see
much value in bringing editor-specific commands into the discussion.
I'll better skip redescribing differences between ':w' and ':sav'. The
only thing I have to note is that the 2nd command isn't ':r' it's
':filetype detect'. And let me focus on this point.
I've thought a lot about that, and I've got to conclusion that Save-As
never makes files executable itself. (sorry for bringing back toy-OS
strawman again.) In the toy-OS file type comes with the suffix.
Whenever filetype is associated with some executable we could describe
such file as executable (someone could do that executing double-click).
Thus '*.txt' is kind of executable. However, for the purpose of this
quarrel, we'll stay from this. Let's say that if a file ends on laps of
'query.dll' (I've checked, '*.exe' ends there) (pity, I've forgot to
check where ends '*.dll') then it's executable, if not (there're many
other ways (such a legacy aware system, btw)) then it's not.
Thus, if someone Save-Ases as executable type with whatever editor
(really, whatever, that doesn't matter if that's notepad, oowriter or
edlin) then that user makes file executable *explicitly*. And vice
versa. However, if filetype isn't changed than just created file is
taken from the current filetype (most probably it's not executable).
I think, that if OP would have double-clicked the problematic file then,
most probably, it would be executed. There're mime-types for this,
aren't they? Thus it's the shell (probably whatever) that doesn't give
a fsck about mime-types and pays attention to executable-bit only. (I
don't think that shell couldn't be subverted into that pervert
behaviour. And you know, it most probably will be.)
However, (and I'll check that tomorrow) what if '*.bat' doesn't go to
'query.dll'? Then we have to agree that '*.txt' is executable either.
Shortly, my point is that executability doesn't spring from a corner.
It's set explicitly. Manually or not. Although what *is* executability
is in competence of shell. Being it concrete or GUI.