[Github-comments] Re: [geany/geany-plugins] LaTeX: Switch handling of insert (list) environments over to snippets workflow (PR #1330)
Merged #1330 into master. -- Reply to this email directly or view it on GitHub: https://github.com/geany/geany-plugins/pull/1330#event-12635626337 You are receiving this because you are subscribed to this thread. Message ID:
[Github-comments] Re: [geany/geany-plugins] LaTeX: Switch handling of insert (list) environments over to snippets workflow (PR #1330)
@eht16 approved this pull request. -- Reply to this email directly or view it on GitHub: https://github.com/geany/geany-plugins/pull/1330#pullrequestreview-2027099072 You are receiving this because you are subscribed to this thread. Message ID:
[Github-comments] Re: [geany/geany-plugins] LaTeX: Switch handling of insert (list) environments over to snippets workflow (PR #1330)
In the end it's a little matter of taste, but compare it to HTML's ```html ... ``` and ```html … -- Reply to this email directly or view it on GitHub: https://github.com/geany/geany-plugins/pull/1330#issuecomment-2081475695 You are receiving this because you are subscribed to this thread. Message ID:
[Github-comments] Re: [geany/geany-plugins] LaTeX: Switch handling of insert (list) environments over to snippets workflow (PR #1330)
Looks good now. As said before, I cannot judge whether the result of the snippets is as desired. To me it feels a little confusing that the element in the "itemize" environment is indented while for the other ones the cursor position is not indented. Maybe it's ok. -- Reply to this email directly or view it on GitHub: https://github.com/geany/geany-plugins/pull/1330#issuecomment-2081474610 You are receiving this because you are subscribed to this thread. Message ID:
[Github-comments] Re: [geany/geany-plugins] LaTeX: Switch handling of insert (list) environments over to snippets workflow (PR #1330)
@frlan pushed 1 commit. 5fb3c82fa0c7024cfa78586afa4da0f3b279f019 Propper NULL-terminate strings and fix an trailing space inside a template -- View it on GitHub: https://github.com/geany/geany-plugins/pull/1330/files/6728529322b028c0e0791ba8ecec968042ac8c6d..5fb3c82fa0c7024cfa78586afa4da0f3b279f019 You are receiving this because you are subscribed to this thread. Message ID:
[Github-comments] Re: [geany/geany-plugins] LaTeX: Switch handling of insert (list) environments over to snippets workflow (PR #1330)
> > For "table" and "itemize" there is a trailing space after the cursor > > marker. Is this intended? > > "block" uses no indentation at all, "itemize" uses a tab resp. spaces and > > "table" uses a single space only. > > This is fixed. I tried to re-sync the indentions I cannot verify as I do not know what is the purposed variant. To me it looks inconsistent: ![Screenshot_2024-04-26_18-38-28](https://github.com/geany/geany-plugins/assets/617017/47d46203-5f95-4454-a03b-0e412bd6e747) More importantly, the rubbisch after the "block" environment is because `g_strconcat()` must always be NULL-terminated which it is not in the newly added code. -- Reply to this email directly or view it on GitHub: https://github.com/geany/geany-plugins/pull/1330#issuecomment-2079738972 You are receiving this because you are subscribed to this thread. Message ID:
[Github-comments] Re: [geany/geany-plugins] LaTeX: Switch handling of insert (list) environments over to snippets workflow (PR #1330)
@eht16 commented on this pull request. > - tmp = g_strdup_printf("\n\\end{%s}", environment); - glatex_insert_string(tmp, FALSE); - g_free(tmp); - - indention_prefs = editor_get_indent_prefs(doc->editor); - if (type == GLATEX_ENVIRONMENT_TYPE_LIST) - { - sci_set_line_indentation(doc->editor->sci, - sci_get_current_line(doc->editor->sci), - indent + indention_prefs->width); + if (type == GLATEX_ENVIRONMENT_TYPE_LIST) + { + tmpstring = g_strconcat( + "\\begin{", + environment, + "}\n\t\\item %cursor% \n\\end{", There is still a trailing space. -- Reply to this email directly or view it on GitHub: https://github.com/geany/geany-plugins/pull/1330#pullrequestreview-2025456762 You are receiving this because you are subscribed to this thread. Message ID:
[Github-comments] Re: [geany/geany-plugins] LaTeX: Switch handling of insert (list) environments over to snippets workflow (PR #1330)
> Looks good. > > As you know I'm not LaTeX expert and so I'm wondering if it is on purpose > that different environments produce quite different stylings: > > ``` > \begin{block}{} > _ > \end{block} > > \begin{itemize} > \item _ > \end{itemize} > > \begin{table} > _ > \end{table} > ``` > > For "table" and "itemize" there is a trailing space after the cursor marker. > Is this intended? > > "block" uses no indentation at all, "itemize" uses a tab resp. spaces and > "table" uses a single space only. This is fixed. I tried to re-sync the indentions -- Reply to this email directly or view it on GitHub: https://github.com/geany/geany-plugins/pull/1330#issuecomment-2074137477 You are receiving this because you are subscribed to this thread. Message ID:
[Github-comments] Re: [geany/geany-plugins] LaTeX: Switch handling of insert (list) environments over to snippets workflow (PR #1330)
@frlan pushed 1 commit. 6728529322b028c0e0791ba8ecec968042ac8c6d LaTeX: Switch handling of insert (list) environments over to snippets workflow -- View it on GitHub: https://github.com/geany/geany-plugins/pull/1330/files/9313b8e02071157454e1dc7c3e816d3124cb7293..6728529322b028c0e0791ba8ecec968042ac8c6d You are receiving this because you are subscribed to this thread. Message ID:
[Github-comments] Re: [geany/geany-plugins] LaTeX: Switch handling of insert (list) environments over to snippets workflow (PR #1330)
@frlan commented on this pull request. > if (utils_str_equal(environment, "block") == TRUE) { - g_string_append(tmpstring, "}{}"); + tmpstring = g_strdup_printf("\\begin{%s}{}\n%%cursor%%\n\\end{%s}", environment, environment); True. Should be better now (even though not sure about the line breaks inside the call as it's a very long string …" -- Reply to this email directly or view it on GitHub: https://github.com/geany/geany-plugins/pull/1330#discussion_r1573834932 You are receiving this because you are subscribed to this thread. Message ID:
[Github-comments] Re: [geany/geany-plugins] LaTeX: Switch handling of insert (list) environments over to snippets workflow (PR #1330)
@eht16 commented on this pull request. > if (utils_str_equal(environment, "block") == TRUE) { - g_string_append(tmpstring, "}{}"); + tmpstring = g_strdup_printf("\\begin{%s}{}\n%%cursor%%\n\\end{%s}", environment, environment); It might be more readable using "g_strconcat" like above in https://github.com/geany/geany-plugins/pull/1330/files#diff-44b2e13e0c1bd7750fc7aa3324ce230dd2ed0192c37d03208846a549509206bbR82? -- Reply to this email directly or view it on GitHub: https://github.com/geany/geany-plugins/pull/1330#pullrequestreview-2013463978 You are receiving this because you are subscribed to this thread. Message ID:
[Github-comments] Re: [geany/geany-plugins] LaTeX: Switch handling of insert (list) environments over to snippets workflow (PR #1330)
@eht16 commented on this pull request. Looks good. As you know I'm not LaTeX expert and so I'm wondering if it is on purpose that different environments produce quite different stylings: ``` \begin{block}{} _ \end{block} \begin{itemize} \item _ \end{itemize} \begin{table} _ \end{table} ``` For "table" and "itemize" there is a trailing space after the cursor marker. Is this intended? "block" uses no indentation at all, "itemize" uses a tab resp. spaces and "table" uses a single space only. > @@ -103,6 +114,7 @@ glatex_insert_string(const gchar *string, gboolean > reset_position) doc = document_get_current(); + Was this on purpose? -- Reply to this email directly or view it on GitHub: https://github.com/geany/geany-plugins/pull/1330#pullrequestreview-2013452584 You are receiving this because you are subscribed to this thread. Message ID: