Hi All,
For Kate there is a tdeaddons sort plugin.
Does sorting selected text/rows/lines work for anybody else? If yes, is there a specific mantra to be sung to get the plugin to sort selected text?
The original README explicitly states "Sorts selected rows or whole file." The handbook says likewise with "Sort allows sorting a text file or selection of text."
For me the plugin ignores any selections. When the dialog appears the selection is emptied and sorts the entire document.
Sorting the characters of a word or phrase also fails. The dialog automatically populates the column fields but then fails to sort the selected text.
Please let me know if the plugin is broken or I am missing the big picture.
Thanks for your time!
D.A.
On 2023/02/01 11:42 AM, Darrell Anderson via tde-users wrote:
Hi All,
For Kate there is a tdeaddons sort plugin.
Does sorting selected text/rows/lines work for anybody else? If yes, is there a specific mantra to be sung to get the plugin to sort selected text?
The original README explicitly states "Sorts selected rows or whole file." The handbook says likewise with "Sort allows sorting a text file or selection of text."
For me the plugin ignores any selections. When the dialog appears the selection is emptied and sorts the entire document.
Sorting the characters of a word or phrase also fails. The dialog automatically populates the column fields but then fails to sort the selected text.
Please let me know if the plugin is broken or I am missing the big picture.
Thanks for your time!
D.A.
Seems to sort all the file regardless of selection. Even lose the last line in "descending" mode, if it is not empty. Cheers Michele
Am Mittwoch, 1. Februar 2023 schrieb Michele Calgaro via tde-users:
On 2023/02/01 11:42 AM, Darrell Anderson via tde-users wrote:
Hi All,
For Kate there is a tdeaddons sort plugin.
Does sorting selected text/rows/lines work for anybody else? If yes, is there a specific mantra to be sung to get the plugin to sort selected text?
The original README explicitly states "Sorts selected rows or whole file." The handbook says likewise with "Sort allows sorting a text file or selection of text."
For me the plugin ignores any selections. When the dialog appears the selection is emptied and sorts the entire document.
Sorting the characters of a word or phrase also fails. The dialog automatically populates the column fields but then fails to sort the selected text.
Please let me know if the plugin is broken or I am missing the big picture.
Thanks for your time!
D.A.
Seems to sort all the file regardless of selection. Even lose the last line in "descending" mode, if it is not empty. Cheers Michele
I can confirm that the bug is also on my system. That's TDE: R14.1.0 [DEVELOPMENT]. But…
If you use kate's own build-in command line (not konsole) which you can get by typing F7 or in Menu -> View -> "Switch to Command Line" (translated) and then type 'sort' it works as exspected and sorts only highlighted lines.
HTH
Kind regards, Stefan
On 2023/02/01 07:31 PM, Stefan Krusche via tde-users wrote:
If you use kate's own build-in command line (not konsole) which you can get by typing F7 or in Menu -> View -> "Switch to Command Line" (translated) and then type 'sort' it works as exspected and sorts only highlighted lines.
I think that is what the documentation mentioned by Darrell was referring to. The plugin is an external entity and I don't think it is in the doc. Cheers Michele
Am Mittwoch, 1. Februar 2023 schrieb Michele Calgaro via tde-users:
On 2023/02/01 07:31 PM, Stefan Krusche via tde-users wrote:
If you use kate's own build-in command line (not konsole) which you can get by typing F7 or in Menu -> View -> "Switch to Command Line" (translated) and then type 'sort' it works as exspected and sorts only highlighted lines.
I think that is what the documentation mentioned by Darrell was referring to. The plugin is an external entity and I don't think it is in the doc. Cheers Michele
Yes, that makes sense.
Cheers, Stefan
On 2/1/23 6:55 AM, Michele Calgaro via tde-users wrote:
I think that is what the documentation mentioned by Darrell was referring to. The plugin is an external entity and I don't think it is in the doc.
Not in the current TDE Kate handbook but is now explicitly mentioned in the KDE Kate handbook. I explain more in my previous reply. :-)
On 2/1/23 8:32 PM, Darrell Anderson via tde-users wrote:
Bug report filed:
https://mirror.git.trinitydesktop.org/gitea/TDE/tdeaddons/issues/16
On 2/1/23 4:31 AM, Stefan Krusche via tde-users wrote:
I can confirm that the bug is also on my system. That's TDE: R14.1.0 [DEVELOPMENT]. But…
If you use kate's own build-in command line (not konsole) which you can get by typing F7 or in Menu -> View -> "Switch to Command Line" (translated) and then type 'sort' it works as exspected and sorts only highlighted lines.
Thanks. I will file a bug report. I use sorting almost daily.
One work-around with the broken plugin is copy the target snippet of text to a blank document. Then the plugin functions as "expected" because the snippet is now the entire document. Requires additional steps but doable.
I was aware of the "hidden" F7 command line feature, but glad you mentioned that for others to know. As you noted that option requires additional steps but is doable, at least for ascending sorts. Can't do reverse sorts or unique (sort -u) sorts to remove duplicates (unless I misunderstand).
The F7 trick is a JavaScript (JS) script. The TDE Kate handbook mentions JS scripting but not the sort option. The newer KDE Kate handbook explicitly mentions the sort feature. I was thinking about snipping that section of the KDE handbook and word-smithing back into the TDE Kate handbook.
I can't find where the KDE devs moved the JS scripts. I think they merged the scripts directly into the main code because I can't find the files anywhere. In TDE the F7 sort script is installed from tdelibs and found at $TDEDIR/share/apps/katepart/scripts/sort.js. Curiously, the JS sort script has been in tdelibs since the KDE 3.x days. Another curiosity is the sort script seems to be the only functional script in that collection.
In KDE Kate, while still supporting F7, the sort script now is found in Tools-->Scripts-->Editing-->Sort Selected Text. I am hoping to dig into this to see how this option could be added to the TDE Kate Tools-->External Tools menu. That might be unnecessary if we get the tdeaddons sort plugin fixed. :-)
Seems to sort all the file regardless of selection. Even lose the last line in "descending" mode, if it is not empty.
Thanks. I notice when there are blank lines anywhere the lines (naturally) gets sorted to the beginning of the document. The breakage is disorienting, for sure.
I will post a bug report. I think the plugin is raw but conceptually close to what many people might want or need after the code is corrected.
I (still) write daily quite a bit. Sorting is one of those features I need often, such as sorting lists.