On 4 March 2010 12:20, Sherwood Botsford <sgbotsford@gmail.com> wrote:





Very simple example as suggestion:

geany -ro file1.txt # opens file1.txt read-only
geany -ro file1.txt file2.txt # opens both files read-only

and so on...


Numbered for reference
 
1.
So does 'geany file1.txt -ro file2.txt' open the first read/write the second read only?

2.
Does 'geany -ro' make all files opened later read only?  This normally opens with a blank file -- how do you save it at all?

3.
What is the behaviour of  'geany -ro file1.txt'  then later from the file menu opening file2.txt?

4.
What about 'geany file1.txt -ro file2.txt' then from the menu open file3.txt -- status of file3?

5.
If geany is set to open all files that were open last time, but now you expressly open one read only, and it is one of those files, what happens.

6.
Or what about geany file*txt -ro file2.txt? -- in essence one file is specified twice on the command line. which takes precidence?

It's not clear to me what the best behaviour should be.

Respectfully,

Sherwood of Sherwood's Forests

Sherwood Botsford
Sherwood's Forests --  http://Sherwoods-Forests.com
780-848-2548
50042 Range Rd 31
Warburg, Alberta T0C 2T0



I'd suggest the simplest solutions,

 --readonly applies to all files on the command line irrespective of positioning and has no effect on any other files opened by session or menu.  This answers 1,2,3,4 (Note POSIX says it must be before any files but GNU allows anywhere)

Current behaviour on attempting to re-open a file with different read-only status is that nothing happens, the already open file is raised but not changed.  I would leave this as is irrespective of method of second opening (cli or menu)
This answers 5,6.

Cheers
Lex

_______________________________________________
Geany mailing list
Geany@uvena.de
http://lists.uvena.de/cgi-bin/mailman/listinfo/geany