xiota / geany-preview

Turns Geany into a markdown editor by providing a preview pane in the sidebar to show the formatting of several light-weight languages as they are edited. Supported document types include AsciiDoc, DocBook, Fountain, HTML, LaTeX, Markdown, MediaWiki, reStructuredText, Textile, and Txt2Tags.
GNU General Public License v3.0
15 stars 0 forks source link

some questions about geany-preview #1

Closed ralf3u closed 2 years ago

ralf3u commented 3 years ago

I'm interested in geany-preview because I would like to go in webdesign. But before to install geany-preview, I have some questions, to really know if the software fits my needs:

question 1 Can I change the vertical line in the middle of the screen with the mouse, so that the vertical line is more to the left or to the right?

question 2 Does it work exactly like htmlivecode.com where one can see live every change, or do I need first to save the changes to see a preview?

question 3 Is the HTML-Parser in the preview exactly the same like the HTML-Parser in Firefox?

question 4 Is there also a XML-Parser, so I can program in xhtml?

question 5 If there is a XML-Parser, is it exactly the same like the XML-Parser in Firefox?

question 6 If there is a XML-Parser, it is hard to program live in xhtml because it will show many times during coding a kind of mistake-page, so is there the option to show only a preview of the last saving, so I will not have many times a mistake-page?

question 7 Can I have different HTML-documents on the right side, so if I tab-browse on the left side I can see the corresponding preview on the right side?

question 8 I don't understand the two tabs Symbols and Documents on the right side of the picture. For what are they standing?

question 9 How can I disable the preview-area, so that the vertical line and the right side will disappear?

question 10 If a txt-document or a lua-document is shown on the left, I don't need to see a preview on the right side, so what will happen if I tab-browse on the left side between HTML-documents and suddenly there is on the left a txt-document?

question 11 Do I need to use the command (sudo apt pandoc asciidoctor) to see the preview of xhtml-documents?

question 12 Is it planned that geany-preview will be part of geany-plugins?

Thank you for answers in advance.

xiota commented 3 years ago

@ralf3u

I would like to go in webdesign.

While the Preview plugin can also show HTML, it does not have features that web designers might want, like the devtools console. It is intended as an authoring tool for use with light-weight markup languages, like Markdown. It gives Geany features similar to those found in formiko and retext. If you want to try them, they can both be installed from the repository with apt.

Is it planned that geany-preview will be part of geany-plugins?

I currently do not intend to submit this plugin to geany-plugins because doing so would limit my ability to add features and fix bugs. Of course, this is open source, so they are free to make a copy.

Do I need to use the command (sudo apt pandoc asciidoctor) to see the preview of xhtml-documents?

HTML and Markdown previews work without Pandoc and AsciiDoctor. XHTML as a standalone entity is basically dead. What you can do is write HTML in XML style. It's just personal preference that does not affect how HTML is rendered.

Does it work exactly like htmlivecode.com where one can see live every change, or do I need first to save the changes to see a preview?

Similar. The preview is updated as the document is edited. Changes do not have to be saved to be previewed. The document type does have to be set though. For saved/loaded documents, Geany detects the document type automatically. For "untitled" documents, the document type can be changed from the menu at Document | Set Filetype.

I don't understand the two tabs Symbols and Documents on the right side of the picture...

Can I change the vertical line in the middle of the screen... ?

How can I disable the preview-area, so that the vertical line and the right side will disappear?

The Symbols and Documents tabs are part of the Geany sidebar, which can be resized. Symbols is used for programming. Documents is an alternative to tabs for switching documents. You can access the sidebar from the menu at View | Show Sidebar. To make accessing it more convenient, you can assign a shortcut in preferences.

Is _____ the same like... in Firefox?

Preview uses the WebKit2GTK component. It is similar to the HTML engine used in Google Chrome, but rendering may be slightly different. For web development, you would eventually need to preview your designs in real web browsers. At a minimum, I would suggest checking that your pages work in both Firefox and Chrome.

Note: There was a web engine, KHTML, used in KDE Konqueror. Apple forked KHTML into WebKit. Google forked WebKit into Blink. Blink is now used in numerous web browsers – Google Chrome, Microsoft Edge, Opera, Vivaldi, Brave, Falkon, etc.

Can I have different HTML-documents on the right side, so if I tab-browse on the left side I can see the corresponding preview on the right side?

If a txt-document or a lua-document is shown on the left, I don't need to see a preview on the right side, so what will happen if I tab-browse on the left side between HTML-documents and suddenly there is on the left a txt-document?

There is only one Preview tab (on the right). The Preview is updated to match the currently selected document (on the left).

What Preview displays depends on whether it is able to convert the document into HTML for preview. If it cannot (like for programming languages), it will display a message similar to: Unable to process type: C++, UTF-8.

For text documents, Preview will attempt to use the Content-Type: or Format: line, if there is one (like in saved emails), at the beginning of the document.

ralf3u commented 3 years ago

@xiota I tried formika and retext. It is quite interesting.

Then I wanted to install geany-preview but I failed. This line worked for me: sudo apt install geany libgtk-3-dev libwebkit2gtk-4.0-dev \ libcmark-gfm-dev libcmark-gfm-extensions-dev but I don't know what this line means: "Then to build, run the following in a terminal from the source directory:" Where is the source directory? I tried this in the terminal: sudo /usr/share/geany ./autogen.sh But it didn't work. And I don't know what I should do with this: ./autogen.sh cd build-aux ../configure make Should I give that in the terminal line by line, so first ./autogen.sh then enter, then cd build-aux then enter, and so on? And then I type in the terminal just "make install", and press enter? And if after some days I don't like geany-preview, I type only in the terminal "make uninstall" and nothing more, and then I press enter?

I'm sorry for asking. I have experience with installing (with sudo apt install ...), but no experience at all with building & installing.

xiota commented 3 years ago

I made a deb package. You can download it from launchpad: geany-plugin-preview 0.0.1-20211001.043529-0xiota1. It's built for Ubuntu 21.04, but may work in 20.04. After downloading, you can install it with the following command:

sudo dpkg -i filename.deb

If you're interested in building from source, the source directory is the directory that you uncompressed the source code into. So if you downloaded the file geany-preview-master.zip into ~/Downloads/, you could type something like this into the terminal (press enter after each line, lines starting with # are comments):

# Navigate to download directory and unzip source
cd ~/Downloads/
unzip geany-preview-master.zip
cd geany-preview-master.zip

# prepare for building, makes sure needed packages are installed
./autogen.sh
cd build-aux
../configure

# build / create binaries
make

# install
sudo make install

You might have to link the plugin in another folder so Geany can find it:

sudo ln -s /usr/local/lib/geany/preview.so   /usr/lib/x86_64-linux-gnu/geany/

To uninstall, you could go back to the build directory and run make uninstall. Then delete the links.

cd ~/Downloads/geany-preview-master/build-aux
sudo make uninstall
sudo \rm /usr/lib/x86_64-linux-gnu/geany/preview.so
ralf3u commented 3 years ago

@xiota Sorry, but I still have problems to install geany-preview.

So, here is what I did in Lubuntu 21.04: I visited launchpad.net, then I downloaded this file in the Downloads-file: geany-plugin-preview_0.0.1-20211001.043529-0xiota1_all.deb

then in the terminal: cd Downloads press enter now I'm in the Downloads-file, so I do: sudo dpkg -i geany-plugin-preview_0.0.1-20211001.043529-0xiota1_all.deb press enter enter password press enter

Then I open Geany, I go in the menu-bar, then in Tools, then in the Plugin and there I activate "Preview". Then I close Geany. If I open Geany there is no geany-preview.

xiota commented 3 years ago

@ralf3u Did you go to the menu to show the sidebar? The sidebar is part of Geany, and the plugin just adds a tab.

ralf3u commented 3 years ago

@xiota Yes, you are right: In the menu-bar in View I have to activate the sidebar. Now I can see the Preview. It's great to see this in Geany. It's awesome!!

question 1 But the Preview-window is on the left side of the window. In your image it is on the right side. How can I change this, that the Preview is on the right side of the window?

question 2 I use as colorscheme Sleepy Pastel, where the background is dark and the font-color is white. When I see a txt-document, in the Preview it appears in white background while the font-color is black. Is there a possibility to change the Preview of txt-documents in a kind of dark mode?

question 3 If I have a long html-document where I have to scroll, and if I add some words at the end of the document, I don't see the changes in the Preview. Is there a possibility to see changes in the Preview without to scroll in the Preview?

question 4 Next time I would like to try to build it myself because Lubuntu 21.10 is not far away. You mentioned that I need then geany-preview-master.zip. But where do I find it?

question 5 Do I have to enter the following lines then one by one and after each line to press enter? ./autogen.sh cd build-aux ../configure

Thank you for an answer and your patience in advance.

xiota commented 3 years ago

@ralf3u

How can I change this, that the Preview is on the right side of the window?

To change the position of the sidebar, go to Preferences/Interface/Interface.

Geany-Preferences-Interface-Sidebar

Is there a possibility to change the Preview of txt-documents in a kind of dark mode?

For Markdown and Pandoc, you can edit the css files. They are located at ~/.config/geany/plugins/preview/. For HTML, you can include the css you want to use in the <head> of the file. W3Schools has a CSS Tutorial that can help you get started.

Is there a possibility to see changes in the Preview without to scroll in the Preview?

I would like to synchronize the scrollbars, but don't know how.

For long documents, there is a snippets mode that shows a preview for only a small section of the document. You can edit the settings in ~/.config/geany/plugins/preview/preview.conf that determine how long the document is before snippets activates and how much of the document it shows. You'll also have to turn it on for HTML.

There are other options you can change too, but most of them won't do much if you didn't install Pandoc, AsciiDoctor, or Screenplain.

For convenience, there are buttons to open the config file and folder in Edit/Plugin Preferences/Preview.

Geany-Plugin-Preferences

Lubuntu 21.10 is not far away.

I just created a PPA for 21.10. So the geany-preview debs are ready for 21.10.

You mentioned that I need then geany-preview-master.zip. But where do I find it?

On the GitHub page, there's a green button that says "Code". After clicking on it, a box will appear that says "Download ZIP" in it.

github-download-zip

Do I have to enter the following lines then one by one and after each line to press enter?

It's safer to enter commands one by one, in case a program needs user input. That way it won't take the next command as input.

ralf3u commented 3 years ago

@xiota

question 1: Is there a possibility in Geany to say that Geany should every 3 seconds save changes or the document of the open tab, so then I would not even need to save the document?

question 2:

Symbols is used for programming

Can it be that in HTML nothing will be shown in Symbols even if JavaScript will be added?

issue 1:

For Markdown and Pandoc, you can edit the css files. They are located at ~/.config/geany/plugins/preview/.

The preview-file is empty, so I can not edit them. Same for:

For long documents, there is a snippets mode that shows a preview for only a small section of the document. You can edit the settings in ~/.config/geany/plugins/preview/preview.conf

Thank you for an answer in advance.

xiota commented 3 years ago

Is there a possibility in Geany to say that Geany should every 3 seconds save changes or the document of the open tab, so then I would not even need to save the document?

That is outside the scope of the preview plugin. There is another plugin that can do what you want: Save Actions.

Can it be that in HTML nothing will be shown in Symbols even if JavaScript will be added?

The easiest way to see what happens is to load a document of interest and look at the tab. When an HTML document is loaded, the Symbols tab shows HTML specific information. To show JavaScript-related info, switch the document type to JavaScript in the menu at Document/Set Filetype/Scripting Languages/JavaScript source file.

Switching document types is pretty cumbersome with the nested menus. I've been thinking about adding a filetype switcher to Preview. Another option is to use Lua scripts that can be assigned shortcuts to switch to specific document types.

The preview-file is empty, so I can not edit them.

That is probably related to packaging as a deb file. The plugin is supposed to copy the files from a system directory when they're absent, but it can't find them. I'll work on a fix.

xiota commented 3 years ago

@ralf3u I fixed the problem with the missing config file. The problem was from when I made it into a deb. I made a PPA for geany plugins, so you can add it and get updates through the package manager if you want (without the other packages in my other PPAs).

ralf3u commented 3 years ago

@xiota

There is another plugin that can do what you want: Save Actions.

That's insane!! The combination Preview & Save Actions (save when not in focus any more) is phenomenal!! Preview is already out of this world, but now with the addition Save Actions, ... it's incredible!! That means that users don't only save the F5-shortcut for reloading the webpage, but also the Ctrl+s-shortcut for saving!! That is a saving of two shortcuts!

question 1 Is there a shortcut to toggle the focus from the left to the right window and other way around? I think that this is an important question.

question 2 I put the content of /usr/share/geany-plugins/preview in .config/geany/plugins/preview, so now there are four documents inside: markdown.css, pandoc.css, preview.conf and screenplain.css. I don't need to change the background-color of html-documents in the Preview, because this I can do with a style-value in the body-tag, like this: style="background:gray". I would like to change in the Preview-tab the white background of txt-documents. I added in markdown.css and in pandoc.css in the body "background:gray". But the background-color of txt-documents are still in white in the Preview. Could it be that a change of the background-color in Preview is not possible for txt-documents?

question 3 This question 3 is the nearly the same like question number 2, but this time with those formats: cfg, css, xml, lua and xhtml. In those documents there is the text "Unable to process type" with white background. Could it be that a change of the background-color in Preview is not possible for those documents?

question 4 If I want to see again a JavaScript-effect in the Preview, then I can right-click the mouse, and then I select "Reload". Is there a shortcut for reloading the webpage in the Preview?

issue 1 you write on this webpage at least 3 times "geany-preview-master.zip" but if I go to the website, where the green "Code"-button is, and if I click there on "Code" and then if I click on "Download ZIP", then there will be in Downloads "geany-preview-main.zip" and not "geany-preview-master.zip" maybe this is the reason why the preview-file was empty, when installing via launchpad

issue 2 you write on this webpage: cd geany-preview-master.zip I think this is wrong; the correct order should be: cd geany-preview-main, so without zip, and "main" instead of "master"

issue 3 on your webpage "Questions and Answers" there is a link called "document"; the sentence where the link is: "There is a separate document with details to build on Linux." if I click on the link "document" there is a 404-answer

issue 4 this is what I did on an other computer: I downloaded geany-preview-main.zip, I unzipped it, I went into the unzipped version with cd geany-preview-main; then in the terminal I wrote like in your description: ./autogen.sh the answer of the terminal: ./autogen.sh: 3: autoreconf: not found I would like to continue the building & installing process, but I don't know how.

issue 5 on the computer where Geany-Preview is already running I gave this order in the terminal: sudo apt pandoc asciidoctor the terminal says something like: unvalid operation pandoc I don't use the English version of Lubuntu, so that is the reason why I write "something like".

Thank you for an answer in advance.

xiota commented 3 years ago

@ralf3u

I opened new issues #2, #3 based on some of what you've typed. You can keep sending general questions here.

Is there a shortcut to toggle the focus from the left to the right window and other way around?

I haven't tried, but maybe this will do what you want?

If I want to see again a JavaScript-effect in the Preview, then I can right-click the mouse, and then I select "Reload". Is there a shortcut for reloading the webpage in the Preview?

I'm not sure what you mean. The Preview updates as you type. The context menu in the preview pane is broken though.

on your webpage "Questions and Answers" there is a link called "document"; the sentence where the link is: "There is a separate document with details to build on Linux." if I click on the link "document" there is a 404-answer

Thanks for letting me know. I'll fix it. It's the same document linked from the Readme.

you write on this webpage at least 3 times "geany-preview-master.zip" ... then there will be in Downloads "geany-preview-main.zip" and not "geany-preview-master.zip"

My mistake. Most projects use "master". I forgot that I was using "main".

you write on this webpage: cd geany-preview-master.zip I think this is wrong; the correct order should be: cd geany-preview-main, so without zip, and "main" instead of "master"

You have to understand what the commands are doing. cd is to "change directory". If the directory does not exist, it won't work. The "-master" directory was being created when unzipping. But since the zip is "-main" the directory name is different.

maybe this is the reason why the preview-file was empty, when installing via launchpad

That was a different issue. The problem is fixed and uploaded to the PPA. You can install the ppa onto your system so that the plugin will update with apt.

sudo add-apt-repository ppa:xiota/geany-plugins
sudo apt-get update
sudo apt-get upgrade

After installing the new version and restarting Geany, go to Edit/Plugin Preferences/Preview. Then click the button that says "Reset Config" followed by the button that says "Save Config". This will replace the old config file with a new one, then save your old settings into the new file.

this is what I did on an other computer: I downloaded geany-preview-main.zip, I unzipped it, I went into the unzipped version with cd geany-preview-main; then in the terminal I wrote like in your description: ./autogen.sh the answer of the terminal: ./autogen.sh: 3: autoreconf: not found I would like to continue the building & installing process, but I don't know how.

You need to install autoreconf. Use sudo apt install autoconf. Please let me know if you encounter other missing packages so I can update the build instructions.

on the computer where Geany-Preview is already running I gave this order in the terminal: sudo apt pandoc asciidoctor the terminal says something like: unvalid operation pandoc

Here is a breakdown of what the command is doing...

I don't use the English version of Lubuntu, so that is the reason why I write "something like".

That is fine. What you wrote is understandable.

ralf3u commented 3 years ago

@xiota

I haven't tried, but maybe this will do what you want?

Thank you for your hint. It is indeed possible to switch with a shortcut to the editor and to switch with a shortcut to the sidebar. But one shortcut would be even better to toggle editor/sidebar. That was the reason why I just open a new issue in Geany https://github.com/geany/geany/issues/2914.

ralf3u commented 3 years ago

@xiota

question 1 Does a version number of the plugin preview exist on the website?

question 2 Can I see which version I use?

question 3 I don't need a preview of a txt-document. Now I had this idea, but I don't know if that can be realized: If I tab-browse in the editor-window, and if after html-documents there is a txt-document in the tab, then the sidebar should no be disabled but should be hidden, a kind of sleep-mode of the sidebar, so invisible, but if I tab-browse back to the html-documents the sidebar should appear again automatically. In a script, located in .config/geany/plugins/preview, users could add formats in a list that will execute for those formats a hidden sidebar.

issue 1 The reason why I could not install pandoc asciidoctor is because there is a mistake on your webpage "Building and Installing": There is: sudo apt pandoc asciidoctor I think that it should be like this: sudo apt install pandoc asciidoctor , so the word "install" is missing.

issue 2 This is what I did on an other computer: I downloaded geany-preview-main.zip, I unzipped it, I went into the unzipped version with cd geany-preview-main; then in the terminal I wrote like in your description: ./autogen.sh because I didn't have autoconf, I had to install it with sudo apt install autoconf then I did again: ./autogen.sh then I did: cd build-aux then I did: make because I didn't have make, I had to install it with sudo apt install make then I did again: make the answer of the terminal was something like: targets was not defined and no "make" control-file found What should I do now?

suggestion for improvement 1

It's safer to enter commands one by one, in case a program needs user input.

So, on your webpage "Building and Installing" there are those three commands together: ./autogen.sh, cd build-aux and make. So, instead of putting all three commands in one box, I think it would be better to offer the three commands each in a box, so one can copy it with the symbol on the right to paste it in the terminal.

suggestion for improvement 2 On "Building and Installing", between the order ./autogen.sh and the order cd build-aux I would suggest to write something like: if the answer of the terminal is "/autogen.sh: 3: autoreconf: not found", then do: sudo apt install autoconf after this, redo: ./autogen.sh

suggestion for improvement 3 On "Building and Installing", after "make" I would suggest to write something like: if make was not found, then do first this: sudo apt install make after this, redo: make I'm sure that users will appreciate a detailed step-by-step explication.

Thank you for an answer in advance.

xiota commented 3 years ago

@ralf3u

Does a version number of the plugin preview exist on the website? Can I see which version I use?

Right now it's 0.0.1 because a number is needed to fill in parts of the build scripts. But that may never change because version numbers are arbitrary and it's extra work to change.

If I tab-browse in the editor-window, and if after html-documents there is a txt-document in the tab, then the sidebar should no be disabled but should be hidden, a kind of sleep-mode of the sidebar, so invisible, but if I tab-browse back to the html-documents the sidebar should appear again automatically.

I personally dislike unstable interfaces like that (eg, disappearing tab bars), so it's not something I would include directly in the Preview plugin. What you describe can be done with a Lua script though. I have written auto-sidebar for you to do this. You should be able to figure out how to install it since you have some experience with the toggle-menu script. If you already have an events/activated.lua script, you'll have to copy/paste the contents to keep any old functionality.

there is a mistake on your webpage...

Thanks for letting me know. I'll make a correction. This shows why it is important to understand what the commands you are running are doing. In this case, the command simply didn't work. Some commands that are mistyped can damage the system. For example, if an rm command is put at the end of a sentence, you could wipe out your home directory if you copy the period.

then I did again: make the answer of the terminal was something like: targets was not defined and no "make" control-file found What should I do now?

You are probably using an old copy of the source. I recently changed the autogen.sh script to run configure automatically.

If you already updated the source, you are probably missing another package.

So, instead of putting all three commands in one box, I think it would be better to offer the three commands each in a box, so one can copy it with the symbol on the right to paste it in the terminal.

Commands are typically presented grouped together that way. You can triple click to select a single line for copying. You can also paste the commands into Geany to examine and correct them before running them.

On "Building and Installing"... I would suggest to write something like... I'm sure that users will appreciate a detailed step-by-step explication.

It's better to include the missing packages in the apt command to avoid the problem in the first place. So I appreciate that you're letting me know about the missing packages. It's hard for me to know everything that's needed because they are all already installed on my computer.

Now that I have setup this PPA, I'd expect people to use the deb rather than try to build.

ralf3u commented 3 years ago

@xiota

auto-sidebar

Wow!! That's soooooooooo cool!! From its functionality, it works exactly like I imagined!! And from its effect, it is even better than I thought!! Like my question about automatically saving, I was sure that it was not possible to realize. I thought that it was a crazy idea of mine. I even hesitated to ask. Maybe you don't like the auto-sidebar, but for me it is absolutely superb!! Thank you so much!!

remark But there is only one small thing that is disturbing me a little bit: If I tab-browse from the html-document to the txt-document, then it is absolutely perfect. But if I tab-browse from the txt-document to the html-document, then there is sometimes a small white flash inside the Preview. I'm sure it is because the default background-color of the Preview is white, and my html-document has the background-color gray. So, my idea was to set the default of the background-color of the Preview in background-color:gray, and even to set the default of the font-color of the Preview in background-color:gray, to reach a higher probability that there will be no white flash. According #2 the problem could be solved with a new version of Geany-Preview.

Today, on the other computer I tried 4 different ways to install Geany-Preview. But all four ways failed. Is this because I use an old notebook with Celeron N3060?

1) What I did: sudo add-apt-repository ppa:xiota/geany-plugins sudo apt-get update sudo apt-get upgrade Then in Geany I could not activate in the Plugins "Preview" because it does not exist in the list.

2) What I did: on your website: green "Code"-button, then I click there on "Code", and then I click on "Download ZIP" I unzipped it, I went into the unzipped version with cd geany-preview-main; then in the terminal I wrote: ./autogen.sh then I did: ./autogen.sh and this is the answer of the terminal: .. Makefile.am:23: If 'LT_INIT' is in 'configure.ac', make sure Makefile.am:23: its definition is in aclocal's search path. Makefile.am: installing 'build-aux/depcomp' autoreconf: automake failed with exit status: 1 ... Downloads/geany-preview-main$ cd build-aux ... Downloads/geany-preview-main/build-aux$ ../configure checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for a thread-safe mkdir -p... /usr/bin/mkdir -p checking for gawk... gawk checking whether make sets $(MAKE)... yes checking whether make supports nested variables... yes checking whether make supports nested variables... (cached) yes checking whether make supports the include directive... yes (GNU style) checking for gcc... no checking for cc... no checking for cl.exe... no configure: error: in .../Downloads/geany-preview-main/build-aux' configure: error: no acceptable C compiler found in $PATH See config.log' for more details ...: Downloads/geany-preview-main/build-aux$

3) What I did: sudo apt install autoreconf make geany libgtk-3-dev libwebkit2gtk-4.0-dev \ libcmark-gfm-dev libcmark-gfm-extensions-dev the answer of the terminal is something like: autoreconf can't be found then I installed autoconf, and then I tried again but the answer was the same

4) What I did: download from launchpad cd Downloads sudo dpkg -i FILENAME.deb The terminal said that everything is fine. But in Geany I could not activate in the Plugins "Preview" because it does not exist in the list.

Thank you for an answer in advance.

xiota commented 3 years ago

... auto-sidebar ...

Glad you like it.

if I tab-browse from the txt-document to the html-document, then there is sometimes a small white flash inside the Preview.

Does this happen only with the auto-sidebar? Are you using the extra_css option? Have you updated to the latest version of the plugin with apt?

... my html-document has the background-color gray. So, my idea was to set the default of the background-color of the Preview in background-color:gray...

To change the default colors, create a new css file and use the extra_css option to load it. There isn't any way I know of that will do any better. Even if there were, the solution you propose would work only for this one case. What if you decide you like a different color tomorrow and don't like the gray flash?

sudo add-apt-repository ppa:xiota/geany-plugins sudo apt-get update sudo apt-get upgrade

You need: sudo apt-get install geany-plugin-preview

I'll add it to the instructions.

configure: error: no acceptable C compiler found in $PATH

You need: sudo apt-get install build-essential

I'll update the instructions.

the answer of the terminal is something like: autoreconf can't be found then I installed autoconf, and then I tried again but the answer was the same

I wrote the name of the package wrong. I will correct the instructions. But by the time you got the missing compiler error, autoconf was already installed.

sudo dpkg -i FILENAME.deb The terminal said that everything is fine. But in Geany I could not activate in the Plugins "Preview" because it does not exist in the list.

Did you restart Geany? Geany only loads plugin names at startup.

What version of Ubuntu/Lubuntu are you running on the old laptop? What version of Geany is it using?

ralf3u commented 3 years ago

@xiota

question 1 To the white flash with auto-sidebar:

Are you using the extra_css option? Have you updated to the latest version of the plugin with apt?

I didn't found the extra_css option (nor in markdown.css nor in preview.conf), maybe because I did not update the latest version of the plugin. So what I did: I updated the system in the terminal: sudo apt-get install geany-plugin-preview An the terminal wrote something like this: geany-plugin-preview is already the latest version (0.0.1-20211001.043529-0xiota1). But that is not true because on the website https://launchpad.net/~xiota/+archive/ubuntu/geany-plugins I can see that you uploaded a new version today. So, why the terminal is saying that it is the latest version, although it is not true?

Then I did: sudo add-apt-repository ppa:xiota/geany-plugins press enter press enter sudo apt-get update press enter sudo apt-get install geany-plugin-preview press enter now in the terminal there was something like: geany-plugin-preview (0.0.1-20211005.000952-0xiota0~ubuntu21.04) is ready It seemed to be that I have the new version of Preview also because now I can see a new file in .config/geany/plugins/preview called preview-headers.css. Then I opened Geany. The problem then was: The sidebar was completely empty, so even without tabs. I deactivate the sidebar and then activated the sidebar. Then I could see the Preview-tab again.

question 2 For the future: in the terminal: Which order or rather which orders do I have to use to update Geany Preview?

issue 1 I restarted Geany. I even used the "Reload Config" button in Edit/Plugin Preferences/Preview described in #2. Because I still could not find extra_css I did that: menu bar: Edit/Plugin Preferences/Preview: Reset Config, Save Config, Edit Config described in https://github.com/xiota/geany-preview/blob/main/docs/Questions_and_Answers.md#configuration

Now I have 9 vertical lines in Geany in different colors with a distance of about 2 cm. The lines are on the right side. The vertical lines are only in the editor, but not in the sidebar. 2021-10-05_geany_preview_problem

I restarted Geany. The vertical lines are still there. I restarted the computer. The vertical lines are still there.

issue 2 I changed in preview.conf this value extra_css=disabled to extra_css=dark.css I saved the document preview.conf. I restarted Geany. In .config/geany/plugins/preview I see now the dark.css. Now there is not only a color flash but also a text is flashing. I will have to use a screenrecorder to know which kind of text it is. But I think that I see in the sidebar as flash: the previous content of the txt-document in small size. The font color is white. I don't see the text every time, but sometimes.

question 3

To change the default colors, create a new css file and use the extra_css option to load it.

OK, so instead of extra_css=dark.css I use extra_css=1.css I saved the document. in 1.css that I created in .config/geany/plugins/preview I wrote this line: html {background-color:#2e3436} It is the color of the background of the colorscheme that I use (Sleepy Pastel). I reboot the computer. The white flash and the flashing text are still there. Did I make a mistake?

website: suggestion for improvement 1 on this website https://github.com/xiota/geany-preview#usage there is this text "More about usage and configuration is available in a separate document." (Link: separate document) Instead of this text, I suggest to write something like this, because it is clear that it is in a separate document, if there is a link: "More about usage and configuration is available in Questions & Answers." (Link: Questions & Answers) So, I think it is better to write as link-text the title of the document for having a better orientation for users. I tend to lose orientation if I click on a link, where link-text and title of the linked webpage are different.

website: suggestion for improvement 2 on this website https://github.com/xiota/geany-preview#installation there is this text "Preview can also be built and installed, but does not currently work on Windows because WebKit2GTK is not available." (Link: built and installed) Instead of this text, I suggest to write something like: "Instead of installing by PPA, there is also the possibility for Building and Installing, but does not currently work on Windows because WebKit2GTK is not available." (Link: Building and Installing) The argumentation is the same like above, in website: suggestion for improvement 1.

website: contradiction 1 summary: on one website there are 3 orders and on an other website there are only 2 orders on this website https://github.com/xiota/geany-preview#installation there are those three orders: sudo add-apt-repository ppa:xiota/geany-plugins sudo apt-get update sudo apt-get install geany-plugin-preview on this website https://launchpad.net/~xiota/+archive/ubuntu/geany-plugins there are those two orders: sudo add-apt-repository ppa:xiota/geany-plugins sudo apt-get update

website: contradiction 2 summary: on one website there are 3 orders and on an other website there are only 2 orders on this website https://github.com/xiota/geany-preview#installation there are those three orders: sudo add-apt-repository ppa:xiota/geany-plugins sudo apt-get update sudo apt-get install geany-plugin-preview on this website https://github.com/xiota/geany-preview/blob/main/docs/Questions_and_Answers.md#installation there are those two orders: sudo add-apt-repository ppa:xiota/geany-plugins sudo apt-get update I have a suggestion for improvement for contradiction 2: on this website https://github.com/xiota/geany-preview/blob/main/docs/Questions_and_Answers.md#installation I would take out the whole content of "Installation", and instead of this I would write something like: How do I install the Preview plugin? Visit https://github.com/xiota/geany-preview#installation. How do I build from source? Visit https://github.com/xiota/geany-preview/blob/main/docs/Building_and_Installing.md. Reason for this: I think that repetitions are not a good idea. Maybe things will change in future. Then one need to change two things instead of one thing. This can increase the error rate.

website: suggestion for improvement 3 on this website https://github.com/xiota/geany-preview after "Installation" I would add something like this as title: "After Installation" and as content of the title "After installation" I would write something like this: Before using the Preview, it need to be activated: in the menu bar: Tools/Plugin/activate: Preview. If in Geany the Preview is not visible: in the menu bar: View/activate Show sidebar.

website: suggestion for improvement 4 on this website https://github.com/xiota/geany-preview/blob/main/docs/Questions_and_Answers.md#installation after "Installation" I would add something like this as title: "After Installation" and as content of the title "After installation" I would write something like this: I installed Preview. But where is it in Geany? Visit After Installation. (Link: After installation, that will link on https://github.com/xiota/geany-preview#after-installation)

website: suggestion for improvement 5 on this website https://github.com/xiota/geany-preview/blob/main/docs/Questions_and_Answers.md#usage I would add three more subjects: 1 Sidebar Where can I change the position of the sidebar? in the menu bar: ... 2 Where can I disable the Symbol-tab and the Document-tab? in the menu bar: ... 3 Which shortcuts can I use to switch focus between editor and sidebar? Focus keybindings (Link: https://www.geany.org/manual/current/index.html#focus-keybindings)

website: suggestion for improvement 6 on this website https://github.com/xiota/geany-preview/blob/main/docs/Questions_and_Answers.md#usage on "Some Markdown editors autosave the document as it is edited. Can the Preview plugin do that?" I would add at the end of the answer something like that: A good compromise could be to activate in the plugin Save Actions the point "save when not in focus" (or something like that, I don't use the English version). So in the moment where in the editor an other tab will be in focus or if Preview will be in focus, the changes will be saved automatically.

idea 1 In HTML in long documents changes outside the visible area of Preview are not shown right away. To this subject in https://github.com/xiota/geany-preview/blob/main/docs/Questions_and_Answers.md#configuration: there is this sentence:

I would like to synchronize the scrollbars, but don't currently know how.

This sentence sounds a little bit strange to me. The sentence reminds me of the software Meld, where scrollbars are synchronized when comparing two documents. I don't know if this kind of sentence will lead to a solution, because Meld is not HTML, what means that it could be that someone is making a change at the very end of the HTML-source-code, but the change will appear on the top of the web-page. In the citation the scrollbars are in the focus, although the scrollbars are not the problem. The scrollbar of the editor and the scrollbar of the Preview have nothing in common, so there is no need to synchronize the scrollbars. The focus should not be on the scrollbars but on the change. What about this idea: Compare webpage with the webpage that is changing and show the change in the middle of Preview.

On the other computer

What version of Ubuntu/Lubuntu are you running on the old laptop? What version of Geany is it using?

Lubunru 21.04, Geany 1.37.1

After a reboot of the computer and after updating the system, Preview was still not there, and Preview was still not in the list of the plugins of Geany. Then I did that: I closed Geany in the termnial: sudo apt-get install geany-plugin-preview the terminal wrote something like this: "geany-plugin-preview is already the latest version (...20211005...ubuntu21.04), so no update is necessary" then: I opened Geany, Preview is still not in the list of the plugins, so I can not activate it. In the sidebar there is no Preview. I rebooted the computer. Preview is still not in the list of the plugins. In the sidebar there is no Preview. What should I do?

Thank you for an answer in advance.

xiota commented 3 years ago

@ralf3u

The sidebar was completely empty, so even without tabs. I deactivate the sidebar and then activated the sidebar. Then I could see the Preview-tab again.

I don't know what happened.

Which order or rather which orders do I have to use to update Geany Preview?

Now that you have installed both the PPA and package. The following should be enough:

sudo apt-get update
sudo apt-get upgrade

Now I have 9 vertical lines in Geany in different colors with a distance of about 2 cm. The lines are on the right side.

Those are column markers. Geany has an option to show one column marker, but I prefer several. They're helpful to know where to put line breaks, like in preview.conf and source code files. To turn the feature off, use column_marker_enable=false in the config file.

Now there is not only a color flash but also a text is flashing. I will have to use a screenrecorder to know which kind of text it is. But I think that I see in the sidebar as flash: the previous content of the txt-document in small size. The font color is white. I don't see the text every time, but sometimes.

If you are seeing "the previous content of the txt-document", there might not be anything I can do about it.

OK, so instead of extra_css=dark.css I use extra_css=1.css I saved the document. in 1.css that I created in .config/geany/plugins/preview I wrote this line: html {background-color:#2e3436} It is the color of the background of the colorscheme that I use (Sleepy Pastel). I reboot the computer. The white flash and the flashing text are still there. Did I make a mistake?

I don't know. I don't see flashing on my computer. What happens if you turn off the auto-sidebar.lua script?

https://launchpad.net/~xiota/+archive/ubuntu/geany-plugins

It doesn't make sense to include instructions for specific packages because PPAs can have multiple packages. The instructions also assume people know how to use the package manager to install software. (Ubuntu Package Management)

website: suggestion for improvement...

I will read over your comments and make changes later.

On the other computer Preview is still not in the list of the plugins. In the sidebar there is no Preview. What should I do?

Some Linux cache files may be out of date. I don't know how/why it happens. Try running:

sudo ldconfig
ralf3u commented 3 years ago

@xiota

column_marker_enable=false

Yes, now the vertical lines are gone.

I don't see flashing on my computer.

I use an Intel Pentium N5000. Maybe your computer ist much faster. What's your processor?

Try this: The first tab is the HTML-document, the second tab is a txt-document, the third tab is also a txt-document. In both txt-document there should be plenty of text in the visible area. Now go to the third tab. And do 2 times very fast Ctrl+Page up. Try this many times, because the white flash is not always there. Look at the same time at the top right corner of the sidebar to see the text flashing.

If you are seeing "the previous content of the txt-document", there might not be anything I can do about it.

Now I know what I see as text that is flashing in the sidebar of the tab of the HTML-document: For a part of a second I see the content of the sidebar of the previous tab (a txt-document), although the sidebar is in the tab of the txt-document hidden.

What happens if you turn off the auto-sidebar.lua script?

If I delete activated.lua and if I delete auto-sidebar.lua then I don't see a white flash and I don't see a text flashing. The transition is smooth.

sudo ldconfig

Then I reboot the computer. Preview is still not in the list of the plugins. In the sidebar there is no Preview.

Thank you for an answer in advance.

ralf3u commented 3 years ago

@xiota

I just solved the problem with the flash!

In .config/geany/plugins/preview/1.css instead of this content: html { background-color:#2e3436; }

I choosed this content: html { background-color:#2e3436; color:#2e3436; }

Now there is no white flash any more and no white flashing text.

I already mentioned the possible solution on this webpage two days ago:

So, my idea was to set the default of the background-color of the Preview in background-color:gray, and even to set the default of the font-color of the Preview in background-color: gray, to reach a higher probability that there will be no white flash.

Now auto-sidebar works perfect!

xiota commented 3 years ago

Preview is still not in the list of the plugins. In the sidebar there is no Preview.

I don't know why it works on one computer but not the other. Maybe files are not installed in the right place. Try using the following commands to check:

find /usr -name "saveactions.so"
find /usr -name "preview.so"

You can also try updating all system packages:

sudo apt-get update
sudo apt-get dist-upgrade

Then reinstalling packages of interest:

sudo apt-get reinstall geany geany-plugins geany-plugin-preview

I just solved the problem with the flash! I choosed this content: html { background-color:#2e3436; color:#2e3436; } I already mentioned the possible solution on this webpage two days ago:

Glad you figured it out. This may work fine for you, but cannot be part of the plugin itself because that would make the text invisible by default.

If I delete activated.lua and if I delete auto-sidebar.lua then I don't see a white flash and I don't see a text flashing. The transition is smooth.

The problem is related to showing/hiding the sidebar. I've made some changes to the plugin that might help. They will be available in the PPA momentarily. You can use sudo apt-get update; sudo apt-get upgrade.

ralf3u commented 3 years ago

@xiota

To the other computer: This is what I did: updating the system Preview is still not in the list of the plugins. In the sidebar there is no Preview.

find /usr -name "saveactions.so" find /usr -name "preview.so"

sudo apt-get update sudo apt-get dist-upgrade

sudo apt-get reinstall geany geany-plugins geany-plugin-preview

The answer for find /usr -name "saveactions.so": /usr/lib/x86_64-linux-gnu/geany/saveactions.so

The answer for find /usr -name "preview.so": /usr/lib/x86_64-linux-gnu/ImageMagick-6.9.11/modules-Q16/coders/preview.so /usr/lib/x86_64-linux-gnu/geany/preview.so

After rebooting the computer: Preview is still not in the list of the plugins. There is no Preview In the sidebar.

the plan At the end of the month I want to reinstall Lubuntu 21.04 and then install Geany Preview by PPA. And I want to do it also with Lubuntu 21.10. I will leave a message on this webpage about the results.



to the flash

I've made some changes to the plugin that might help.

This is what I did: in preview.conf that is in /home/t/.config/geany/plugins/preview I changed: extra_css=1.css to extra_css=disable then I saved the document I deleted 1.css reboot the system Geany Preview: sidebar: background-color is white: no white flash

in preview.conf that is in /home/t/.config/geany/plugins/preview I changed: extra_css=1.css to extra_css=dark.css then I saved the document reboot the system Geany Preview: sidebar: Preview: background-color is white, so I can not test the white flash

in the plugin preferences: Reset Config Save Config Edit Config extra_css=dark.css is already set restart of Geany Geany Preview: sidebar: Preview: background-color is white, so I can not test the white flash

I deleted activated.lua I deleted auto-sidebar.lua html-documents: sidebar: Preview: background-color is white; font-color: black txt-documents: sidebar: Preview: background-color is black; font-color:white (also for documents in the format .css, .cfg, .conf and .lua)

So, this means that there is an issue, because html-documents don't respect dark.css. So, I can not test the flash.

Important remark: If in the html-document I delete only the very first line, so !DOCTYPE html, then the background-color is changing from white to dark. If I delete in the html-document other lines than the very first line, then background-color stays white.

html-documents don't respect dark.css html-documents don't respect 1.css (html {background-color:#2e3436;color:#2e3436}

xiota commented 3 years ago

/usr/lib/x86_64-linux-gnu/geany/saveactions.so
/usr/lib/x86_64-linux-gnu/geany/preview.so

The preview plugin looks like it's being installed to the correct location.

At the end of the month I want to reinstall Lubuntu 21.04 and then install Geany Preview by PPA. And I want to do it also with Lubuntu 21.10. I will leave a message on this webpage about the results.

Please let me know the results. I have not decided when I will switch to 21.10.

reboot the system

Are you rebooting the entire computer or just restarting Geany? Maybe it is just a language issue, but want to make sure because rebooting the computer is not necessary.

extra_css=dark.css Preview: background-color is white

dark.css works by inverting the normal white color.

html {
   filter: invert(100%);
}
img {
   filter: invert(100%);
}

Since you've customized your background to be dark, it makes the colors white. I will change dark.css to a true dark theme. For now, you can edit dark.css to match the colors of your normal css. For example:

html {
   background: #000000;
   color: #ffffff
}

html-documents don't respect 1.css (html {background-color:#2e3436;color:#2e3436}

The extra_css setting works on my end, so 1.css should work the way it was before. When you change settings, you need to either restart Geany or use the "Reload Config" button in Edit/Plugin Preferences/Preview.

xiota commented 3 years ago

@ralf3u I changed the default css themes to try to make them work better with dark themes. It should be available from the PPA momentarily. After installing, please delete the old css files from your config folder, especially the following, if they exist:

Please try with extra_css=disable to see if it picks up your system settings. If it doesn't, then try with dark.css.

ralf3u commented 3 years ago

@xiota

Please let me know the results. I have not decided when I will switch to 21.10.

I will test not only the PPA in 21.04 and 21.10 but I will also try to build it from the source for 21.04 and 21.10. So then all ways are tested.


to the other computer:

which geany

answer: /usr/bin/geany


sudo ldconfig

answer: (no answer)


ls /usr/lib/geany

answer something like: Not possible. File could not be found.


Are you rebooting the entire computer or just restarting Geany?

"Reboot the system", means to reboot the computer. I do reboot sometimes the computer to be sure that the changes are executed, even maybe it is not necessary.



on this webpage there are two issues https://github.com/xiota/geany-preview/blob/main/docs/Questions_and_Answers.md

issue 1 The real name is auto-sidebar an not auto-tabbar.

issue 2 Building on Linux: 404-error For a better website experience, the text of the link should be the same like the headline of the linked webpage. "Building on Linux" and "Building and Installing" are not the same text. The same installing procedure is still described on two different webpages (https://github.com/xiota/geany-preview and https://github.com/xiota/geany-preview/blob/main/docs/Questions_and_Answers.md). To this topic I wrote already:

I think that repetitions are not a good idea. Maybe things will change in future. Then one need to change two things instead of one thing. This can increase the error rate.



To the issue with the flash and dark.css: I will try to test it extensively tomorrow.

xiota commented 3 years ago

I will test not only the PPA in 21.04 and 21.10 but I will also try to build it from the source for 21.04 and 21.10. So then all ways are tested.

When building from source, files are installed to a different location, and you will need to make a link. I mentioned the command before (ln -s ...).

to the other computer:

As far as I can tell, it should be working. You can try uninstalling and running ldconfig.

sudo apt-get purge geany geany-plugins geany-plugin-preview
sudo ldconfig

Then reinstall each package separately, running ldconfig after each one.

sudo apt-get install geany
sudo ldconfig
sudo apt-get install geany-plugins
sudo ldconfig
sudo apt-get install geany-plugin-preview
sudo ldconfig

"Reboot the system", means to reboot the computer. I do reboot sometimes the computer to be sure that the changes are executed, even maybe it is not necessary.

Just wanted to make sure you knew it wasn't necessary in most of the cases that you've been rebooting. (Eg, after changing the css).

on this webpage there are two issues ...

I will check.

I think that repetitions are not a good idea.

Some things are kept in the readme, even if it is duplicated elsewhere. I will just have to correct the errors.

You should take a look at the source code of various projects. Duplication is sometimes required by the programming language. Some are worse than others.

In C/C++, most functions have to be declared and defined. The function name, return type, and parameters are stated exactly the same way twice in different locations. In some cases, the declaration and definition can be combined, but then it ends up being more work than just having them separate.

Java is especially bad with a lot of "boilerplate" code. There is even a separate language that is basically designed to fix problems with Java. (Should I Use Kotlin Instead Of Java?)

ralf3u commented 3 years ago

@xiota

To the other computer. This is what I did:

sudo apt-get purge geany geany-plugins geany-plugin-preview sudo ldconfig

sudo apt-get install geany sudo ldconfig sudo apt-get install geany-plugins sudo ldconfig sudo apt-get install geany-plugin-preview sudo ldconfig

After rebooting the computer: Preview is still not in the list of the plugins. There is no Preview In the sidebar.

ralf3u commented 3 years ago

@xiota

testing extra_css & flash

test 1: extra_css=disable test 2: extra_css=dark.css test 3: extra_css=1.css

What I did:

test 1: extra_css=disable there is no 1.css; Geany is not open; delete auto-sidebar.lua & delete activated.lua; open Geany; extra_css=disable; save the document; close Geany; open Geany; Preview: the background-color is white of txt-documents as it should be; Preview: the background-color is white of html-documents as it should be; close Geany; with auto-sidebar.lua & with activated.lua; open Geany; txt-document: there is no sidebar as it should be; html-document: there is a sidebar as it should be; there is no flash as it should be; summary: extra_css=disable works perfect

test 2: extra_css=dark.css there is no 1.css; Geany is not open; delete auto-sidebar.lua & delete activated.lua; open Geany; extra_css=dark.css; save the document; close Geany; open Geany; Preview: the background-color is black of txt-documents as it should be; Preview: the background-color is white of html-documents as it should NOT be;

I don't continue the test because html-documents still not respect dark.css.

xiota commented 3 years ago

To the other computer.

I don't know why it is not working.

Are you willing to try this build of Geany? It is built from the current git source with a couple patches. There are two deb files. After downloading them, put them in their own folder, cd to the folder, then run: dpkg -i geany*.deb

If the preview plugin still doesn't show up, you can remove it and install the old geany from the repository.

apt-get purge geany
apt-get install geany

testing extra_css & flash

Did you delete all of the css files in your config folder so the plugin can use the new ones?

ralf3u commented 3 years ago

@xiota

After downloading them, put them in their own folder

Which folder? /.config/geany?

then run: dpkg -i geany*.deb

I replace geany* with the name of the deb-packages? So, I let it run 2x, right?

Did you delete all of the css files in your config folder so the plugin can use the new ones?

In .config/geany/plugins/preview there is only this: dark.css, markdown.css, pandoc.css, preview.conf, preview-headers.css and screenplain.css.

Is this the right answer to your question?

xiota commented 3 years ago

Which folder?

Any folder, as long as they are the only two files in the folder.

I replace geany* with the name of the deb-packages? So, I let it run 2x, right?

If the two deb files are the only files in the folder, geany*.deb will run the command on both files at the same time. You can run the command twice with the file names if you want. Or you can run it with both file names after dpkg -i.

In .config/geany/plugins/preview there is only this: dark.css, markdown.css, pandoc.css, preview.conf, preview-headers.css and screenplain.css.

What you're seeing is probably from the old css files. Delete all of the css files from the config folder. Then restart geany. The plugin will recreate the files from default.

ralf3u commented 3 years ago

@xiota

Delete all of the css files from the config folder. Then restart geany. The plugin will recreate the files from default.

OK, I did that. Now extra_css=disable shows a dark background (the background-color of sleepy pastel) in the sidebar of a txt-document. Is this the intention of the value extra_css=disable?

ralf3u commented 3 years ago

@xiota

Are you willing to try this build of Geany?

Should I first remove Geany with the next order? sudo apt-get purge geany geany-plugins geany-plugin-preview

xiota commented 3 years ago

OK, I did that. Now extra_css=disable shows a dark background (the background-color of sleepy pastel) in the sidebar of a txt-document. Is this the intention of the value extra_css=disable?

The new css detects whether you are using a "dark" or "light" theme. You can look inside preview-headers.css to see the details.

Now, extra_css is only needed if it doesn't detect or you want something different for another reason. I will have to update the questions document.

Should I first remove Geany with the next order? sudo apt-get purge geany geany-plugins geany-plugin-preview

Normally you wouldn't have to, but since that computer is having problems detecting the plugin, probably you should. Also, try running ldconfig after install.

ralf3u commented 3 years ago

@xiota For a better structure I continue the topic dark mode & flash on #2.

ralf3u commented 3 years ago

@xiota

To the other computer. This is what I did:

sudo apt-get purge geany geany-plugins geany-plugin-preview sudo ldconfig

in the folder where only the two deb packages are: sudo dpkg -i geany*.deb sudo ldconfig

open Geany Preview is still not in the list of the plugins. There is no Preview In the sidebar. remark: Now there are only 6 plugins in the list of plugins.

sudo apt-get install geany-plugins sudo ldconfig sudo apt-get install geany-plugin-preview sudo ldconfig

open Geany Preview is still not in the list of the plugins. There is no Preview In the sidebar.

ralf3u commented 3 years ago

@xiota

When building from source, files are installed to a different location, and you will need to make a link. I mentioned the command before (ln -s ...).

Sorry to ask, but why it is not mentioned here: https://github.com/xiota/geany-preview/blob/main/docs/Building_on_Linux.md

Thank you for an answer in advance.

ralf3u commented 3 years ago

@xiota I'm now offline for two weeks. I will answer messages as soon as I get back.

xiota commented 3 years ago

On a very long document, so that I can see in the editor only a part of the document in the visible area,

That sounds like the snippets feature. The problem is that very large documents are very slow to process. There is also a lot of scrolling to find the part that's being edited. So I made it show only a small part of the document. The options to control it are in the config file:

snippet_window = 5000
snippet_trigger = 100000

snippet_window is the size of the preview to show. snippet_trigger is the size of the document to start showing smaller previews. Make it larger to "disable" it. I probably need to add an option to update preview only when a keyboard shortcut is pressed, like spell check.

there is at the very first line some strange text that is marked, like: "shorcut stays down".

I don't know what that is. Could it be part of your document? At the beginning and end of snippets, the results can look strange because the document is cut off.

in the sidebar: continue to tab-browse with shortcuts to the left result: a tab of the editor is in focus expected result: the last tab on the right side of the sidebar should be in focus

Are you describing when you keep pressing tab, focus eventually ends up at the editor? That is built into Geany. There is nothing I can do about it from the plugin.

To the other computer... Preview is still not in the list of the plugins. There is no Preview In the sidebar.

I think the problem is the package wasn't listing all dependencies. It's changed now.

When building from source, files are installed to a different location, and you will need to make a link. I mentioned the command before (ln -s ...).

Sorry to ask, but why it is not mentioned here: https://github.com/xiota/geany-preview/blob/main/docs/Building_on_Linux.md

I'll add more info to the document.

If you build geany, geany-plugins, etc. from source, they are all installed to /usr/local/ and they will all work together. If you build some but not others, they are installed in different places. So it's better to either build them all or install them all from packages. If you have/want to build some but not others, you can make links with ln -s [original-file] [link], but it depends on the situation.

xiota commented 3 years ago

I'm now offline for two weeks.

@ralf3u Enjoy your freedom from the internet.

ralf3u commented 3 years ago

@xiota

I'm now offline for two weeks.

I'm back. OK, so let's continue.


I think the problem is the package wasn't listing all dependencies. It's changed now.

Yes!! Now "Preview" appears in the list of plugins within Geany. And it works fine on Lubuntu 21.04 on Geany 1.38. Thank you so much to have fixed this problem.

But, something is strange, because on the old computer there is Geany 1.38, while on the new computer there is still Geany 1.37.1, although I did an update on both systems (Lubuntu 21.04) some minutes ago and I rebooted both computer. Do you have an explication why I have two different versions of Geany?

Thank you for an answer in advance.

xiota commented 3 years ago

But, something is strange, because on the old computer there is Geany 1.38

ralf3u commented 3 years ago

@xiota

If you want to keep the newer version of Geany, what is your opinion of adding it to the geany-plugins PPA?

So, you want to add the new Geany to the geany-plugins PPA. Did I understand it right? Well, if I understood it right, I always prefer the new version of a software to participate to make a software better, because if I find some issues, I can report them. A strong Linux-user gave me the advice to use only the LTS version of Lubuntu. I didn't respect this advice. And till today I had no disadvantages. It is the opposite: I benefit from fixed bugs and the programmers benefit from reported issues that are up to date.

xiota commented 3 years ago

A strong Linux-user gave me the advice to use only the LTS version of Lubuntu. And till today I had no disadvantages. It is the opposite: I benefit from fixed bugs and the programmers benefit from reported issues that are up to date.

Newer versions often have bugfixes and new features. The problem is sometimes they have new bugs. The last 5 or so years, I don't recall having any major problems with Ubuntu. I'd recommend against using alpha/beta/pre-releases. I don't always follow that advice and suffer from it.

BTW, I upgraded to 21.10. It was the smoothest upgrade I've had. Doesn't seem like there's much different from 21.04.

So, you want to add the new Geany to the geany-plugins PPA. Did I understand it right?

That is what I'm thinking about. These are the options:

The main issue is potential compatibility issues with Geany plugins.

Since you're probably the only one using the PPA right now, I don't want to make any major changes that you wouldn't want. So I'll let you decide.

ralf3u commented 3 years ago

@xiota

Add Geany 1.38 to the PPA.

For me it would be cool to use Geany 1.38. But I don't know if other users have the same opinion. If you decide to ingegrate it in the PPA, it would be good to mention it in the point "Installation", so users are informed.

xiota commented 3 years ago

I'll add it to the PPA and update the docs later. People who don't want it can freeze the old version in apt, or if it causes problems I can remove it.

ralf3u commented 3 years ago

Add Geany 1.38 to the PPA.

On github.com/geany/geany the latest version of Geany is 1.38. But I have now Geany 1.39.

xiota commented 3 years ago

@ralf3u I put the version from git in the PPA. It calls itself 1.39. There are also some patches I've been using:

ralf3u commented 3 years ago

@xiota

I put the version from git in the PPA.

What is a git? Where did you get Geany 1.39? Because on github.com/geany/geany/releases there is no 1.39.

Thank you for an answer in advance.