<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<body bgcolor="#FFFFFF" text="#000000">
I figured this should probably moved to geany-devel. <br>
-------- Original-Nachricht --------
<table class="moz-email-headers-table" border="0" cellpadding="0"
<th align="RIGHT" nowrap="nowrap" valign="BASELINE">Betreff: </th>
<td>Re: [Geany] A read-only command line option</td>
<th align="RIGHT" nowrap="nowrap" valign="BASELINE">Datum: </th>
<td>Thu, 03 Nov 2011 22:42:42 +0100</td>
<th align="RIGHT" nowrap="nowrap" valign="BASELINE">Von: </th>
<a class="moz-txt-link-rfc2396E" href="mailto:firstname.lastname@example.org"><email@example.com></a></td>
<th align="RIGHT" nowrap="nowrap" valign="BASELINE">Antwort
<td>Geany general discussion list <a class="moz-txt-link-rfc2396E" href="mailto:firstname.lastname@example.org"><email@example.com></a></td>
<th align="RIGHT" nowrap="nowrap" valign="BASELINE">An: </th>
<td><a class="moz-txt-link-abbreviated" href="mailto:firstname.lastname@example.org">email@example.com</a></td>
<pre>Am 06.03.2010 12:15, schrieb LUK ShunTim:
> Enrico Tröger wrote:
>> On Thu, 4 Mar 2010 12:47:35 +1100, Lex wrote:
>>> 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.
>> I complete second this suggestion, not only because it would be simple
>> to implement but also because it is simple to understand and so use.
>> If there are no major objections, I'll implement this in the near
>> future (whatever this means in terms of my limited spare time). Of
>> course, if anyone is faster than me and posts a patch, that'd be much
>> appreciated :).
> It'd be a nice-to-have, convenient enhancement. No hurry. Please take
> your time.
As I need it myself now, I implemented it. It was indeed relatively easy
to do. I've done it in the exact way as Lex suggested. You can find the
according pull request here: <a class="moz-txt-link-freetext" href="https://github.com/geany/geany/pull/11">https://github.com/geany/geany/pull/11</a>
Please feel free to comment, I hope I did it correctly. It seems to work
fine for me.
I didn't update the manual because I don't know how to do it.
On a related note: IMO the behavor of 5/6 should be changed in a
separate patch. Especially if you open from the command line, but also
with the file browser, you may get unwanted behavior (even data loss in
the extreme case) if you opened a file in read-only mode but it didn't
do it because it was already opened (I would switch to readonly for
non-readonly files, but not the other way around, i.e. play safe).
Geany mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Geany@uvena.de">Geany@uvena.de</a>
<a class="moz-txt-link-freetext" href="https://lists.uvena.de/cgi-bin/mailman/listinfo/geany">https://lists.uvena.de/cgi-bin/mailman/listinfo/geany</a>