Closed webmaster128 closed 4 years ago
It's a bit weird. Looks like newline-type
is clearly defined as a property of GeditDocument
: https://developer.gnome.org/gedit/3.0/gedit-gedit-document.html
I don't have a clue how gedit development is organized, but if this commit from June 2014 landed in the software, the property was removed: https://mail.gnome.org/archives/commits-list/2014-June/msg07239.html
The property was documented up to 3.12 but is missing starting with 3.14.
Do you know what The property has been migrated to GtkSourceFile. means? Can GtkSourceFile be used instead?
@webmaster128 Do you know what The property has been migrated to GtkSourceFile. means? Can GtkSourceFile be used instead?
It means it is replaced by GtkSourceFile
, you need to check it's use if it is "a drop-in compatible" property with the old one...
I know this is a very old issue, but as I'm about to submit a PR to not-address this (meaning, silently ignore end_of_line
due to the loss of newline-type
), I thought I'd also share the findings that led me to that point.
Several properties of GeditDocument
, including newline-type
, were deprecated in Gedit 3.14 "Due to a new file loading and saving API in GtkSourceView".
The replacement for the GeditDocument.newline-type
property, as noted, is GtkSourceFile.newline-type
.
GtkSourceFile.newline-type
is a read-only property.
Gedit 3.14+ no longer provides any means of setting the line-ending mode, only of querying it. There is, therefore, nothing editorconfig-gedit can do except to ignore end_of_line
.
Hence PR #23, which I'm already applying to the gedit-plugin-editorconfig
package in Fedora.
After installing version 0.5.3 of this plugin and the core lib EditorConfig-0.12.1-py3-none-any.whl from pip3, I the the following error when opening a document
Gedit 3.18.3 from Ubuntu 16.04.