[Geany-devel] [Bug] When saving a modified file, a new empty line is added

Maxime Pacary mpacary at xxxxx
Tue Dec 1 15:04:08 UTC 2009

Thanks for your answers.

I totally agree that a popup dialog for that would be ugly and annoying.
However, I think that this issue is quite important, since enabling that 
feature by default can be strongly distrurbing for PHP development.

After some thinking, I would suggest that :

  - the feature "*new line at end of file*" would be a drop-down list 
instead of a checkbox, with options "*according to file type*" 
(default), "*always*", "*never*"

  - when option "*according to file type*" is selected :
      - when (for example) a C/C++ file is saved, a new empty line is 
automatically added if necessary
      - when a PHP (or Javascript, CSS, HTML, SQL, XML, YML...) file is 
saved, no new empty line is added

  - details about file types requiring a "final empty line" or not, 
would be available in the manual.

This way, Geany's default behavior would be convenient for all 
programming languages (but user can "force" the behavior to whatever he 
prefers), and the user wouldn't be annoyed by any warning message.


Enrico Tröger a écrit :
> On Sat, 28 Nov 2009 11:01:52 +0100, Frank wrote:
>> On Thu, 26 Nov 2009 19:02:10 +0100
>> Maxime Pacary <mpacary at winsoft.fr> wrote:
>>> A nice colleague knowing better Geany told me that this could simply
>>> be disabled in preferences > files ; so please ignore that bug
>>> report, sorry. However, it could be nice to warn the user if he works
>>> on PHP files while having the feature "new line at end of file"
>>> enabled.
>> I don't see any big reason for adding a warning, maybe a pop-up or
>> something like that. In time this will be more annoying as helpful from
>> my point of view. I recommend just deactivate the feature and ensure to
>> insert empty line manual in case its needed. 
> Exactly.
> If you don't want Geany to insert new blank lines at the end of files,
> deactivate this feature. Adding a warning in whatever way, is just more
> annoying than helpful.
> And to be able to receive further answers and be able to send messages,
> you first need to subscribe to this mailing list. Thanks.
> http://lists.uvena.de/cgi-bin/mailman/listinfo/geany-devel
> Regards,
> Enrico

More information about the Devel mailing list