Re: Capture, template expansion and keyword for link type

2024-07-14 Thread Max Nikulin
On 12/07/2024 23:34, Sébastien Gendre wrote: Max Nikulin writes: See specific store link functions, e.g. `org-gnus-store-link'. Reading the `org-gnus-store-link' function, I see that is set: type, file, node, link and description. I see :from :to :subject :message-id :group, :date. Other

Re: [DISCUSSION] Possible inclusion of org-capture.el into Emacs core

2024-07-13 Thread Max Nikulin
I have dropped emacs-devel from Cc. On 30/12/2023 19:15, Ihor Radchenko wrote: With org-protocol, one can also make Emacs receive data from browser and perform any action defined by custom handler function - all fully configurable and not necessarily related to Org mode. and Ihor Radchenko

Re: Capture, template expansion and keyword for link type

2024-07-12 Thread Max Nikulin
On 12/07/2024 03:36, Sébastien Gendre wrote: Max Nikulin writes: See the "Link type, Available keywords" table in this section. `org-capture' may be executed in various Emacs buffers and available keywords may depend on major mode. Is it necessary to call "org-store-link"

Re: [PATCH] oc-csl: New custom option `org-cite-csl-sentence-case-bibtex-titles'

2024-07-12 Thread Max Nikulin
On 08/07/2024 19:56, András Simonyi wrote: What I've been arguing for in this thread and what motivates the current default behavior is that it is a general, style-independent CSL assumption that the processor's input for title fields is in sentence-case, and this requires converting the

Re: Capture from Firefox to Org-mode

2024-07-11 Thread Max Nikulin
On 09/07/2024 23:45, Morgan Willcock wrote: Just to mention another option, I use this one: https://addons.mozilla.org/en-US/firefox/addon/linkremark/ In its current state it does not extract metadata specific to books or events. Dublin Core or other similar metadata are on TODO list, but

Re: Capture, template expansion and keyword for link type

2024-07-11 Thread Max Nikulin
On 11/07/2024 13:59, Sébastien Gendre wrote: I was reading the Org-mode manual, at section "10.1.3.2 Template expansion": https://orgmode.org/manual/Template-expansion.html And I was a little bit confused by the "%:keyword". The manual say: "Specific information for certain link types, see

Re: [PATCH] oc-csl: New custom option `org-cite-csl-sentence-case-bibtex-titles'

2024-07-08 Thread Max Nikulin
On 06/07/2024 16:59, András Simonyi wrote: Well, what they typically want is using the original title case despite a style not containing any explicit instruction that the title field should be in title-case, which, according to the latest. 1.02 CSL standard

Re: org-babel-execute-src-block filters characters from :session *shell* output

2024-07-06 Thread Max Nikulin
On 01/07/2024 02:08, Ihor Radchenko wrote: +++ b/lisp/ob-shell.el @@ -273,7 +273,7 @@ (defvar org-babel-sh-eoe-indicator "echo 'org_babel_sh_eoe'" "String to indicate that evaluation has completed.") (defvar org-babel-sh-eoe-output "org_babel_sh_eoe" "String to indicate that evaluation

Re: org-babel-execute-src-block filters characters from :session *shell* output

2024-07-06 Thread Max Nikulin
On 18/06/2024 00:57, Ihor Radchenko wrote: Max Nikulin writes: Some shells support "semantic shell" that allows terminal applications e.g. to copy whole command output. It is based on escape sequences. https://gitlab.freedesktop.org/Per_Bothner/specifications/blob/master/proposal

Re: bash source code block: problem after ssh commands

2024-07-03 Thread Max Nikulin
On 01/07/2024 23:01, Ihor Radchenko wrote: Max Nikulin writes: bug#71081 is about shell-command-on-region, not about mailcap. (and pty may actually not matter there, because Windows' cmd.exe is not even POSIX-compient...) Of course, there are no pty's on Windows and cmd.exe is a special case

Re: bash source code block: problem after ssh commands

2024-07-01 Thread Max Nikulin
On 01/07/2024 16:51, Ihor Radchenko wrote: Max Nikulin writes: My experience is that it is not easy to start a process without a tty in Emacs. Eli will object. I guess not on Windows (bug#71081). But otherwise I agree. It was for starting mailcap viewer and Windows was not an issue

Re: bash source code block: problem after ssh commands

2024-07-01 Thread Max Nikulin
On 30/06/2024 23:42, Ihor Radchenko wrote: Max Nikulin writes: On 30/06/2024 22:28, Ihor Radchenko wrote: I do not see a great benefit of re-implementing session support via actual terminal. (I think we agree here). `shell' and so comint allocates "actual" pty. Are you sur

Re: bash source code block: problem after ssh commands

2024-06-30 Thread Max Nikulin
On 30/06/2024 22:28, Ihor Radchenko wrote: I do not see a great benefit of re-implementing session support via actual terminal. (I think we agree here). `shell' and so comint allocates "actual" pty. I expect that bracketed paste is just some escape sequences delimiting pasted text (fcntl

Re: bash source code block: problem after ssh commands

2024-06-30 Thread Max Nikulin
On 30/06/2024 18:06, Ihor Radchenko wrote: Max Nikulin writes: https://debbugs.gnu.org/67259 Notice that the report is for *interactive* sessions. Org babel sessions are not so interactive. They are to maintain state, not to interact with users directly... You are not right. We have

Re: bash source code block: problem after ssh commands

2024-06-30 Thread Max Nikulin
On 18/11/2023 22:51, Matt wrote: On Fri, 17 Nov 2023 23:07:57 +0100 Matt wrote --- The second claim has nothing to do with Org Babel. I was able to confirm it and provide the steps to reproduce. I think it would make sense to report it upstream and let them decide if it's expected

Re: bash source code block: problem after ssh commands

2024-06-29 Thread Max Nikulin
On 18/11/2023 15:04, Max Nikulin wrote: On 17/11/2023 17:17, Ihor Radchenko wrote: I see bash vs. dash difference with public key authorization, so no need for password prompts. I have not figured out how to construct an example without ssh since this command *may* read stdin, but does not do

Re: does org mode require a separate LaTeX installation to export?

2024-06-21 Thread Max Nikulin
On 19/06/2024 19:55, Christopher W. Ryan wrote: In other words, if a complete novice, knowing nothing about LaTeX and not having it on their machine ever, installed emacs and created an org mode file, could they export via latex to PDF? Could they export to html? For HTML export, LaTeX may be

Re: [PATCH] oc-csl: New custom option `org-cite-csl-sentence-case-bibtex-titles'

2024-06-21 Thread Max Nikulin
On 19/06/2024 16:27, András Simonyi wrote: On Wed, 15 May 2024 at 13:48, Max Nikulin wrote: I had a hope that it might alleviate the issue and to make things working out of the box for more users. [...] Of course it could be checked whether a CSL style contains explicit instructions about

Re: [BUG] Trailing dash is not included in link [9.7.3 (9.7.3-2f1844 @ /home/mwillcock/.emacs.d/elpa/org-9.7.3/)]

2024-06-20 Thread Max Nikulin
On 16/06/2024 22:59, Ihor Radchenko wrote: Max Nikulin writes: I suspect, it worked prior to v9.5. Without a unit test it may be accidentally broken again. No, it did not work. If you can, please do not make such assertions without testing. I am sorry, I had no intention to offend you. I

Re: [BUG] Trailing dash is not included in link [9.7.3 (9.7.3-2f1844 @ /home/mwillcock/.emacs.d/elpa/org-9.7.3/)]

2024-06-16 Thread Max Nikulin
On 14/06/2024 21:04, Ihor Radchenko wrote: Morgan Willcock writes: i.e. Inserting "https://domain/test-; into the buffer will create a clickable link for "https://domain/test;. I improved the heuristics we use to detect plain links. Fixed, on main.

Re: org-babel-execute-src-block filters characters from :session *shell* output

2024-06-16 Thread Max Nikulin
On 15/06/2024 20:19, Ihor Radchenko wrote: The underlying cause is limitation of Emacs API for interactive shells - we cannot easily distinguish command output from prompt and other extra staff your shell/other interactive command spits into the buffer. So, we have to either filter output the

Re: [PATCH] orgweb: Update org-ruby link (tools)

2024-06-09 Thread Max Nikulin
On 09/06/2024 02:18, Ihor Radchenko wrote: Max Nikulin writes: ... I have tried to blindly update zh-CN file. Likely it should be done more accurately. Yes. Let's not fiddle with Chinese version. It is already out of sync, but we cannot do much unless we get someone Chinese-speaking volunteer

[PATCH] orgweb: Update org-ruby link (tools)

2024-06-08 Thread Max Nikulin
:00 2001 From: Max Nikulin Date: Sat, 8 Jun 2024 23:01:56 +0700 Subject: [PATCH 1/2] tools.org: Update link to org-ruby * tools.org: * zh-CN/tools.org: Update org-ruby project page. Use link from <https://rubygems.org/gems/org-ruby> --- tools.org | 2 +- zh-CN/tools.org | 2 +- 2

Re: Incremental search in hidden text does not work in Org 9.7 Emacs 28

2024-06-08 Thread Max Nikulin
On 06/06/2024 01:06, Ihor Radchenko wrote: Remember that older Org mode also did not have link paths searchable. You are right, I forgot about it. Since the feature was advertised in ORG-NEWS Hidden parts of the links can now be searched and revealed during isearch another entry should

[BUG] M-RET may cause hang in the case of nested list

2024-06-07 Thread Max Nikulin
Hi, I experience hangs after hitting M-RET. Org main HEAD or 9.5, Emacs-28 8< - First level item - nested item after nested item >8 M-RET causes 100% CPU load. If I hit C-g then "after nested item" disappears and new item is created on that line.

Re: [PATCH] Add support for shortdoc link type

2024-06-05 Thread Max Nikulin
On 13/05/2024 20:04, Bruno Cardoso wrote: +++ b/etc/ORG-NEWS Bruno, I am sorry, but Org-9.7 has been released and your patch can not be cleanly applied any more. Please, rebase it and check that the new feature is described in the proper section for changes that have not released yet. A

Re: Incremental search in hidden text does not work in Org 9.7 Emacs 28

2024-06-05 Thread Max Nikulin
On 05/06/2024 22:06, Ihor Radchenko wrote: `org-fold-core-style' text-properties is going to be obsoleted. I tried to support isearch, but it is ultimately an uphill battle against bugs popping out here and there. I have seen these words in another thread, but I did not expect a regression in

Incremental search in hidden text does not work in Org 9.7 Emacs 28

2024-06-05 Thread Max Nikulin
Hi, Consider a file with a link 8< Text [[file:text.org][Something]] >8 Incremental search C-s file does not work with current main HEAD (v9.7) and Emacs-28. `org-fold-core-style' text-properties There is no issue for Org 9.6.28. Link part is temporary revealed when

Re: question about links, macros + org-publish and "parametrization"

2024-05-31 Thread Max Nikulin
On 30/05/2024 23:33, Ihor Radchenko wrote: Max Nikulin writes: I can not figure out if it is possible with some trick to expand {{{year}}} before file:... is parsed. Not possible. Macros are not recognized in verbatim contexts like link path. I had in mind some technique like \expandafter

Re: question about links, macros + org-publish and "parametrization"

2024-05-30 Thread Max Nikulin
On 30/05/2024 12:03, Martin Steffen wrote: #+macro: year 24 #+macro: source [[file:./$1/t.org][for the year $1]] #+macro: target {{{source({{{year}}})}}} Custom link type might be more convenient (info "(org) Adding Hyperlink Types") https://orgmode.org/manual/Adding-Hyperlink-Types.html I

Re: Adding custom providers for thingatpt.el

2024-05-22 Thread Max Nikulin
On 21/05/2024 23:24, Jim Porter wrote: On 5/21/2024 3:32 AM, Max Nikulin wrote: On 20/05/2024 09:33, Jim Porter wrote: +++ b/lisp/org.el [...] +(require 'thingatpt) So it becomes hard dependency. However it seems thingatpt is anyway loaded through some indirect dependency. Probably

Re: Saving some kitten, plus some questions along the way

2024-05-21 Thread Max Nikulin
On 20/05/2024 04:24, Stefan Monnier wrote: Subject: [PATCH 3/4] testing/org-test.el (): Remove dead code (featurep 'org) is always non-nil here since we have a (require 'org) further up. I suspect other `require`s nearby could be removed or moved to toplevel. Just a guess. Perhaps earlier

Re: Using a custom environment for a src language

2024-05-21 Thread Max Nikulin
On 20/05/2024 08:57, Rustom Mody wrote: I have my own Python environment called PYT. #+BEGIN_PYT contents #+END_PYT See `org-latex-custom-lang-environments' for #+begin_src python.

Re: Adding custom providers for thingatpt.el

2024-05-21 Thread Max Nikulin
On 20/05/2024 09:33, Jim Porter wrote: +++ b/lisp/org.el @@ -81,6 +81,7 @@ (require 'calendar) (require 'find-func) (require 'format-spec) +(require 'thingatpt) So it becomes hard dependency. However it seems thingatpt is anyway loaded through some indirect dependency.

Re: org-babel shell in windows not finishing command

2024-05-21 Thread Max Nikulin
On 21/05/2024 01:37, Ihor Radchenko wrote: echo 'echo foo' | cmdproxy.exe yields : Microsoft Windows [Version 10.0.19045.2251] : (c) Microsoft Corporation. All rights reserved. : : c:\Users\johndoe\Org>echo foo : foo Out of curiosity, does the /q option help to suppress the banner?

Re: [DISCUSSION] The meaning of :cmdline header argument across babel backends

2024-05-21 Thread Max Nikulin
On 21/05/2024 01:01, Matt wrote: I'm okay with these. I can start on a patch for :script-args and :program-args within ob-shell. Frankly speaking your plan is not clear for me. My special concern is DWIM behavior https://list.orgmode.org/874jbkcmyg.fsf@localhost (Ihor Radchenko Mon, 29 Apr

Re: [PATCH] Add support for shortdoc link type

2024-05-16 Thread Max Nikulin
On 13/05/2024 20:04, Bruno Cardoso wrote: On 2024-05-13, 18:14 +0700, Max Nikulin wrote: Sorry, but did you manually edit the patch? I didn't. I generated it again and applied without errors. Thank you. Now your patch can be applied on my side as well. Please, proceed with the copyright

Re: [POLL] Dealing with +1m/y repeaters when jumping to impossible date (should 05-31 +1m be 07-01 or 06-30?)

2024-05-16 Thread Max Nikulin
On 14/05/2024 19:56, Ihor Radchenko wrote: Max Nikulin writes: +(defun org-time-inc (unit value time) Is there a chance that support of intervals like 1h20m will be required later? Not sure again. I simply used ts-inc function signature from Adam's ts.el as reference. ts.el has `ts-adjust

Re: [PATCH] oc-csl: New custom option `org-cite-csl-sentence-case-bibtex-titles'

2024-05-15 Thread Max Nikulin
On 11/05/2024 22:33, András Simonyi wrote: since bibtex and biblatex requires title fields to be in title case but CSL assumes that they are in sentence-case, citeproc-el converts title fields in bib(la)tex bibliography databases into sentence-case before processing them except for entries with

Re: [POLL] Dealing with +1m/y repeaters when jumping to impossible date (should 05-31 +1m be 07-01 or 06-30?)

2024-05-15 Thread Max Nikulin
On 14/05/2024 19:56, Ihor Radchenko wrote: Max Nikulin writes: On 13/05/2024 17:07, Ihor Radchenko wrote: <2025-01-31 Fri +1m> <2025-02-28 Fri +1m> <2025-03-28 Fri +1m> Instead of using timestamp obtained on previous step, use original timestamp and multip

Re: [POLL] Dealing with +1m/y repeaters when jumping to impossible date (should 05-31 +1m be 07-01 or 06-30?)

2024-05-14 Thread Max Nikulin
On 13/05/2024 17:07, Ihor Radchenko wrote: However, there are still some issues remaining. When updating timestamps repeating monthly across months with 30, 31, and 28 days we get <2025-01-31 Fri +1m> <2025-02-28 Fri +1m> <2025-03-28 Fri +1m> ... <2026-01-28 Wed +1m> Instead of using

Re: [PATCH] Add support for shortdoc link type

2024-05-13 Thread Max Nikulin
On 11/05/2024 23:58, Bruno Cardoso wrote: On 2024-05-10, 18:09 +0700, Max Nikulin wrote: <https://orgmode.org/worg/org-contribute.html#copyright> I haven't yet. Will be glad to. I hope, next patch revision will be the final one, so it can be notification that the procedure is com

Re: [PATCH] Add support for shortdoc link type

2024-05-10 Thread Max Nikulin
On 09/05/2024 04:26, Bruno Cardoso wrote: On 2024-05-08, 18:20 +0700, Max Nikulin wrote: I have not managed to get all known groups with `shortdoc-display-group' in Emacs-28. Is it a feature of `shortdoc' in Emacs-29? In Emacs-29 `shortdoc' is an alias for `shortdoc-display-group

Re: [PATCH] Fix regex for determining image width from attribute

2024-05-09 Thread Max Nikulin
On 08/05/2024 17:54, Ihor Radchenko wrote: Max Nikulin writes: #+attr_html: :alt Image width test #+attr_beamer: :width \linewidth #+attr_latex: :width +.5\textwidth #+attr_md: :width 75% [[file:babelfish.png]] - I do not mind that just "\linewidth" is ignored. - The case of &q

Re: [PATCH] Add support for shortdoc link type

2024-05-08 Thread Max Nikulin
On 08/05/2024 08:11, Bruno Cardoso wrote: The following now work as expected: - [[shortdoc:string]] - [[shortdoc:string::#try-completion]] - [[shortdoc:string::identical contents]] Thanks. Bruno, the patch should have proper commit message, see

Re: [PATCH] Fix regex for determining image width from attribute

2024-05-08 Thread Max Nikulin
On 02/05/2024 23:28, Ihor Radchenko wrote: 1. #+attr_org is prioritised I ma afraid, the code is a bit fragile. Consider #+attr_html: :alt Image width test #+attr_beamer: :width \linewidth #+attr_latex: :width +.5\textwidth #+attr_md: :width 75% [[file:babelfish.png]] - I do not mind that

Re: [DISCUSSION] Sorting strings in Org mode vs. system locale

2024-05-07 Thread Max Nikulin
On 07/05/2024 20:09, Ihor Radchenko wrote: Max Nikulin writes: I consider the following as a kind of graceful degradation (defun org-sort-function-fallback-downcase (a b LOCALE IGNORE-CASE) (if ignore-case (string-collate-lessp (downcase a) (downcase b) locale ignore-case

Re: Bug: Final zero after decimal point is stripped when inline code evaluated

2024-05-07 Thread Max Nikulin
On 07/05/2024 21:25, Charles Millar wrote: On 5/7/24 7:49 AM, Max Nikulin wrote: On 07/05/2024 03:05, Charles Millar wrote: (setq toconvert 5.000) (number-to-string toconvert) evaluates to "5". I get "5.0" (Linux), so I suspect some mistake. I am using Debian T

Re: Bug: Final zero after decimal point is stripped when inline code evaluated

2024-05-07 Thread Max Nikulin
On 07/05/2024 03:05, Charles Millar wrote: I appreciate that mathematically a trailing zero or zeros may be non-significant; however, in my use case, i.e. correct format in a text, they are necessary. Another example, in addition to my Dollars and cents scenario, may be a table that that has

Re: [DISCUSSION] Sorting strings in Org mode vs. system locale

2024-05-07 Thread Max Nikulin
On 05/05/2024 18:59, Ihor Radchenko wrote: Ihor Radchenko writes: If a user access same files from Linux and macOS then it may be really annoying to get different order of entries in agenda. For most of Linux users it is better to use more smart `string-collate-lessp'. Some care is required to

Re: Bug: Final zero after decimal point is stripped when inline code evaluated

2024-05-06 Thread Max Nikulin
On 06/05/2024 19:44, Ihor Radchenko wrote: Charles Millar writes: #+NAME: TABLE2 |22578.60| src_latex[:var printthis=TABLE2[-1,-1] :eval yes :results replace :exports results]{\num{printthis}} {{{results(@@latex:\num{22578.6}@@)}}} This is expected. When you assign :var, Org mode reads the

[PATCH] test-org-macro.el: Add test for CVE-2024-30202 (was: Re: [ANN] Emergency bugfix release: Org mode 9.6.23)

2024-05-06 Thread Max Nikulin
af8cddb44f5ee01fb1c7c9cf664ddbc83c63ac56 Mon Sep 17 00:00:00 2001 From: Max Nikulin Date: Mon, 6 May 2024 19:04:17 +0700 Subject: [PATCH] test-org-macro.el: Add test for CVE-2024-30202 * testing/lisp/test-org-macro.el (test-org-macro/initialize-templates): A new test that no code is evaluated when an Org file

Re: [PATCH] Add support for shortdoc link type

2024-05-06 Thread Max Nikulin
On 06/05/2024 04:35, Bruno Cardoso wrote: Fixed. I have tried the patch. It mostly works, so I do not insist on further polishing. However it should be resent with proper description. I had dropped the search code because I wasn't considering the search option properly. If I understand

Re: [PATCH] Add support for shortdoc link type

2024-05-05 Thread Max Nikulin
On 05/05/2024 00:33, Bruno Cardoso wrote: I updated the patch to use the optional function argument instead. Thanks +++ b/doc/org-manual.org @@ -3372,6 +3372,10 @@ Here is the full set of built-in link types: Execute a shell command upon activation. +- =shortdoc= :: + +Link to short

Re: Importing "quoted" strings in `org-babel-import-elisp-from-file'

2024-05-04 Thread Max Nikulin
Max Nikulin writes: Quotes are not stripped: On 04/05/2024 18:51, Ihor Radchenko wrote: Fixed, on main. Another case: (org-babel-read "\"Newlines\"\n" t) "\"Newlines\" "

Re: Importing "quoted" strings in `org-babel-import-elisp-from-file'

2024-05-04 Thread Max Nikulin
On 04/05/2024 18:51, Ihor Radchenko wrote: Max Nikulin writes: Quotes are not stripped: (org-babel-read "\"abc\nsdf\"" t) "\"abc sdf\"" Fixed, on main. https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=edb5eaaac Thanks (org-babel-re

Re: Importing "quoted" strings in `org-babel-import-elisp-from-file'

2024-05-04 Thread Max Nikulin
On 04/05/2024 15:03, Ihor Radchenko wrote: Max Nikulin writes: I have no idea if "other\n\"string\"\nlines" may be passed `org-babel-read', but it is not discarded by the current regexp: "^[[:space:]]*\"\\(.*\\)\"[[:space:]]*$" I do not see why we sh

Re: Importing "quoted" strings in `org-babel-import-elisp-from-file'

2024-05-04 Thread Max Nikulin
On 03/05/2024 19:06, Ihor Radchenko wrote: Max Nikulin writes: What I do not like in `org-babel-read' is false positive for escaped quote when actually backslash is escaped: (org-babel-read "\"1\" 2 \"3\"" t) "1\\" Fixed, on main. https://git.

Re: [PATCH] Add support for shortdoc link type

2024-05-04 Thread Max Nikulin
On 04/05/2024 04:41, Bruno Cardoso wrote: On 2024-05-02, 17:41 +0700, Max Nikulin wrote: [...] I implemented the search option by borrowing the regexp from `ol-info': It is necessary to maintain backward compatibility for `ol-info'. I do not know what kind of separator was added earlier

Re: [BUG] HTML export does not preserve footnote label [9.6.15 (release_9.6.15 @ /usr/local/share/emacs/30.0.50/lisp/org/)]

2024-05-03 Thread Max Nikulin
On 03/05/2024 18:14, Ihor Radchenko wrote: Max Nikulin writes: Yes, sure. It is fine to reuse an existing user option. Though reading through its docstring and the code, I cannot tell what this is doing exactly. Is it applying to all HTML elements, or just headings? On my end, I have

Re: [BUG] HTML export does not preserve footnote label [9.6.15 (release_9.6.15 @ /usr/local/share/emacs/30.0.50/lisp/org/)]

2024-05-03 Thread Max Nikulin
On 03/05/2024 13:59, Protesilaos Stavrou wrote: From: Max Nikulin Fri, 26 Apr 2024 16:53:23 +0700 Another option may be to rely on the existing one: `org-html-prefer-user-labels' Yes, sure. It is fine to reuse an existing user option. Though reading through its docstring and the code, I

Re: link can not be created in a line with another link.

2024-05-03 Thread Max Nikulin
On 02/05/2024 18:15, Ihor Radchenko wrote: May you try the attached patch (on top of the latest main)? Does it feel better? I see regressions only (Emacs 28). [[#foo]] [[#bar]] SPC causes permanent appearance of square brackets for [[#foo]]. I do not like flashes especially since they do

Re: [BUG] #+CALL - permission error -bash

2024-05-03 Thread Max Nikulin
On 02/05/2024 21:55, Ihor Radchenko wrote: vitalij writes: in org-babel-sh-evaluate file:~/.emacs.d/elpa/org-9.6.28/ob-shell.el::300 this do apply: (process-file "/tmp/babel-NfRG9P/sh-script-jmKNA4" "/tmp/babel-NfRG9P/sh-stdin-o3CEm5" # nil nil) I don't allow executables in /tmp folder!

Re: Importing "quoted" strings in `org-babel-import-elisp-from-file'

2024-05-02 Thread Max Nikulin
On 01/05/2024 19:19, Ihor Radchenko wrote: And replacing the call to org-babel-string-read with org-babel-read does not break any tests... Since 005e68294 2009-06-11 17:04:42 -0700 Eric Schulte: making progress bringing org-babel-R.el into the new evaluation schema

Re: [PATCH] Add support for shortdoc link type

2024-05-02 Thread Max Nikulin
On 02/05/2024 02:24, Bruno Cardoso wrote: +++ b/lisp/ol.el @@ -1597,6 +1597,37 @@ PATH is a symbol name, as a string." (org-link-set-parameters "help" :follow #'org-link--open-help :store #'org-link--store-help) + "shortdoc" link type

[PATCH] test-ob-shell.el: Skip based on feature detection

2024-05-02 Thread Max Nikulin
On 28/04/2024 20:11, Ihor Radchenko wrote: https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=e4ab416fc Max Nikulin writes: Feature detection should be more reliable. [...] Feel free to submit a patch. See the attachment. From 46db53cebef5644be4abd8dcb18ca777ec0c3be3 Mon

Re: [BUG] ob-shell: internal representation of cmdline arguments the same

2024-05-01 Thread Max Nikulin
On 29/04/2024 19:22, Ihor Radchenko wrote: Matt writes: #+begin_src bash :cmdline "1 2 3" [...] To force quotes in the :cmdline one can do #+begin_src bash :cmdline "\"1 2 3\"" echo "$1" #+end_src I consider it as a kind of pitfall inconsistent with DWIM concept. An idea of a kludge is

Re: [PATCH] org.el: Call EXT-enable for `org-modules' (was Re: [PATCH] org-ctags.el: Do not activate on load)

2024-05-01 Thread Max Nikulin
On 01/05/2024 17:21, Ihor Radchenko wrote: Max Nikulin writes: However now I am in doubts why org-ctags is not a minor mode. What would be the benefit? Documented conventions how to enable or disable minor mode.

Re: [PATCH] ob-lua: Support all types and multiple values in results

2024-05-01 Thread Max Nikulin
On 30/04/2024 03:26, Rudolf Adamkovič wrote: +local value = result[1] +if string.find(value, '[%%(%%[{]') == 1 then + return quotes .. value .. quotes Am I wrong that quotes in value may cause issues? I expect some way of escaping " characters.

Re: link can not be created in a line with another link.

2024-05-01 Thread Max Nikulin
On 29/04/2024 19:45, Alexandros Prekates wrote: The same behavior happens with emacs -Q. bla [[foo]] If i add : [[boo]] bla [[foo]] org will create the two links. But if i add: [[boo][ bla [[foo]] with the intention to type: [[boo][description]] bla [[foo]] then what i will get is: a link

Re: [BUG] ob-shell: results missing leading quotes

2024-05-01 Thread Max Nikulin
On 29/04/2024 18:58, Ihor Radchenko wrote: The nested "..." are stripped on purpose via `org-babel-string-read'. Although this function dates back to R output processing and I do not fully understand why stripping nested quotes is useful for all possible babel backends. But that's a completely

Re: [PATCH] org-ctags.el: Do not activate on load

2024-04-30 Thread Max Nikulin
On 30/04/2024 19:59, Ihor Radchenko wrote: /bin/sh: 1: Syntax error: Bad function name (ert-test-failed ((should (test-org-ctags/list-elements-equal-p (list ...) (test-org-ctags/with-fake-ctags temp-dir "regexp" ...) '(2) "Regexp should be

[PATCH] org.el: Call EXT-enable for `org-modules' (was Re: [PATCH] org-ctags.el: Do not activate on load)

2024-04-30 Thread Max Nikulin
On 30/04/2024 17:02, Ihor Radchenko wrote: Max Nikulin writes: Isn't it better to modify buggy org-ctags than to add various kludges to tests? Applied, onto main. I was expecting that you would be against it since it is a breaking change. See a follow-up to Ihor Radchenko. Re: Autoloading

[PATCH] org-ctags.el: Do not activate on load

2024-04-29 Thread Max Nikulin
On 29/04/2024 20:12, Ihor Radchenko wrote: Max Nikulin writes: Notice that new tests for org-ctags do not require user interactions. [...] Of course, the cause is the known side effect of loading org-ctags. Maybe we can disable the tests until that bug is fixed. Or, ideally, load org-ctags

Re: [PATCH] org-ctags.el: Protect shell specials in directory name

2024-04-29 Thread Max Nikulin
On 29/04/2024 00:02, Ihor Radchenko wrote: Max Nikulin writes: Tests must be fully automated. We use make test in CI and things like project-compile are non-interactive. I do not mind. Requiring unexpected user interactions is a feature of org-ctags. So, may you update the patch to make

Re: [PATCH] org-ctags.el: Protect shell specials in directory name

2024-04-28 Thread Max Nikulin
On 28/04/2024 23:55, Ihor Radchenko wrote: Max Nikulin writes: I tried to run make test with your patch applied, but I am getting interactive prompt there: Visit tags table (default TAGS): You may press RET... It is due to invasive org-ctags behavior. Tests must be fully automated

Re: [PATCH] org-ctags.el: Protect shell specials in directory name

2024-04-28 Thread Max Nikulin
On 28/04/2024 19:53, Ihor Radchenko wrote: May you submit a patch? Max Nikulin writes: See the attachments. I tried to run make test with your patch applied, but I am getting interactive prompt there: Visit tags table (default TAGS): You may press RET... It is due to invasive org

[PATCH] org-ctags.el: Protect shell specials in directory name

2024-04-28 Thread Max Nikulin
On 20/03/2024 19:08, Ihor Radchenko wrote: Max Nikulin writes: The committed change is anyway incomplete. May you submit a patch? See the attachments.From 067dc590bb1c26c881f14d218da2cd502413ec5d Mon Sep 17 00:00:00 2001 From: Max Nikulin Date: Wed, 27 Mar 2024 23:04:07 +0700 Subject

Re: [PATCH] Re: [BUG] ob-shell: :shebang changes interpretation of :cmdline

2024-04-27 Thread Max Nikulin
On 27/04/2024 17:31, Max Nikulin wrote: On 26/04/2024 18:49, Ihor Radchenko wrote: +    shell-file-name ... +    (list shell-command-switch +  (concat (file-local-name script-file)  " " cmdline)))) Max Niku

Re: [PATCH] ob-lua: Support all types and multiple values in results

2024-04-27 Thread Max Nikulin
On 26/04/2024 20:40, Ihor Radchenko wrote: +++ b/lisp/ob-lua.el @@ -282,6 +282,8 @@ (defvar org-babel-lua-wrapper-method end end return result + elseif type(it) == 'string' then + return '\"' .. it .. '\"' If you are adding quotes around then quote characters

Re: [DISCUSSION] The meaning of :cmdline header argument across babel backends

2024-04-27 Thread Max Nikulin
On 26/04/2024 20:09, Ihor Radchenko wrote: Max Nikulin writes: However looking wider, I do not like that :cmdline for ob-shell has different meaning than for other languages, see e.g. ob-sql. Only for shell this parameter is treated as arguments of a *script*. In other cases :cmdline is used

Re: [PATCH] Re: [BUG] ob-shell: :shebang changes interpretation of :cmdline

2024-04-27 Thread Max Nikulin
On 26/04/2024 18:49, Ihor Radchenko wrote: +shell-file-name ... +(list shell-command-switch + (concat (file-local-name script-file) " " cmdline)))) Max Nikulin writes: Using `shell-comm

Re: FAILED test-ob-shell/bash-uses-assoc-arrays

2024-04-26 Thread Max Nikulin
On 26/04/2024 18:08, Ihor Radchenko wrote: Max Nikulin writes: My guess is that GPLv2 BASH on macOS does not support associative arrays. Perhaps these tests should be skipped if BASH_VERSION is not fresh enough (not supplied by Apple). https://git.savannah.gnu.org/cgit/emacs/org-mode.git

Re: [BUG] HTML export does not preserve footnote label [9.6.15 (release_9.6.15 @ /usr/local/share/emacs/30.0.50/lisp/org/)]

2024-04-26 Thread Max Nikulin
On 26/04/2024 15:17, Protesilaos Stavrou wrote: Since we are now using labels for the HTML export, I think it makes sense to optionally use those for the anchor tags as well. [...] +(defcustom org-html-footnote-use-label-for-anchor-text nil Another option may be to rely on the existing one:

Re: Trailing whitespace after export snippets without a transcoder

2024-04-25 Thread Max Nikulin
On 23/04/2024 02:01, Ihor Radchenko wrote: For example, consider an HTML exporter that aligns tags nicely and keeps blank lines between markup blocks for readability. If we remove such blank lines unconditionally, it will be problematic. I consider that just newlines are enough to make HTML

Re: [PATCH] Re: [BUG] ob-shell: :shebang changes interpretation of :cmdline

2024-04-25 Thread Max Nikulin
On 24/04/2024 19:52, Ihor Radchenko wrote: Max Nikulin writes: I believe, multiple arguments should be specified as '(1 a "b c"). Yes, but we do not, in general, know how to split them. Something should be changed anyway since current behavior is inconsistent and so is buggy.

Re: [BUG] No space after footnote with org-export-with-footnotes set to nil [9.6.1 ( @ /Users/test/.emacs.d/elpa/28.0/develop/org-9.6.1/)]

2024-04-24 Thread Max Nikulin
On 27/03/2023 21:16, Ihor Radchenko wrote: +++ b/etc/ORG-NEWS @@ -145,6 +145,27 @@ execution completes. The new ~:async~ header allows users to continue editing with Emacs while a ~:session~ block executes. ** Miscellaneous +*** Blank lines after removed objects are not retained during

Re: FAILED test-ob-shell/bash-uses-assoc-arrays

2024-04-24 Thread Max Nikulin
On 24/04/2024 19:54, Ihor Radchenko wrote: Max Nikulin writes: On 15/04/2024 23:46, Alexander Adolf wrote: FAILED test-ob-shell/bash-uses-assoc-arrays ((should (equal "two" (org-trim (org-babel-execute-src-block :form (equal "two" "three") :

FAILED test-ob-shell/bash-uses-assoc-arrays

2024-04-24 Thread Max Nikulin
On 15/04/2024 23:46, Alexander Adolf wrote: FAILED test-ob-shell/bash-uses-assoc-arrays ((should (equal "two" (org-trim (org-babel-execute-src-block :form (equal "two" "three") :value nil :explanation (arrays-of-different-length 3 5 "two" "three" first-mismatch-at 1)) FAILED

Re: [PATCH] Re: [BUG] ob-shell: :shebang changes interpretation of :cmdline

2024-04-24 Thread Max Nikulin
On 23/04/2024 17:28, Ihor Radchenko wrote: I propose the attached patch. +++ b/lisp/ob-shell.el @@ -322,14 +322,12 @@ (defun org-babel-sh-evaluate (session body params stdin cmdline) (with-temp-buffer (with-connection-local-variables (apply

Re: [PATCH] Re: [BUG] ob-shell: :shebang changes interpretation of :cmdline

2024-04-23 Thread Max Nikulin
On 23/04/2024 17:51, Max Nikulin wrote: I am in favor of dropping `shell-command-switch' in the latter case to pass arguments literally in both cases. Dropping "-c" may have side effects. Instead of :shebang, a source block may have shebang in the body #+begin_src bash #!/bin/ba

Re: [POLL] Should we enable or disable automatic tag alignment by default everywhere

2024-04-23 Thread Max Nikulin
On 23/04/2024 18:47, Ihor Radchenko wrote: Max Nikulin writes: There should be a way to align tags for a specific heading even when `org-auto-align-tags' is nil. I can convert org-align-tags into a command. I would prefer to have C-u C-c C-q (`org-set-tags-command') applied just

Re: [PATCH] Re: [BUG] ob-shell: :shebang changes interpretation of :cmdline

2024-04-23 Thread Max Nikulin
On 21/04/2024 22:09, Matt wrote: The proposed solution assumes we intend to parse the characters following :cmdline as space delimited and grouped by quotes. However, AFAICT, the parsing issue makes this solution ambiguous. Matt, I am sorry, but I do not agree with your proposal. I do not

Re: MathML and ODT export: inline possible?

2024-04-22 Thread Max Nikulin
On 22/04/2024 16:05, Fraga, Eric wrote: On Friday, 19 Apr 2024 at 23:19, Max Nikulin wrote: MathJax may be your friend. LaTeXML and katex do not add as well. MathJax works well but for websites; my context is that I need to prepare a Word document to share with others. I have not tried

Re: Trailing whitespace after export snippets without a transcoder

2024-04-22 Thread Max Nikulin
On 21/04/2024 20:00, Ihor Radchenko wrote: Max Nikulin writes: A space@@ascii:*@@ character. Hmm. We actually have a similar scenario in `org-export--prune-tree' with a slightly different logic - only keep spaces when previous object does not have any. I like this idea. At first I

Re: Trailing whitespace after export snippets without a transcoder

2024-04-20 Thread Max Nikulin
On 20/04/2024 18:14, Ihor Radchenko wrote: https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=a6d9fd82e Back-end developers should pay attention to the fact that white spaces before and after an ignored export snippet now are accumulated in the output. I have no

Re: [BUG] LaTeX preview should use a subdirectory in /tmp

2024-04-20 Thread Max Nikulin
On 19/04/2024 22:00, emm.charpent...@free.fr wrote: Embedding /home/charpent/WinFiles/Temporaire/Org/file:ltximg/EssaiSnippetsLaTeX_2923a1941c0e63eab69544afa1be2ec0d95a01c4.png as Images/0001.png... See Ihor Radchenko. Re: strange export problem with a file: link. Sat, 20 Apr 2024 12:25:56

Re: MathML and ODT export: inline possible?

2024-04-19 Thread Max Nikulin
On 18/04/2024 22:51, Fraga, Eric wrote: In LaTeX, something like $a_{b_c}$. Pandoc generates a b c (where the a, b, and c are ...) whereas, by hand, I use a b c MathJax may be your friend. LaTeXML and katex do not add as well. Actually I asked to confirm that your troubles are not

Re: [Pre-PATCH] Overhaul of the LaTeX preview system

2024-04-18 Thread Max Nikulin
On 19/04/2024 00:58, Корякин Артём wrote: shell-file-name ; "pwsh.exe" system-type ; windows-nt (w32-shell-dos-semantics) ; nil I have no idea what style of escaping is expected by pwsh.exe. If it is the same as for cmd.exe then I would try to add it to

Re: [Pre-PATCH] Overhaul of the LaTeX preview system

2024-04-18 Thread Max Nikulin
On 18/04/2024 03:11, Корякин Артём wrote: Maybe I could somehow rewrite shell-quote-argument using advices ? Maybe some more global changes is needed for emacs on windows ? Please, evaluate the following expressions e.g. in the scratch buffer: shell-file-name system-type

  1   2   3   4   5   6   7   8   9   10   >