[PATCH] ob-shell-test, test-ob-shell and introduction

2021-11-22 Thread Matt
make sure I'm using them correctly before making a patch for the manual, here are some tests. Please let me know if things look okay. It wasn't clear to me how to send along a message with git send-email, so I formatted these patches and included them as an attachment. Is that fine? T

[PATCH] ob-doc-shell.org (was [PATCH] ob-shell-test, test-ob-shell and introduction)

2021-11-22 Thread Matt
> Unfortunately, there is no ob-doc-shell.org at > worg/org-contrib/babel/languages/. > > There is an ob-doc-template.org in case you'd like to contribute > ob-doc-shell.org :) I created one, along with a sourcehut account. However, it looks like I need to be granted some permissions to w

Re: [PATCH] ob-shell-test, test-ob-shell and introduction

2021-11-24 Thread Matt
> [FSF copyright assignment]. Have you done that yet? I just verified with my employer that my contract grants an exception for this project. Just emailed the request to ass...@gnu.org. Also, got access from Bastien for worg. I figure it's probably best to reserve any more changes 'til th

Re: [PATCH] ob-shell-test, test-ob-shell and introduction

2021-12-05 Thread Matt
> > I just verified with my employer that my contract grants an exception for > > this > > project. Just emailed the request to ass...@gnu.org. Not surprisingly the FSF hasn't resources to verify my contract's exception and needs a written disclaimer from my employer. I'm waiting on this now

Re: [PATCH] ob-shell-test, test-ob-shell and introduction

2021-12-17 Thread Matt
> Contributions to Worg aren't similarly restricted. Feel free to > push material there in the meantime. Looks like the email finally got sent to the right person at my company. Who knows how long it will take for them to get the FSF disclaimer back to me... Now that I'm on holiday, I've got

Re: [PATCH] ob-shell-test, test-ob-shell and introduction

2021-12-31 Thread Matt
> Wow. Nice work! Thanks. I pushed things to Worg, if you haven't seen already (https://orgmode.org/worg/org-contrib/babel/languages/ob-doc-shell.html). If you read it and find anything missing or unclear, please let me know. I'm still waiting on work to sign the FSF disclaimer in order to

Re: [PATCH] ob-shell-test, test-ob-shell and introduction

2022-01-01 Thread Matt
Apologies for the book. I've been sitting on this stuff for two months and am wondering how to proceed. IANAL but AFAIK/CT, my contract contains an exception for making contributions to projects like Org. I've gotten confirmation from my manager and by HR. However, until the CEO signs the FSF

Re: [PATCH] ob-shell-test, test-ob-shell and introduction

2022-01-05 Thread Matt
> Thank you, I was not aware of ":cmdline" argument and of ":shebang" as a > means to avoid stray prompts (I have seen mentions of similar problem > for other languages in this list). You're welcome! I was surprised to find those in the source. Glad to have documented them and even happier

Re: Shell SRC blocks under Windows

2022-02-05 Thread Matt
On Sat, 05 Feb 2022 10:48:02 -0500 H. Dieter Wilhelm wrote > >> Is is it possible to extend org-mode's src blocks with > >> org-babel-shell-names to use either MSYS2 or MinGW shells (instead of > >> cmd.exe)? Unfortunately ob-shell.el doesn't guide me further and I > >> can't f

Re: Shell SRC blocks under Windows

2022-02-06 Thread Matt
On Sat, 05 Feb 2022 17:22:29 -0500 Matt wrote > > But I'm not sure if I'm halfway there with "sh"? I need to run the > > following MSYS2 command AND switch between two arguments (for building > > Emacs). > > > >

Re: Shell SRC blocks under Windows

2022-02-07 Thread Matt
On Sun, 06 Feb 2022 12:51:49 -0500 H. Dieter Wilhelm wrote > Matt writes: > > > On Sat, 05 Feb 2022 17:22:29 -0500 Matt wrote > > > > > > > > But I'm not sure if I'm halfway there with "sh"? I need

Re: Shell SRC blocks under Windows

2022-02-08 Thread Matt
On Tue, 08 Feb 2022 04:47:04 -0500 H. Dieter Wilhelm wrote > Not yet, I'm still grappling with your message > <17ecbfb46e9.e16df906236239.6523271905911672...@excalamus.com> and > ob-shell.el. I'll come back to you when I'm through. Okay, feel free to let me know if something I

Re: How do you manage complex project with Org-mode

2022-02-28 Thread Matt
On Mon, 28 Feb 2022 20:43:47 -0500 Sébastien Gendre wrote > And I don't know how to manage this kind of projects with Org-mode. How > to do it, without failing a 6 days project because I spent to much time > on something else and I have only 3 days left with 3 half-day important

Thanks for good docs

2022-04-06 Thread Matt
the index and there's something promising...takes me right to what I was looking for. Thanks for indexing. Thanks for including examples. So much better than internet search engines. Y'all are doing good things. :) Thanks, Matt

Re: Org as a workspace (an impromptu reflection)

2022-04-29 Thread Matt
On Fri, 29 Apr 2022 11:03:55 -0400 Juan Manuel Macías wrote > I don't know if anyone has had a similar experience... I tell people that Emacs changed my life. I feel it's that profound. My story is different from yours, yet similar in that it started with Org. I love that it h

Re: C-c $ missing?

2022-08-18 Thread Matt
On Thu, 18 Aug 2022 12:46:23 -0400 Summer Emacs wrote --- > > Hi everyone, first time posting. I hope it's okay to ask this here (I'm > totally new): Welcome! > Since this morning (I updated a few packages but not sure which), C-c $ > is missing in org mode? It's how I used to a

Re: Bash results broken?

2022-12-19 Thread Matt
On Mon, 19 Dec 2022 19:44:12 -0500 Rudolf Adamkovič wrote --- > Ihor Radchenko yanta...@posteo.net> writes: > > > Fixed on bugfix. > > I can confirm that the fix works. Thank you! I can confirm it works, too, for the 1 2 3 example. However, it puts double quotes around text:

ob-shell intentions and paperwork (was Bash results broken?)

2022-12-20 Thread Matt
On Fri, 16 Dec 2022 12:41:45 -0500 Ihor Radchenko wrote --- > We really need more tests. I'm working on giving ob-shell a little bit of love. I wrote the worg documentation for it earlier this year. I tried to include examples of all coded functionality, including previously undocum

Re: Bash results broken?

2022-12-25 Thread Matt
On Sun, 25 Dec 2022 06:23:53 -0500 Ihor Radchenko wrote --- > As you see, "%S" have been used previously for non-string results. > I cannot find explanation in git log. > > That said, I think that it will be more consistent to leave strings > specifically as is. See the attached pa

Re: ob-shell intentions and paperwork (was Bash results broken?)

2022-12-27 Thread Matt
On Wed, 21 Dec 2022 01:17:50 -0500 Matt wrote --- > Currently, though, I'm refactoring the ob-shell tests to remove dependency > on ob-shell-test.org and to stop the suite from littering. Done. Branched off bugfix, 12e10eb0d, and refactored test-ob-shell.el. See attac

Re: ob-shell intentions and paperwork (was Bash results broken?)

2022-12-29 Thread Matt
re. You're correct, I've not contributed to core. I would love to maintain lisp/ob-shell.el. I'm expecting life changes in the coming months and can't anticipate how that will affect my time. Would it be a problem if I need to step down as maintainer for a peri

Re: ob-shell intentions and paperwork (was Bash results broken?)

2022-12-30 Thread Matt
On Fri, 30 Dec 2022 00:34:38 -0500 Matt wrote --- > > On Thu, 29 Dec 2022 06:08:59 -0500 Ihor Radchenko wrote --- > > > From: Matt Trzcinski m...@excalamus.com> > > > +(require 'org-test (expand-file-name "../org-test.el")) >

Re: ob-shell intentions and paperwork (was Bash results broken?)

2023-01-01 Thread Matt
On Sat, 31 Dec 2022 09:31:16 -0500 Ihor Radchenko wrote --- > Matt m...@excalamus.com> writes: > > > I've backed out the `require' change and adjusted everything else based on > > your feedback. There is a separate patch for each refactor that

Refactor org-babel-shell-initialize? (was Re: ob-shell intentions and paperwork (was Bash results broken?))

2023-01-01 Thread Matt
On Sat, 31 Dec 2022 07:56:10 -0500 Ihor Radchenko wrote --- > As for being a macro, there will be not much gain - the convention is > mostly designed for things like `cl-defun' aimed to be used in the code. > `org-babel-shell-initialize' is only used by `org-babel-shell-names'. I'm n

Re: ob-shell intentions and paperwork (was Bash results broken?)

2023-01-02 Thread Matt
On Mon, 02 Jan 2023 04:47:10 -0500 Ihor Radchenko wrote --- > They will not be reliable when tests are executed interactively. > If the `should' condition fails, `kill-buffer' will never be executed > leaving dirty state, especially for sessions. >From my perspective, that's the poin

Re: ob-shell intentions and paperwork (was Bash results broken?)

2023-01-03 Thread Matt
On Tue, 03 Jan 2023 05:50:17 -0500 Ihor Radchenko wrote --- > I was mostly worried about session states affecting subsequent test > invocations. But I do agree that it may be better to keep them. That makes sense. I tend to run tests one at a time unless I'm about to submit patches

Re: ob-shell intentions and paperwork (was Bash results broken?)

2023-01-09 Thread Matt
On Thu, 05 Jan 2023 06:21:16 -0500 Bastien Guerry wrote --- > My bad: I did not warn Emacs maintainers in time. Now it is done, > I will let you know when they grand you access to the Emacs project. I got an email from Eli on Thursday saying I was added. I've still been getting an

Re: ob-shell intentions and paperwork (was Bash results broken?)

2023-01-11 Thread Matt
On Wed, 11 Jan 2023 06:53:41 -0500 Ihor Radchenko wrote --- > I have the following Git configuration: > > u remote.origin.url > yanta...@git.savannah.gnu.org:/srv/git/emacs/org-mode.git > > Are you using the same? I was not, thank you. I've since pushed.

Re: ob-shell intentions and paperwork (was Bash results broken?)

2023-01-11 Thread Matt
On Wed, 11 Jan 2023 12:02:42 -0500 Ihor Radchenko wrote --- > It looks like you lost all the individual commits and commit messages in > the process. > > Could you please revert 4f319088ba5 and re-push in such a way that > individual commits do appear on main? Goodness! Sorry! T

Re: ob-shell intentions and paperwork (was Bash results broken?)

2023-01-13 Thread Matt
On Fri, 13 Jan 2023 04:36:40 -0500 Ihor Radchenko wrote --- > Cgit displays our bugfix merges with all the required commits. > So, what happened what not ideal either way. Would you like me to correct how I've incorporated my changes?

Re: [BUG] ob-shell doesn't evaluate last line on Windows (cmd/cmdproxy) [9.6.1 ( @ c:/Users/Osher/AppData/Roaming/.emacs.d/elpa/org-9.6.1/)]

2023-01-16 Thread Matt
Thank you for your report, Osher! Windows shells aren't currently supported by ob-shell, AFAIK. I'm open to including them. Unfortunately, I don't have a Windows machine to test against. On Mon, 16 Jan 2023 11:27:52 -0500 Osher Jacob wrote --- > Expected behaviour: > On Windows,

Re: [BUG] ob-shell doesn't evaluate last line on Windows (cmd/cmdproxy) [9.6.1 ( @ c:/Users/Osher/AppData/Roaming/.emacs.d/elpa/org-9.6.1/)]

2023-01-16 Thread Matt
On Mon, 16 Jan 2023 16:40:27 -0500 Matt wrote --- > That is, go through the steps to reproduce and before executing the block, > run `M-: (setq shell-command-switch "/k")'. Whoa, just re-read this after stepping away and it sounds super demanding! Please

Re: [BUG] ob-shell doesn't evaluate last line on Windows (cmd/cmdproxy) [9.6.1 ( @ c:/Users/Osher/AppData/Roaming/.emacs.d/elpa/org-9.6.1/)]

2023-01-17 Thread Matt
On Tue, 17 Jan 2023 14:53:39 -0500 Osher Jacob wrote --- > changing shell-command-switch to "/k" or "-k", I get a similar output: Thanks for checking that. > You also mentioned the source code block is being passed through the "-c" > flag as a command-line argument.I might be misun

Re: [BUG] ob-shell doesn't evaluate last line on Windows (cmd/cmdproxy) [9.6.1 ( @ c:/Users/Osher/AppData/Roaming/.emacs.d/elpa/org-9.6.1/)]

2023-01-19 Thread Matt
On Thu, 19 Jan 2023 11:28:09 -0500 Osher Jacob wrote --- > If we're insistent on passing the input through the command line arguments, > I can think of two ways to go about this, but both seem undesirable They're good ideas and, I agree, aren't ideal. >  I think it could be eno

Re: [BUG] ob-shell doesn't evaluate last line on Windows (cmd/cmdproxy) [9.6.1 ( @ c:/Users/Osher/AppData/Roaming/.emacs.d/elpa/org-9.6.1/)]

2023-01-22 Thread Matt
On Fri, 20 Jan 2023 04:27:18 -0500 Ihor Radchenko wrote --- > I think `org-babel--shell-command-on-region' will be more appropriate. > Because similar issues might appear when attempting to evaluate other > code blocks on Windows, where `shell-file-name' is set to cmdproxy.exe. > >

Re: [BUG] ob-shell doesn't evaluate last line on Windows (cmd/cmdproxy) [9.6.1 ( @ c:/Users/Osher/AppData/Roaming/.emacs.d/elpa/org-9.6.1/)]

2023-01-25 Thread Matt
> On Fri, 20 Jan 2023 04:27:18 -0500 Ihor Radchenko wrote --- > I think `org-babel--shell-command-on-region' will be more appropriate. > Because similar issues might appear when attempting to evaluate other > code blocks on Windows, where `shell-file-name' is set to cmdproxy.exe. Is

Re: [BUG] Org-Babel shell problems and crashes with images [9.6.1 (9.6.1-ga6c882 @ /home/joe/.emacs.d/straight/build/org/)]

2023-01-27 Thread Matt
On Wed, 25 Jan 2023 14:34:19 -0500 Josep Jesus Bigorra Algaba wrote --- > This is my first time posting to the mailing list Welcome and thanks for taking the time to send us a message! I love hearing how much you've enjoyed your experience with Org. We love it, too! > 2- Org babel

Re: [BUG] ob-shell doesn't evaluate last line on Windows (cmd/cmdproxy) [9.6.1 ( @ c:/Users/Osher/AppData/Roaming/.emacs.d/elpa/org-9.6.1/)]

2023-01-29 Thread Matt
On Thu, 26 Jan 2023 04:51:19 -0500 Ihor Radchenko wrote --- > This will add a newline to "cmdproxy.exe" command -> "cmdproxy.exe\n". > You should instead look into `org-babel--write-temp-buffer-input-file'. I made the change in `org-babel--shell-command-on-region' based on your reco

Re: [BUG] ob-shell doesn't evaluate last line on Windows (cmd/cmdproxy) [9.6.1 ( @ c:/Users/Osher/AppData/Roaming/.emacs.d/elpa/org-9.6.1/)]

2023-01-30 Thread Matt
Pushed the change to `org-babel-eval'.

Re: [BUG] ob-shell doesn't evaluate last line on Windows (cmd/cmdproxy) [9.6.1 ( @ c:/Users/Osher/AppData/Roaming/.emacs.d/elpa/org-9.6.1/)]

2023-02-01 Thread Matt
On Wed, 01 Feb 2023 07:05:45 -0500 Ihor Radchenko wrote --- > This and another commit are rather trivial - they are eligible for > bugfix. See https://orgmode.org/worg/org-maintenance.html#branches > I cherry-picked the commits for bugfix. Noted for the future. > I also added a co

[PATCH] Async evaluation in ob-shell

2023-02-06 Thread Matt
I'm excited to share that I've got async evaluation working (crudely) with ob-shell. A rough implementation is attached. It has clear issues, such as the prompt being present in the output: #+begin_src sh :session tester :async t echo "By sending delimiters separately..." sleep 3 slep 1 echo

Re: [PATCH] Async evaluation in ob-shell

2023-02-08 Thread Matt
I've attached two patches which replace the previous. I found cleaning the output was dramatically helped by calling `buffer-substring-no-properties' instead of `buffer-substring' in `org-babel-comint-async-filter'. I'm not sure why `buffer-substring' was originally used. `make test' shows no

Re: [PATCH] Async evaluation in ob-shell

2023-02-10 Thread Matt
On Thu, 09 Feb 2023 06:23:42 -0500 Ihor Radchenko wrote --- > Could you please elaborate? What was the problem with > `buffer-substring'? I am asking because one of the previous versions of > `org-babel-comint-wait-for-output' relied upon 'face text property. See > a35d16368. The prob

Re: [PATCH] Async evaluation in ob-shell

2023-02-12 Thread Matt
On Sat, 11 Feb 2023 15:56:00 -0500wrote --- > org-babel-comint-async-filter is capable of taking a similar approach, > and reading/writing to tempfile. There is some precedence in ob-shell for this. Currently, the cmdline, stdin, and shebang headers use temp files. It may be that

Re: [PATCH] Async evaluation in ob-shell

2023-02-12 Thread Matt
On Sat, 11 Feb 2023 06:44:56 -0500 Ihor Radchenko wrote --- > 1. You should provide all the docstrings. > 2. I generally feel that separate async and separate session code are >either duplicating the same code or edge cases considered by session >code may popup in async code

[BUG] shell sessions started outside of Babel broken

2023-02-13 Thread Matt
On Sat, 11 Feb 2023 15:56:00 -0500 Jack Kamm wrote --- > By the way, I took a look at ob-shell for the first time in awhile, and > noticed that ob-shell now forces the prompt to be like: > > org_babel_sh_prompt> > > Which I think makes cleaning up the prompt markers a lot more > r

[BUG] conda doesn't work in ob-shell sessions

2023-02-13 Thread Matt
On Sun, 12 Feb 2023 22:16:16 -0500 Jack Kamm wrote --- > But I also noticed another prompt-related issue: conda doesn't seem to > work in ob-shell sessions anymore. That is a bigger problem for my use > case. Could you elaborate? It looks like conda has a new init (from what I rem

Re: [PATCH] Async evaluation in ob-shell

2023-02-15 Thread Matt
On Wed, 15 Feb 2023 10:08:47 -0500 Ihor Radchenko wrote --- > Matt m...@excalamus.com> writes: > > > Checking the final result from the callback is trickier. The following > > works, but requires advice (which could potentially persist beyond the > &g

Re: Template for ob- packages?

2023-02-16 Thread Matt
On Thu, 16 Feb 2023 16:10:51 -0500 Galaxy Being wrote --- > Is there a generic starter template for writing an ob- package, some sort of > example code? Yes: https://git.sr.ht/~bzg/worg/tree/master/item/org-contrib/babel/ob-template.el When I started learned Babel, I took notes wit

Re: Template for ob- packages?

2023-02-18 Thread Matt
On Fri, 17 Feb 2023 17:32:18 -0500 Leo Butler wrote --- > Matt, thanks for sharing those notes. I would suggest that they be added > to worg in their current state. Thanks for your vote of confidence. I've attached the source, in case someone wants to do that. Otherwise

Re: [PATCH] Async evaluation in ob-shell

2023-02-19 Thread Matt
On Fri, 17 Feb 2023 05:44:20 -0500 Ihor Radchenko wrote --- > What I mean is... I follow you now. Thank you. I've attached a patch (with commit message) for adding async to ob-shell. If it looks good, I can apply it to main. 0001-ob-shell-Add-async-evaluation.patch Description: Bin

Re: [PATCH] Async evaluation in ob-shell

2023-02-20 Thread Matt
On Mon, 20 Feb 2023 06:24:52 -0500 Ihor Radchenko wrote --- > Why not simply doing the `should' test when the > `test-ob-shell/uuid-regex' match fails? Instead of returning `t'. Then, > we will not need to use advise. Great point. I had originally used advice to avoid a loop. Howeve

Re: [PATCH] Async evaluation in ob-shell

2023-03-01 Thread Matt
On Wed, 22 Feb 2023 05:29:59 -0500 Ihor Radchenko wrote --- > > +(defun ob-shell-async-chunk-callback (string) > > + "Filter applied to results before insertion. > > +See `org-babel-comint-async-chunk-callback'." > > + (replace-regexp-in-string (concat org-babel-sh-prompt "*") "" st

Re: [PATCH] Async evaluation in ob-shell

2023-03-03 Thread Matt
On Fri, 03 Mar 2023 09:52:09 -0500 Ihor Radchenko wrote --- > I tried the patch, and I am getting failed tests: > > 1 unexpected results: >FAILED test-ob-shell/session-async-evaluation ((should (string= ": 1\n: > 2\n" (buffer-substring-no-properties (point) (point-max :fo

Re: [PATCH] Async evaluation in ob-shell

2023-03-05 Thread Matt
On Sun, 05 Mar 2023 07:14:21 -0500 Ihor Radchenko wrote --- > > Matt m...@excalamus.com> writes: > > > > Sorry for missing that. The issue is that when I replaced > > `org-babel-sh-prompt' with `comint-prompt-regexp', the regexp no > > l

Re: [PATCH] Async evaluation in ob-shell

2023-03-09 Thread Matt
Hi Jack and Jeremie! I'm curious your thoughts about what Ihor and I are discussing at the end of this message about `md5'. On Tue, 07 Mar 2023 07:45:02 -0500 Ihor Radchenko wrote --- > Matt m...@excalamus.com> writes: > > > > The actual pr

Re: [PATCH] Async evaluation in ob-shell

2023-03-21 Thread Matt
> Matt m...@excalamus.com> writes: > > I see only two options to fix it: remove a space from the concat expression > (which I did in my latest patch) or remove a space from > `org-babel-sh-prompt'. Unfortunately, I was mistaken and the second option (removing the sp

Re: [SUGGESTION] ob-shell async result output should not contains shell prompt

2023-03-22 Thread Matt
On Wed, 22 Mar 2023 23:25:50 -0400 Christopher M. Miles wrote --- > > The ob-shell async result output contains the shell prompt. I think it > should not be captured. > > #+begin_src shell :session "test2" :async t > sleep 30 > echo "hello, world" > #+end_src > > #+RESULTS[(

Re: [SUGGESTION] ob-shell async result output should not contains shell prompt

2023-03-23 Thread Matt
On Thu, 23 Mar 2023 07:12:29 -0400 Christopher M. Miles wrote --- > #+begin_src bash :session "*ob-shell-bash*" :async t > sleep 30 > echo "hello, world" > #+end_src > > #+RESULTS[(2023-03-23 19:14:15) 23f9ad130f7a1268e21821c6baaea2b057c70d3e]: > : org_babel_sh_prompt> hello, w

Remove "shell" as a supported Babel language within ob-shell.el (was Re: [SUGGESTION] ob-shell async result output should not contains shell prompt)

2023-03-23 Thread Matt
> Matt m...@excalamus.com> writes: > > > Is there a reason you're using "shell" instead of one of the shells listed > > in `org-babel-shell-names'? I'm still curious why you're using "shell". I want to know if it's something

Re: [PATCH] Async evaluation in ob-shell

2023-03-23 Thread Matt
On Thu, 23 Mar 2023 07:48:44 -0400 Ihor Radchenko wrote --- > May you also document this new feature in ORG-NEWS and in > https://orgmode.org/worg/org-contrib/babel/languages/ob-doc-shell.html ? Done.

Re: Remove "shell" as a supported Babel language within ob-shell.el (was Re: [SUGGESTION] ob-shell async result output should not contains shell prompt)

2023-03-27 Thread Matt
On Fri, 24 Mar 2023 07:38:58 -0400 Ihor Radchenko wrote --- > I suggest the following: > 1. Introduce a new customization `org-babel-default-shell', defaulting >to (or (executable-find "sh") (executable-find "cmd.exe")). > 2. Use the value as default shell in "shell" code block

Re: [PATCH] Async evaluation in ob-shell

2023-03-27 Thread Matt
On Fri, 24 Mar 2023 05:13:34 -0400 Ihor Radchenko wrote --- > A small note on the WORG page: it may be more natural to use :async yes > rather than :async t. Both are viable - in fact, anything other than > :async no and :async none will be treated as "t". Ah, okay. I'll make that

Re: Font lock for org-babel shell scripts?

2023-03-28 Thread Matt
On Tue, 28 Mar 2023 13:24:39 -0400 Derek Chen-Becker wrote --- > I'm trying to figure out whether there's a bug or just a misconfiguration on > my end with font lock for org-babel shell source blocks. If I run emacs 28.2 > (with -q) and open the following org file, I can evaluate b

[BUG] No font lock in src blocks for shells in org-babel-shell-names (was Re: Font lock for org-babel shell scripts?)

2023-03-28 Thread Matt
Of the shells given in `org-babel-shell-names' (that is, "sh" "bash" "zsh" "fish" "csh" "ash" "dash" "ksh" "mksh" "posh"), only "sh" and "bash" have font locking in source blocks. For example, #+begin_src sh if [ -z $TEST ]; then echo Fontified fi #+end_src #+begin_src bash if [ -z

Re: [BUG] No font lock in src blocks for shells in org-babel-shell-names (was Re: Font lock for org-babel shell scripts?)

2023-03-29 Thread Matt
On Wed, 29 Mar 2023 13:04:31 -0400 Derek Chen-Becker wrote --- > Cool, I would be happy to submit a patch! Sure, if that's something you'd enjoy. I'm happy to assist, if needed. > On Wed, Mar 29, 2023 at 3:33 AM Ihor Radchenko yanta...@posteo.net> wrote: > > Org provides some de

Re: [BUG] No font lock in src blocks for shells in org-babel-shell-names (was Re: Font lock for org-babel shell scripts?)

2023-04-01 Thread Matt
On Thu, 30 Mar 2023 04:55:32 -0400 Ihor Radchenko wrote --- > Matt m...@excalamus.com> writes: > > > I think this approach will work fine. I tried examples for each shell > > type and keywords like if/then/else and function names are highlighted. > >

Re: [BUG] No font lock in src blocks for shells in org-babel-shell-names (was Re: Font lock for org-babel shell scripts?)

2023-04-07 Thread Matt
On Tue, 04 Apr 2023 08:30:34 -0400 Ihor Radchenko wrote --- > See the attached tentative patch. After applying the patch, I get the following error when trying to load Emacs: Warning (comp): /home/ahab/Projects/org-mode/lisp/org.el: Error: Symbol's value as variable is void sh-ances

Re: [BUG] No font lock in src blocks for shells in org-babel-shell-names (was Re: Font lock for org-babel shell scripts?)

2023-04-17 Thread Matt
On Fri, 07 Apr 2023 11:29:59 -0400 Matt wrote --- > > On Tue, 04 Apr 2023 08:30:34 -0400 Ihor Radchenko wrote --- > > > See the attached tentative patch. > > After applying the patch, I get the following error when trying to load > Ema

Re: [PATCH] Async evaluation in ob-shell

2023-04-17 Thread Matt
On Fri, 24 Mar 2023 05:11:38 -0400 Ihor Radchenko wrote --- > Matt m...@excalamus.com> writes: > > > On Thu, 23 Mar 2023 07:48:44 -0400 Ihor Radchenko wrote --- > > > May you also document this new feature in ORG-NEWS and in > > > htt

Re: [PATCH] Async evaluation in ob-shell

2023-04-17 Thread Matt
On Mon, 17 Apr 2023 14:53:18 -0400 Ihor Radchenko wrote --- > Matt m...@excalamus.com> writes: > > > > A small note on the WORG page: it may be more natural to use :async yes > > > rather than :async t. Both are viable - in fact, anything other than

Re: Interest in an Org video meetup?

2023-04-26 Thread Matt
> > On Oct 6, 2022, at 9:20 AM, Russell Adams rlad...@adamsinfoserv.com> wrote: > > Would there be any interest in a monthly 1-2 hour long ad-hoc screen > > sharing and video discussion for Org-mode? > > > > I'm offering to schedule and moderate the first few events. I'd > > propose a Satur

Re: Interest in an Org video meetup?

2023-04-27 Thread Matt
On Wed, 26 Apr 2023 17:13:47 -0400 Corwin Brust wrote --- > On Wed, Apr 26, 2023 at 9:31 AM Matt m...@excalamus.com> wrote: > > > > FSF associate members have access to a FSF hosted Jitsi instance. I'm an > > FSF associate member and could host it u

Re: ob-shell sessions will send final echo '...' as input key sequence when previous command reads input interactively (was: [Need Help] Error to evaluate "mpv" command in inline src block)

2023-05-02 Thread Matt
#x27; > > However, (1) ";" may not work in some shells; (2) may > contain multiple lines, leading to the same issue. > > Matt, maybe you have some ideas about this edge case? I have no other ideas within the current ob-shell implementation. As for modifications,

Re: Interest in an Org video meetup?

2023-05-06 Thread Matt
Thoughts on dates and times?

Reintroduction and Questions

2023-06-25 Thread Matt
Hello again! I'm slowly settling in after moving to Germany and hoping to get back into maintenance. As the FSF disclaimer is still being worked out with my employer, I'm hesitant to begin non-trivial code contributions. Until then, I'm hoping to do things that don't require attribution, such

Re: Reintroduction and Questions

2023-06-25 Thread Matt
On Sun, 25 Jun 2023 18:07:34 +0200 Ihor Radchenko wrote --- > Be warned though that Woof! is not yet stable (see > https://git.sr.ht/~bzg/woof and https://lists.sr.ht/~bzg/woof). Thanks for the warning. To verify my understanding, the mailing list is the "source of truth" for issue

Export Documentation Confusions

2023-06-28 Thread Matt
In the Emacs Berlin meeting today, we noticed several items that might be improved in the manual. - Section 13.18. 1: Bare HTML may be better placed under Section 13.9 HTML Export. The information in this section appears unrelated to Exporting in non-Org buffers. In fact, the settings given

Re: Export Documentation Confusions

2023-06-29 Thread Matt
On Thu, 29 Jun 2023 12:24:12 +0200 Ihor Radchenko wrote --- > > - Section 13.18: Export in Foreign Buffers > > > > The section uses the term "foreign buffer" without providing a definition. > > > > Proposed solution: Change wording from "foreign buffers" to "Convert > > Region"

Re: Export Documentation Confusions

2023-06-29 Thread Matt
Changes have been pushed

Re: org babel output

2023-07-03 Thread Matt
On Sat, 01 Jul 2023 05:52:42 +0200 Robert Synofzik wrote --- > Hello, > the exact same error occurs for me: > https://emacs.stackexchange.com/questions/72243/macos-org-babel-python-with-session-output-give-python-el-eval > > do you possibly have any idea on how to fix this? Just

Re: Maintenance status of individual Org libraries

2023-08-20 Thread Matt
On Mon, 30 Jan 2023 14:41:18 +0100 Ihor Radchenko wrote --- > The following libraries have no maintainer or author active on the list: > ob-comint, ob-core, ... I'm interested (and technically still maintainer of ob-shell). ob-comint and ob-core are both used by ob-shell, so I've lo

Re: bash source code block: problem after ssh commands

2023-11-06 Thread Matt
> > "ssh -n derp@host mycommand"). > > Yes, I use an SSH key, and yes, '-n' saves the day. Thanks. Hi Alain, I'm the supposed maintainer of ob-shell who's been missing in action for this whole discussion. I want to confirm, are you able to accomplish your task by using '-n'? Matt

Re: bash source code block: problem after ssh commands

2023-11-06 Thread Matt
On Mon, 06 Nov 2023 14:32:16 +0100 Ihor Radchenko wrote --- > I am wondering about the possible downsides of using script approach > instead of stdin redirection. I'm curious to hear more about what you're thinking.

Re: bash source code block: problem after ssh commands

2023-11-08 Thread Matt
On Tue, 07 Nov 2023 09:53:46 +0100 Ihor Radchenko wrote --- > Matt m...@excalamus.com> writes: > > > On Mon, 06 Nov 2023 14:32:16 +0100 Ihor Radchenko wrote --- > > > I am wondering about the possible downsides of using script approach > >

Re: bash source code block: problem after ssh commands

2023-11-09 Thread Matt
On Thu, 09 Nov 2023 13:13:36 +0100 Ihor Radchenko wrote --- > A bigger problem is that errors *Org Babel Error > Output* are not clickable: Interesting. > So, it looks like we may need an alternative `org-babel-eval' function > that works with script files rather than input and a

Replace org link with footnote

2023-11-10 Thread Matt
Here's a quick hack to replace an Org link with a footnote. Maybe a fun first commit for someone would be to update `org-footnote-new` to accept optional LABEL and DEFINITION arguments that allow a footnote to be created programmatically? (defun my-replace-link-with-footnote () "Replace an o

Re: Replace org link with footnote

2023-11-11 Thread Matt
On Sat, 11 Nov 2023 04:54:15 +0100 Max Nikulin wrote --- > https://list.orgmode.org/ugucve$12l4$1...@ciao.gmane.io Thanks for the reference. It's always good to relate associated information :)

Re: bash source code block: problem after ssh commands

2023-11-15 Thread Matt
I was poking around, learning how sessions are started. Basically, `shell` creates the comint buffer using `make-comint-in-buffer`. What I find interesting is that `make-comint-in-buffer` can also create a comint buffer from a network stream: (let ((buff "*localhost-process-buffer*")) (sw

Re: bash source code block: problem after ssh commands

2023-11-15 Thread Matt
On Wed, 15 Nov 2023 17:32:19 +0100 Matt wrote --- > (let ((buff "*localhost-process-buffer*")) > (switch-to-buffer >(make-comint-in-buffer > "localhost-process" > buff > "ssh" > nil > (format &qu

Re: bash source code block: problem after ssh commands

2023-11-16 Thread Matt
On Thu, 16 Nov 2023 10:30:59 +0100 Ihor Radchenko wrote --- > Or we can make use of TRAMP as we usually do to access remote > environment. IMHO, it is more reliable as TRAMP takes care about > arranging all the Elisp FS interaction to work on remote system. Agreed. Also, I wasn't

Re: bash source code block: problem after ssh commands

2023-11-16 Thread Matt
alaincochard alain.coch...@unistra.fr writes: > Yes. (So I think that explains the 'no' above.) Thank you for clarifying. > Anyway, this gives me the opportunity to come back to the question of > whether or not there is a problem with emacs itself (like some people > here thought), and if

Re: bash source code block: problem after ssh commands

2023-11-17 Thread Matt
On Fri, 17 Nov 2023 10:20:28 +0100 Ihor Radchenko wrote --- > This has nothing to do with Emacs comint and this is also not a bug in > Emacs Ihor, there were two claims made in the original report. I was referring to Claim 2. That deals with M-x shell and therefore comint-mode.

Re: Forget about "bash -c bash file.sh" (Re: bash source code block: problem after ssh commands)

2023-11-18 Thread Matt
On Sat, 18 Nov 2023 04:11:03 +0100 Max Nikulin wrote --- > > bash -c bash /tmp/two-lines.sh > > From my point of view it was a plain mistake in attempts to simulate > the issue outside of Emacs. There is no point to concentrate on this > command. I tried to explain that it

Re: Forget about "bash -c bash file.sh" (Re: bash source code block: problem after ssh commands)

2023-11-18 Thread Matt
On Sat, 18 Nov 2023 09:29:56 +0100 Bruno Barbier > IIUC, what Max is saying is that you should not concentrate on > *that specific command* because that command doesn't do what you think > it does. Cool, it sounds like we're agreed (albeit for different reasons). > To reproduce,

Re: bash source code block: problem after ssh commands

2023-11-18 Thread Matt
To clarify a previous typo I made. Everything I've written was also done using: 1. emacs -q 2. C-x b "*scratch*" 3. M-x org-mode 4. Execute #+begin_src emacs-lisp :results none (org-babel-do-load-languages 'org-babel-load-languages '((shell . t))) #+end_src This corresponds to Org mode v

Re: Forget about "bash -c bash file.sh" (Re: bash source code block: problem after ssh commands)

2023-11-18 Thread Matt
On Sat, 18 Nov 2023 09:54:46 +0100 Bruno Barbier > But, you're right. To be safe, from now on, I'll use: > > cat /tmp/test.sh | bash -c bash It's still not clear to me if this is "what Emacs does". However, that's the best I could come up with. Evaluating the following

Re: bash source code block: problem after ssh commands

2023-11-18 Thread Matt
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 behavi

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

2023-11-18 Thread Matt
On Sat, 18 Nov 2023 16:54:39 +0100 Max Nikulin wrote --- > I have faced an inconsistency with :cmdline treatment in ob-shell.el. I > expect same results in the following cases: > > #+begin_src bash :cmdline 1 2 3 >printf "%s\n" "$1" > #+end_src > > #+RESULTS: > : 1 > >

[BUG] ob-shell: :cmdline fails with single argument (was Re: [BUG] ob-shell: :shebang changes interpretation of :cmdline)

2023-11-18 Thread Matt
On Sat, 18 Nov 2023 16:54:39 +0100 Max Nikulin wrote --- > I have faced an inconsistency with :cmdline treatment in ob-shell.el. These are sadly easy to find. If you run: #+begin_src bash :cmdline 1 echo "$1" #+end_src Then it fails with list: Wrong type argument: sequencep, 1

  1   2   3   4   5   6   7   8   9   10   >