[Github-comments] [geany/geany] Search for selected text when pressing [Ctrl]+[F] (#2693)
It would be nice if the selected text would be inserted into the "Search for:" input when pressing [Ctrl]+[F]. I know this behaviour from Notepad++ and it is very helpful. -- 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/2693
Re: [Github-comments] [geany/geany] Search for selected text when pressing [Ctrl]+[F] (#2693)
I noticed that the default behaviour of Geany is to put the selected text into the "Search for:" as long the search dialog is not opened. If you open it using [Ctrl]+[F] or via the menu does not matter. Since the feature is already implemented I think it should be a little bit easier to just add an option such like "Always search for selected text". -- 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/2693#issuecomment-747943255
[Github-comments] [geany/geany] Adds hidden preference 'always_set_from_selected' (default: FALSE) [...] (#2695)
See issue #2693. Adds hidden preference 'always_set_from_selected' (default: FALSE) which updates search phrase with selected text when search/replace dialog is reopened. Default behaviour is not changed. You can view, comment on, or merge this pull request online at: https://github.com/geany/geany/pull/2695 -- Commit Summary -- * Adds hidden preference 'always_set_from_selected' (default: FALSE) which updates search phrase with selected text when search/replace dialog is reopened. -- File Changes -- M src/keyfile.c (2) M src/search.c (9) M src/search.h (1) -- Patch Links -- https://github.com/geany/geany/pull/2695.patch https://github.com/geany/geany/pull/2695.diff -- 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/pull/2695
Re: [Github-comments] [geany/geany] Search for selected text when pressing [Ctrl]+[F] (#2693)
I created a pull request now, see #2695. Is it okay if I do another PL for the manual later? -- 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/2693#issuecomment-748676763
Re: [Github-comments] [geany/geany] Adds hidden preference 'always_set_from_selected' (default: FALSE) [...] (#2695)
> Where is the preference set? It should be on the find dialog not just read > from the config file. Since I don't think there is a need to often turn on/off this preference, I don't think we should extend the search/replace dialog with this setting, so I choosed the way of making it a hidden preference. It can be found and easily toggled at _Edit > Preferences > Various_, so there is no need to manually edit any config files. > There has been no discussion about it applying to replace. I don't think users which want to use this preference want a different behaviour between search/replace, so the setting applies to both of them. However, it would be no problem to make two hidden preferences if needed. > Needs to be documented in the manual (no it can't be left, it will be > forgotten, answering your question from #2693). Okay, then I will create a new PL with the second commit which updates the manual. -- 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/pull/2695#issuecomment-748681297
Re: [Github-comments] [geany/geany] Adds hidden preference 'always_set_from_selected' (default: FALSE) [...] (#2695)
> The name of the option always_set_from_selected suggested it was automatic, > but having had a chance to look at the PR code it appears to only happen on > ctrl-f (or whatever the search shortcut is set to). Correct, the update of "Search phrase:" with the selected text only happens on the "reopen" event of the already visible dialog initiated by using the shortcut or menu _Search > Find..._ or _Search > Replace..._ > @etkaar also just noticed you made the changes in master, not in a branch, > when you update can you please make the changes in a branch, that way > committers can switch back from your changes to master or another set of > changes easily. Thanks for the note, I will try that! -- 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/pull/2695#issuecomment-748763775
Re: [Github-comments] [geany/geany] Adds hidden preference 'always_set_from_selected' (default: FALSE) [...] (#2695)
Closed #2695. -- 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/pull/2695#event-4134789904
Re: [Github-comments] [geany/geany] Adds hidden preference 'always_set_from_selected' (default: FALSE) [...] (#2695)
@etkaar pushed 0 commits. -- You are receiving this because you are subscribed to this thread. View it on GitHub: https://github.com/geany/geany/pull/2695/files/30b2a5c2e81801c36a324b649ecf7c8b57aed37d..d2740f21feb84b6f951398c6f683674b2b56bfed
Re: [Github-comments] [geany/geany] Adds hidden preference 'always_set_from_selected' (default: FALSE) [...] (#2695)
@elextr Short question: How do I update the docs? By manually editing both _geany.txt_ and _geany.html_ or is there a another way? -- 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/pull/2695#issuecomment-748836300
[Github-comments] [geany/geany] Adds hidden preference 'always_set_from_selected' [...] (#2697)
See issue #2693. Adds hidden preference 'always_set_from_selected' (editable in the various preferences) which always updates the search phrase in search dialogs with selected text after reopening the dialog (esp. using shortcuts), since default behaviour is to insert selected text as search phrase only if the dialog was not already opened before. (Previous, closed PL: #2695) --- I noticed the _geany.html_ is automatically updated, so I only edited _geany.txt_. The change now applies to all search dialogs (Find, Find in Files and Replace) because I think it would be confusing if the preference would only apply to Find and Replace. @elextr I played around wit git and created a dedicated branch for this Pull Request only, I hope I have done all correct. You can view, comment on, or merge this pull request online at: https://github.com/geany/geany/pull/2697 -- Commit Summary -- * Adds hidden preference 'always_set_from_selected' (editable in the various preferences) which always updates the search phrase in search dialogs with selected text after reopening the dialog (esp. using shortcuts), since default behaviour is to insert selected text as search phrase only if the dialog was not already opened before. -- File Changes -- M doc/geany.txt (10) M src/keyfile.c (4) M src/search.c (12) M src/search.h (1) -- Patch Links -- https://github.com/geany/geany/pull/2697.patch https://github.com/geany/geany/pull/2697.diff -- 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/pull/2697
Re: [Github-comments] [geany/geany] Search for selected text when pressing [Ctrl]+[F] (#2693)
Closed because of pending Pull Request: #2697 -- 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/2693#issuecomment-748866968
Re: [Github-comments] [geany/geany] Search for selected text when pressing [Ctrl]+[F] (#2693)
Closed #2693. -- 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/2693#event-4135081562
Re: [Github-comments] [geany/geany] Adds hidden preference 'always_set_from_selected' (default: FALSE) [...] (#2695)
@elextr Yes, the next time I should better use Comment and not delete it. I deleted it because I in the meanwhile found out that _geany.html_ is automatically updated when I edit _geany.txt_. I made a new Pull Request (#2697) and think now all is correct (but the .html is not transferred to GitHub because it is not part of the GitHub repository). -- 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/pull/2695#issuecomment-748871123
[Github-comments] [geany/geany] Transparent search/replace dialogs when out of focus (#2698)
I am used to have the Find/Replace dialogs opened all the time and would like to have an option to make it a little bit transparent (50% or something) while out of focus. I believe there is no such preference yet implemented. I think it can be also a useful feature for other users, so I think about making a Pull Request for it (in case I am at all able to implement it). Do you think _Edit > Preferences > Interface_ would be a good place for such a preference? Notepad++ for instance has it on the search dialog itself, but I think we can save the space for more heavily used settings because I don't think this setting would be changed very often by users. -- 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/2698
Re: [Github-comments] [geany/geany] Transparent search/replace dialogs when out of focus (#2698)
Way more easy then I initially thought – I was not aware that I can use CSS since it is the first time at all I work with GTK: Add at the end of _Tools > Configuration Files > geany.css_: ``` /* make search dialogs transparent if out of focus */ #GeanyDialogSearch:backdrop { background-color: transparent; opacity: 0.6; } ``` **Note:** _opacity_ will only work together with _background-color: transparent_ otherwise it will become black. @elextr If I understand it correct, there is no need to implement it as feature, since it is easily possible due to GTK CSS styling. Should we then close this issue or link it to a specific "tutorial" page? --- **Example** ![Screenshot from 2020-12-21 13 39 46](https://user-images.githubusercontent.com/40885610/102777993-08fcbf00-4392-11eb-853f-7ed36dce48c7.png) -- 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/2698#issuecomment-748954442
[Github-comments] [geany/geany] Suppress "... was not found" message (#2699)
Is there a way to suppress the "... was not found" message? I would rather like to only have the "Search for:" highlighted (which already happens) instead of _additionally_ getting and needing to interact with this dialog. --- ![Screenshot from 2020-12-21 19 05 58](https://user-images.githubusercontent.com/40885610/102807888-ca7df900-43bf-11eb-925c-d5883a6458e7.png) -- 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/2699
Re: [Github-comments] [geany/geany] Suppress "... was not found" message (#2699)
Closed #2699. -- 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/2699#event-4137113112
Re: [Github-comments] [geany/geany] Adds hidden preference 'always_set_from_selected' [...] (#2697)
@codebrainz Correct, intention is **1**. I closed the old PR because of the branch issue **and** because I changed the PL to also apply to _Search > Find in Files_. If I understand your patch correct, it would change the default behaviour to do exactly that what my PL does, but per default and without a hidden preference. This is of course up to you, but I think a hidden preference may be better than changing the default behaviour without allowing users to fall back to the old default behaviour. My PL would resolve this issue. We could also just change the default value for _search.always_set_from_selected_ from _false_ to _true_. -- 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/pull/2697#issuecomment-749163226
Re: [Github-comments] [geany/geany] Adds hidden preference 'always_set_from_selected' [...] (#2697)
> Perhaps I'm missing the use case for not wanting the search text to be > updated. Well, I also personally don't see a use case for it, but on the other side, I don't see that many users complained. Also there must be a reason why the search phrase is (seems intentionally?) not updated in the current version. People have different ways of working. And since the users are used with that current behaviour - for which we don't see a reason yet -, I think it is not bad to let them fallback to the old behaviour using the hidden preference. That is the only reason for the hidden preference. -- 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/pull/2697#issuecomment-749174780
Re: [Github-comments] [geany/geany] Adds hidden preference 'always_set_from_selected' [...] (#2697)
How should we proceed here? 1. Not changing default behaviour, but adding the hidden preference with default FALSE (= **this PR**). 2. Changing default behaviour by adding the hidden preference with default TRUE (= only a _slight_ change on this PR). 3. Changing default behaviour without adding a hidden preference to revert back (= most of this PR would be useless). I think the best option would be **2.** because I think it is more safe for users which - for whatever reason - prefer the old behaviour. -- 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/pull/2697#issuecomment-751466278
Re: [Github-comments] [geany/geany] Adds hidden preference 'always_set_from_selected' [...] (#2697)
@elextr @kugel- Thanks a lot for your votes, then we will go with **3**. @elextr However, I feel it would make more sense for me to create a new branch (and so a new PL) for that, since it is more a fix than a feature and so the original changes would be kept. Would that be okay? -- 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/pull/2697#issuecomment-751636073
Re: [Github-comments] [geany/geany] Adds hidden preference 'always_set_from_selected' [...] (#2697)
@codebrainz Perfect, then I will do that. I am not so familiar with all of that, but it makes fun! Thanks for your help. -- 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/pull/2697#issuecomment-751642683
Re: [Github-comments] [geany/geany] Adds hidden preference 'always_set_from_selected' [...] (#2697)
@etkaar pushed 1 commit. 6185afa4241d9861394af82fca61c63fcd53c107 Update search phrase for search/replace dialogs always with selected text on dialog reopening (especially when using shortcuts). -- You are receiving this because you are subscribed to this thread. View it on GitHub: https://github.com/geany/geany/pull/2697/files/c892f1de6ce4694dba96a024806c9ffca98cd2ee..6185afa4241d9861394af82fca61c63fcd53c107
Re: [Github-comments] [geany/geany] Adds hidden preference 'always_set_from_selected' [...] (#2697)
@etkaar pushed 0 commits. -- You are receiving this because you are subscribed to this thread. View it on GitHub: https://github.com/geany/geany/pull/2697/files/6185afa4241d9861394af82fca61c63fcd53c107..d2740f21feb84b6f951398c6f683674b2b56bfed
Re: [Github-comments] [geany/geany] Adds hidden preference 'always_set_from_selected' [...] (#2697)
Closed #2697. -- 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/pull/2697#event-4152334810
Re: [Github-comments] [geany/geany] Adds hidden preference 'always_set_from_selected' [...] (#2697)
Reopened #2697. -- 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/pull/2697#event-4152365533
Re: [Github-comments] [geany/geany] Adds hidden preference 'always_set_from_selected' [...] (#2697)
I was a bit struggling, sorry for any inconvinience, but I think now the correct commit is used for this PL now. @codebrainz I have used your patch, it seems to work as intended after compiling and testing. -- 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/pull/2697#issuecomment-751757525
Re: [Github-comments] [geany/geany] Adds hidden preference 'always_set_from_selected' [...] (#2697)
@codebrainz You're welcome, thanks for the help :) -- 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/pull/2697#issuecomment-751859461
[Github-comments] [geany/geany] Preserving the 'untitled' files (#2717)
If I create files (`Ctrl+N`) then new files _untitled_, _untitled_, ... will be created. Once Geany gets closed, a save dialog is going to be opened for each of these files. Is there a way to preserve those files in the editor without being forced to save them, so they and their content would be kept upon the user manually closes them? -- 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/2717
[Github-comments] [geany/geany] No .conf file for the default color scheme? (#2718)
Is there no .conf file for the default color scheme of geany? In `geany/data/colorschemes` I was only able to find _alt.conf_. It would be interesting what exactly is possible to change using a colorscheme.conf in `~/.config/geany`. -- 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/2718
Re: [Github-comments] [geany/geany] No .conf file for the default color scheme? (#2718)
Thank you! -- 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/2718#issuecomment-753684395
Re: [Github-comments] [geany/geany] No .conf file for the default color scheme? (#2718)
Closed #2718. -- 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/2718#event-4162850416
Re: [Github-comments] [geany/geany] Preserving the 'untitled' files (#2717)
What about a native feature which 1. changes the naming behaviour from `untitled, untitled, ...` to `untitled 1, untitled 2, ...`, and 2. keeps all those files opened in the editor after restart, without being forced to save them on disk. **Reason** People may use these untitled files just for temporarily editing or storing anything, without the need to save it into a file. It is also more comfortable to not be forced to save it into a specific file, if keeping it in the editor is fine. I also think it is more robust to not delete anything if not explicitly asked to do that. This is by the way the default behaviour from Notepad++, this is where I know it from. -- 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/2717#issuecomment-753845489
Re: [Github-comments] [geany/geany] Preserving the 'untitled' files (#2717)
Why not as a native feature via Pull Request? -- 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/2717#issuecomment-753847098
Re: [Github-comments] [geany/geany] Preserving the 'untitled' files (#2717)
> Its not something that appears to be vastly desired or needed in the core > since this is the first time its been asked for, so it should be in a plugin, > at least to start with. Okay! What are the general reasons for when it is better to make a plugin instead of a core feature? E.g. there is a plugin which highlights double-click-selected text in the editor, but I always asked why this is not a core feature because I think it is very helpful for many coders. @kugel- Could you please give me a link to the exact plugin? -- 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/2717#issuecomment-753851322
[Github-comments] [geany/geany] Are different colorschemes possible for embed code? (#2719)
I try to modify my colorscheme, but I am not sure if my approach would work at all, so I want to ask: I have an HTML file where PHP and JavaScript code is embed. Usually my JavaScript code would have a bluish background color, while HTML has a white and PHP a yellowish/greenish background color. Here is an example: ![example](https://user-images.githubusercontent.com/40885610/103519240-7e2dc100-4e75-11eb-8707-14a760f4f6b9.png) However, in Geany it seems that the colorscheme will always apply to all in the document, so the background color will be white - or whatever color I choose - for all and I cannot, for instance, highlight inline JavaScript code with a bluish background color. -- 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/2719
Re: [Github-comments] [geany/geany] Preserving the 'untitled' files (#2717)
I had now a look into the builtin plugin `Save Actions`. I think the asked feature could fit into this plugin; however it seems, it would need an additional tab because it is a very different approach. I for instance do not wish any autosaving of already existing, opened files, I only want that the `untitled` files are kept after reopening Geany without being asked if I want to save them. The question is, if the plugin can bypass the dialog `The file 'untitled' is not saved.` because that would be needed. Another thing is the naming behaviour: Changing it from `untitled` to `untitled _n_` is more a core thing, not for a plugin. What do you think about changing that via a seperate Pull Request? -- 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/2717#issuecomment-753864612
Re: [Github-comments] [geany/geany] Preserving the 'untitled' files (#2717)
> To be clear, the editing notebook is for _files_ it doesn't handle anything > else, and changing that is a big change. Would do you mean by _editing notebook_? > Your other option is to add tabs to the message window, like extra scribble > tabs, but that would be a whole new plugin. It would be also a very different approach I think. Only keeping the untitled files without being forced to save them, that is enough. > To be clear, for contents to be saved between invocations of Geany you are > going to have to save them somewhere, and then they will have a unique name, > even something useful like scratch-1 scratch-2 etc. so if the plugin does > that it should avoid the save query. I refer to the tab name in Geany. If I open multiple new files, they all will be named `untitled, untitled, ...` without iterator. Independent of keeping their contents after restart, I think it would be a good change if Geany would per default name them `untitled 1, untitled 2, ...` (or capitalized `Untitled 1, Untitled 2, ...`, but I prefer lower case for no reason). We would not need a plugin or setting for that, just a core change. What do you think about that? -- 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/2717#issuecomment-753872946
Re: [Github-comments] [geany/geany] Preserving the 'untitled' files (#2717)
I see, so changing the naming behaviour can be risky. > Beware, there are things that assume unsaved tabs are called "untitled" so > its likely that change will break other stuff, including in templates IIRC, > and in plugins that are not part of Geany itself. > To be clear, if they are to survive between invocations of Geany they need to > be saved by the plugin, you seem to be skipping that point, where and how is > the plugin going to save them? and will that give them a filename? if it does > your problem is solved. That risk involved, the plugin could just convert any untitled files into a real file on disk. Then the naming can be arbitrary. The plugin needs to save the file automatically on disk, at the latest when Geany is closed. Also, the plugin would always keep the red color of the tab, so the user independent of the naming behaviour always knows that the file is an auto-saved untitled file. If users decide they want a file on disk, they would use `Save As...` to save a copy and continue with this copy or `Save` to virtually convert it to a "real file" which can be easily done by just moving it. -- 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/2717#issuecomment-753883052
Re: [Github-comments] [geany/geany] Preserving the 'untitled' files (#2717)
@codebrainz Yes, looks like a duplicate. @elextr Since multiple users are asking for it, are we still looking for a plugin (which seems to not exist), or could we implement it as core feature using a Pull Request? I will close this issue in favor of continuing the discussion in #905. -- 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/2717#issuecomment-753885831
Re: [Github-comments] [geany/geany] Preserving the 'untitled' files (#2717)
Closed #2717. -- 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/2717#event-4164267737