[Github-comments] [geany/geany] Geany's context again (#1836)

aplsimple notifications at xxxxx
Fri Apr 20 18:29:38 UTC 2018


There is some problem with Geany's context action.

At first let me cite the announcement of Geany 1.33 release:

_Some highlights: Show status message on attempt to execute empty context action_

Another cite is from an old good English dictionary:

_**context** n. the parts (of anything written) which go before or follow a word, expression or passage and which help to fix its meaning._

Combining these two quotations and applying them to the software we can see that the Geany's context is no context at all. To be more exact, this context is restricted to a selected text of Geany editor.

The real context should include the maximum of Geany's environment (after all, Geany is IDE :), i.e. it should contain:

  * a current file name
  * a current file directory
  * a current file type
  * a current file encoding
  * ... and so on ...

... for other options see "Statusbar Templates" and "Substitutions in commands and working directories" of Geany's help.

Also, Geany's location would be useful in the context because a context handler might require Geany to edit some files.

I try and explain why it's so important to have all this stuff in the Geany's context.

https://wiki.geany.org/howtos/using_with_tcl_tk shows one of many possible implementations of Geany's context processor. And here is its illustrating screenshot:

![fossil2](https://user-images.githubusercontent.com/37333988/39066066-7ce72ef8-44dc-11e8-8cb5-1ac88223b265.png)

Please, pay attention to the outlined parts. The fossil commands for processing _e_menu.tcl_ might take out the file name from Geany's context line as _%f wildcard_ if Geany did better. Instead of this, _e_menu.tcl_ (the name of file edited in Geany IDE!) is a literal text hammered into the menu items.

Other outlined parts in the picture demonstrate a usage of %s (current context of Geany) and its stripped of special symbols version. All this is great but far from satisfactory.

Turning to that announced Geany's ignoring the empty context, we can see that it's no highlight.

On the contrary, it's a serious mistake to restrict Geany this way. It's no Geany way.

Shortly, Geany's context has the obvious TODOs:
  * to include the maximum of Geany's environment into the context string
  * as consequence, to allow the call of context processor when %s is empty

and (as ideal):
  * to include %s wildcard into "Compile/ Build/ Run" strings

Probably, it's in no way a hard task as there are similar features in the "Compile/ Build/ Run" settings.

----------------

P.S.
A few words about Fossil VCS used in the picture above. It hasn't a direct support in Geany (as Git has) but it's very good for a compact team of developers, say 1 to 10, almost as good as Geany is. So that Fossil and Geany are nearly of the same niche. In some aspects Fossil is better than Git, e.g. its presentation of software history is better than Git's. As well as Fossil's way to roll back and redo back the changes. SQL in all its beauty. Of course it's "imho" only. I employ Git and Fossil on the same project - Git for highlighting the changes in Geany editor after the major commits, Fossil for all the rest.


-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/issues/1836
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.geany.org/pipermail/github-comments/attachments/20180420/0fe8ff17/attachment-0001.html>


More information about the Github-comments mailing list