* FWD: Org-Babel Support for Powershell [not found] <M90MAnN--3-2@tutanota.com> @ 2020-06-05 21:32 ` stanislaw_lem--- via General discussions about Org-mode. 2020-06-06 10:43 ` Russell Adams ` (2 more replies) 0 siblings, 3 replies; 9+ messages in thread From: stanislaw_lem--- via General discussions about Org-mode. @ 2020-06-05 21:32 UTC (permalink / raw) To: emacs-orgmode [-- Attachment #1: Type: text/plain, Size: 2159 bytes --] Hi, I ask the maintainer of org-babel Bastien Guerry <http://bzg.fr>, if it is possible to include Powershell support for org-babel. Monsieur Guerry told me to ask you via email. Powershell 5.1 is now an important tool for Infrastructure as Code in the Windows Server world. Windows administrator often encounter mixed IT Landscape with Windows and Linux servers. While it is possible to do network automation with Python with org-babel for the Linux server - you still cannot do Literate Programming in Powershell for Windows server. I think Literate Programming is a very productive idea for system administration. It is very difficult to establish a Living Documentation policy with Powershell, because of the lack of Literate Programming tools with Powershell support. Currently available Powershell support for Powershell is limited to syntax highlighting and external execution of Powershell commands from code fences. The results of execution of Powershell code snippets is not shown within the Emacs buffer. With Powershell 7 we got now a cross-platform scripting language for Windows and Linux OS. I think in the future Powershell administration will get more and more important - not only for deployment, but also for cyber security defense of Windows server. Yours sincerely Stanislaw Lem -- Securely sent with Tutanota. Get your own encrypted, ad-free mailbox: https://tutanota.com Date: Jun 5, 2020, 00:03 From: stanislaw_lem@tutanota.com To: bzg@bzg.fr Subject: Org-Babel Support for Powershell > Bonjour Monsieur, > > Do you plan to include Powershell in org-babel ? > > Powershell is an important scripting languages for administration of Windows servers. I like to write installation scripts with the literate programming paradigm, but I cannot find a good tool - org-babel already supports Python, which is very important for network automation. It will be a perfect match, if it will be possible to write Python and Powershell in the same org-babel file. > > Thanks for your time. > > Yours sincerely > > Stanislaw > > > -- > Securely sent with Tutanota. Get your own encrypted, ad-free mailbox: > https://tutanota.com > [-- Attachment #2: Type: text/html, Size: 3077 bytes --] ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: FWD: Org-Babel Support for Powershell 2020-06-05 21:32 ` FWD: Org-Babel Support for Powershell stanislaw_lem--- via General discussions about Org-mode. @ 2020-06-06 10:43 ` Russell Adams 2020-06-06 23:38 ` Gustav Wikström 2020-06-06 14:01 ` stardiviner 2020-09-05 7:49 ` Bastien 2 siblings, 1 reply; 9+ messages in thread From: Russell Adams @ 2020-06-06 10:43 UTC (permalink / raw) To: emacs-orgmode On Fri, Jun 05, 2020 at 11:32:45PM +0200, stanislaw_lem--- via General discussions about Org-mode. wrote: > With Powershell 7 we got now a cross-platform scripting language for Windows > and Linux OS. Can you provide an example script you would run, and the example output? Basically a minimum working example, except the part where Babel would run it for you? What executable does it need to run? Does Powershell have a REPL, or is it single commands? These would help figure out if Babel could work with it. I have the impression Babel wraps REPL languages quite easily. You'll have more luck trying to have this feature added if you can help supply this kind of information. I think Org-Babel working with many languages is a noble goal, but I expect there would be difficulty getting Powershell support added to the core distribution. It might be limited to a separate package as it is very specific to a Windows only non-free language from a vendor with a long and sordid history of anti-OSS practices. My opinion is I would never consider using Powershell on Linux, despite your positive impression. ------------------------------------------------------------------ Russell Adams RLAdams@AdamsInfoServ.com PGP Key ID: 0x1160DCB3 http://www.adamsinfoserv.com/ Fingerprint: 1723 D8CA 4280 1EC9 557F 66E8 1154 E018 1160 DCB3 ^ permalink raw reply [flat|nested] 9+ messages in thread
* RE: FWD: Org-Babel Support for Powershell 2020-06-06 10:43 ` Russell Adams @ 2020-06-06 23:38 ` Gustav Wikström 2020-06-07 11:47 ` Russell Adams 0 siblings, 1 reply; 9+ messages in thread From: Gustav Wikström @ 2020-06-06 23:38 UTC (permalink / raw) To: Russell Adams, emacs-orgmode@gnu.org, stanislaw_lem@tutanota.com Hi, Org babel support for Powershell is a great idea! Powershell is very ...*ahem*... powerful, and it would likely benefit many users if it was usable and executable from within Org mode! > -----Original Message----- > From: Emacs-orgmode <emacs-orgmode-bounces+gustav=whil.se@gnu.org> On Behalf > Of Russell Adams > Sent: den 6 juni 2020 12:43 > To: emacs-orgmode@gnu.org > Subject: Re: FWD: Org-Babel Support for Powershell > > On Fri, Jun 05, 2020 at 11:32:45PM +0200, stanislaw_lem--- via General > discussions about Org-mode. wrote: > > With Powershell 7 we got now a cross-platform scripting language for Windows > > and Linux OS. > > Can you provide an example script you would run, and the example output? > Basically a minimum working example, except the part where Babel would run it > for you? I know the question wasn't for me. But since I'm answering to your mail I can just as well provide an example anyhow: #+begin_src powershell 2+2 #+end_src #+RESULTS: : 4 > I think Org-Babel working with many languages is a noble goal, but I expect > there would be difficulty getting Powershell support added to the core > distribution. It might be limited to a separate package as it is very specific > to a Windows only non-free language from a vendor with a long and sordid > history > of anti-OSS practices. There should be zero issues in including it into core. Powershell is MIT-licensed and works across all platforms. > My opinion is I would never consider using Powershell on Linux, despite your > positive impression. And I say the opposite. I would certainly use it! /of topic It's safe to say the free software movement has gained a strong footing in the software world. If it's "enemies" from the past are starting to walk in the same direction it would serve the free software advocates well to embrace and further encourage those steps. It would in my opinion be signs of maturity and true, good intentions. Judge not from where one comes, but for where one is heading. Kind regards Gustav ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: FWD: Org-Babel Support for Powershell 2020-06-06 23:38 ` Gustav Wikström @ 2020-06-07 11:47 ` Russell Adams 2020-06-07 12:01 ` tomas 0 siblings, 1 reply; 9+ messages in thread From: Russell Adams @ 2020-06-07 11:47 UTC (permalink / raw) To: emacs-orgmode@gnu.org On Sat, Jun 06, 2020 at 11:38:38PM +0000, Gustav Wikström wrote: > #+begin_src powershell > 2+2 > #+end_src > > #+RESULTS: > : 4 That's pretty easy. What executable should it run? > /of topic It's safe to say the free software movement has gained a strong > footing in the software world. If it's "enemies" from the past are starting to > walk in the same direction it would serve the free software advocates well to > embrace and further encourage those steps. It would in my opinion be signs of > maturity and true, good intentions. Judge not from where one comes, but for > where one is heading. I think it's dangerously ignorant to choose to ignore 20+ years (in my career) of the actively user and OSS hostile actions that MS has taken. They are still an abusive monopoly. ------------------------------------------------------------------ Russell Adams RLAdams@AdamsInfoServ.com PGP Key ID: 0x1160DCB3 http://www.adamsinfoserv.com/ Fingerprint: 1723 D8CA 4280 1EC9 557F 66E8 1154 E018 1160 DCB3 ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: FWD: Org-Babel Support for Powershell 2020-06-07 11:47 ` Russell Adams @ 2020-06-07 12:01 ` tomas 0 siblings, 0 replies; 9+ messages in thread From: tomas @ 2020-06-07 12:01 UTC (permalink / raw) To: emacs-orgmode [-- Attachment #1: Type: text/plain, Size: 1094 bytes --] On Sun, Jun 07, 2020 at 01:47:45PM +0200, Russell Adams wrote: > On Sat, Jun 06, 2020 at 11:38:38PM +0000, Gustav Wikström wrote: > > #+begin_src powershell > > 2+2 > > #+end_src > > > > #+RESULTS: > > : 4 > > That's pretty easy. What executable should it run? > > > /of topic It's safe to say the free software movement has gained a strong > > footing [...] > I think it's dangerously ignorant to choose to ignore 20+ years (in my career) > of the actively user and OSS hostile actions that MS has taken. They are still > an abusive monopoly. Plus... they still are up to shenanigans. They just do it more quietly. For a recent case, see their spat with the Privacy Commissioner of the City of Berlin (sorry, German). https://t3n.de/news/microsoft-mahnt-berlin-wegen-ab-1281556/ https://www.tagesspiegel.de/berlin/warnung-vor-teams-skype-und-zoom-berlins-datenschutzbeauftragte-beugt-sich-vorlaeufig-microsoft/25841622.html They're a corporation. They are out to make money. Other aspects tend to stay behind. That's simple, ain't it? Cheers -- t [-- Attachment #2: Digital signature --] [-- Type: application/pgp-signature, Size: 198 bytes --] ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: FWD: Org-Babel Support for Powershell 2020-06-05 21:32 ` FWD: Org-Babel Support for Powershell stanislaw_lem--- via General discussions about Org-mode. 2020-06-06 10:43 ` Russell Adams @ 2020-06-06 14:01 ` stardiviner 2020-06-09 13:08 ` Neil Cherry 2020-09-05 7:49 ` Bastien 2 siblings, 1 reply; 9+ messages in thread From: stardiviner @ 2020-06-06 14:01 UTC (permalink / raw) To: stanislaw_lem; +Cc: emacs-orgmode -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 stanislaw_lem--- via General discussions about Org-mode. <emacs-orgmode@gnu.org> writes: > Hi, > > I ask the maintainer of org-babel Bastien Guerry <http://bzg.fr>, if it is possible to include Powershell support for org-babel. Monsieur Guerry told me to ask you via email. > > Powershell 5.1 is now an important tool for Infrastructure as Code in the Windows Server world. Windows administrator often encounter mixed IT Landscape with Windows and Linux servers. While it is possible to do network automation with Python with org-babel for the Linux server - you still cannot do Literate Programming in Powershell for Windows server. > > I think Literate Programming is a very productive idea for system administration. It is very difficult to establish a Living Documentation policy with Powershell, because of the lack of Literate Programming tools with Powershell support. Currently available Powershell support for Powershell is limited to syntax highlighting and external execution of Powershell commands from code fences. The results of execution of Powershell code snippets is not shown within the Emacs buffer. > > With Powershell 7 we got now a cross-platform scripting language for Windows and Linux OS. I think in the future Powershell administration will get more and more important - not only for deployment, but also for cyber security defense of Windows server. > > Yours sincerely > > Stanislaw Lem I remember already there are some ob-powershell relative projects. You might want to work and improve features on those work. And integrate it into Org Mode. - - https://gist.github.com/cbilson/ae0d90d163be4d769f8a15ddb58292bc - - https://github.com/togakangaroo/ob-pwsh - -- [ stardiviner ] I try to make every word tell the meaning that I want to express. Blog: https://stardiviner.github.io/ IRC(freenode): stardiviner, Matrix: stardiviner GPG: F09F650D7D674819892591401B5DF1C95AE89AC3 -----BEGIN PGP SIGNATURE----- iQFIBAEBCAAyFiEE8J9lDX1nSBmJJZFAG13xyVromsMFAl7boZ4UHG51bWJjaGls ZEBnbWFpbC5jb20ACgkQG13xyVromsPAmAgAsoj1vDfVKtMEM5HcUgA8I62qmNar SaamgjPPmjlgtlpHZ1GspwGsm/ba9lgzG5iJKULHNgM/Kclf12crjakX+SsR0bVA e6wtytimwPUw16h5t5vDByuHle8jmfpN9M9vfogc2F2eC5zbKU9uR4jw8FI8kPqp KtKhX0EKqR1jLwNz4HxPYH7rQiCh/YNlandcVpZ5jRpG1BB+ivpQ5MHpnfImB7ub xyNpyg5ICAVZuHTyoSrDIh/F5ojK6untfytt06xuTkV8GASt9iG40XxZmyeDznqA zkgvQP8jPrfXkge7MPvrCq7zF2jLppqoMmqq3i5dJWL3uEkcNF2qAuIF0A== =lofo -----END PGP SIGNATURE----- ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: FWD: Org-Babel Support for Powershell 2020-06-06 14:01 ` stardiviner @ 2020-06-09 13:08 ` Neil Cherry [not found] ` <M9PnDEh--3-2@tutanota.com> 0 siblings, 1 reply; 9+ messages in thread From: Neil Cherry @ 2020-06-09 13:08 UTC (permalink / raw) To: numbchild, stanislaw_lem; +Cc: emacs-orgmode [-- Attachment #1.1: Type: text/plain, Size: 1083 bytes --] On 6/6/20 10:01 AM, stardiviner wrote: > I remember already there are some ob-powershell relative projects. You might > want to work and improve features on those work. And integrate it into Org Mode. > > - https://gist.github.com/cbilson/ae0d90d163be4d769f8a15ddb58292bc Using this in Windows 10. I found that I've had to change: "-NoLogo -NonInteractive")) to "-NoLogo -NonInteractive -ExecutionPolicy Bypass ")) ;;; need to avoid MS no scripts policy I needed to user powershell to get around some of the stdout issues with cygwin and mgwin. I've not used powershell before so I'm still learning it. Definitely not in Unix anymore. Thirty five years of Unix and DOS makes this a very strange beast. > - https://github.com/togakangaroo/ob-pwsh I hadn't seen this one, I'll take a look at it later. -- Linux Home Automation Neil Cherry ncherry@linuxha.com http://www.linuxha.com/ Main site http://linuxha.blogspot.com/ My HA Blog Author of: Linux Smart Homes For Dummies [-- Attachment #2: OpenPGP digital signature --] [-- Type: application/pgp-signature, Size: 228 bytes --] ^ permalink raw reply [flat|nested] 9+ messages in thread
[parent not found: <M9PnDEh--3-2@tutanota.com>]
* FWD: Re: FWD: Org-Babel Support for Powershell [not found] ` <M9PnDEh--3-2@tutanota.com> @ 2020-06-09 20:45 ` stanislaw_lem--- via General discussions about Org-mode. 0 siblings, 0 replies; 9+ messages in thread From: stanislaw_lem--- via General discussions about Org-mode. @ 2020-06-09 20:45 UTC (permalink / raw) To: Emacs Orgmode [-- Attachment #1: Type: text/plain, Size: 3810 bytes --] Hi, I thought about four possible solutions to include Powershell 7 in Emacs. I understand that Powershell 5.1 is not Open Source. But is is not the case with Powershell 7. I share my idea with ncherry@linuxha.com below. I am still not very familiar with the vast emacs universe. But I am very good in generating ideas. Unfortunately, I am not very confident to get my ideas working on my own. Yours sincerely Stanislaw -- Securely sent with Tutanota. Get your own encrypted, ad-free mailbox: https://tutanota.com Date: Jun 9, 2020, 22:37 From: stanislaw_lem@tutanota.com To: ncherry@linuxha.com Subject: Re: FWD: Org-Babel Support for Powershell > Hi, > > recently, I got some hints from Google Bing. Jupyter notebook offer a powershell kernel. Jupyter notebook can be accessed from Emacs. I thought of several ways to include Powershell in emacs: > > I. Use Powershell kernel in Jupyter notebook. Use Emacs to access Jupyter notebook > > The Powershell kernel is community-driven and Azure actually use it. The Powershell kernel is used with Anaconda - that is not light-weight. > > https://github.com/Jaykul/Jupyter-PowerShel <https://github.com/Jaykul/Jupyter-PowerShell>> l <https://github.com/Jaykul/Jupyter-PowerShell> > > Emacs supports w3m - a text browser - Microsoft recommends installing Windows Server OS without GUI, because you can avoid update problems. > > II. Adapt polymode in Emacs for Powershell > > But I think, we need something like webmode in order to mix different code snippets. I take a look how polymode work in emacs this weekend. > > III. Use language-agnostic literate programming tool > > I got another idea to find a very simple language-agnostic literate programming tool. > > https://github.com/zyedidia/Literate > > This little language-agnostic tool looks very simple - maybe it can be adapt for powershell. It used awk to extract the code snippets inside the code fences > > https://github.com/0atman/blaze > > IV. Embedding Powershell in Python or Ruby and make configuration readable with reverse literate programming tool > > Another idea of mine is embedding Powershell code in Python and Ruby code and make it readable with a reverse literate programming tool: > > Python support: > https://github.com/7enderhead/antiweb > > Ruby support: > https://github.com/orenbenkiki/codnar > > I am not very familiar with all these tools. Maybe someone has daily experience with these toolsand can publish his configurations. > > Yours sincerely > > Stanislaw > > -- > Securely sent with Tutanota. Get your own encrypted, ad-free mailbox: > https://tutanota.com > > > Jun 9, 2020, 15:08 by ncherry@linuxha.com: > >> On 6/6/20 10:01 AM, stardiviner wrote: >> >>> I remember already there are some ob-powershell relative projects. You might >>> want to work and improve features on those work. And integrate it into Org Mode. >>> >>> - https://gist.github.com/cbilson/ae0d90d163be4d769f8a15ddb58292bc >>> >> >> Using this in Windows 10. >> >> I found that I've had to change: >> >> "-NoLogo -NonInteractive")) >> >> to >> >> "-NoLogo -NonInteractive -ExecutionPolicy Bypass ")) ;;; need to avoid MS no scripts policy >> >> I needed to user powershell to get around some of the stdout issues with cygwin >> and mgwin. >> >> I've not used powershell before so I'm still learning it. Definitely not in >> Unix anymore. Thirty five years of Unix and DOS makes this a very strange >> beast. >> >>> - https://github.com/togakangaroo/ob-pwsh >>> >> >> I hadn't seen this one, I'll take a look at it later. >> >> -- >> Linux Home Automation Neil Cherry ncherry@linuxha.com >> http://www.linuxha.com/ Main site >> http://linuxha.blogspot.com/ My HA Blog >> Author of: Linux Smart Homes For Dummies >> > > [-- Attachment #2: Type: text/html, Size: 5936 bytes --] ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: FWD: Org-Babel Support for Powershell 2020-06-05 21:32 ` FWD: Org-Babel Support for Powershell stanislaw_lem--- via General discussions about Org-mode. 2020-06-06 10:43 ` Russell Adams 2020-06-06 14:01 ` stardiviner @ 2020-09-05 7:49 ` Bastien 2 siblings, 0 replies; 9+ messages in thread From: Bastien @ 2020-09-05 7:49 UTC (permalink / raw) To: stanislaw_lem--- via General discussions about Org-mode.; +Cc: stanislaw_lem Hi Stanislaw, stanislaw_lem--- via "General discussions about Org-mode." <emacs-orgmode@gnu.org> writes: > I ask the maintainer of org-babel Bastien Guerry, if it is possible > to include Powershell support for org-babel. Monsieur Guerry told me > to ask you via email. sorry for the late reply. As I just said to Ian, new Babel libraries are always good, but the route ahead for Org is to have *less* of such libraries in Org's core, not more. So please host and share your code in a way that is easy for anyone to find, and we will do our best to promote external useful Babel libraries. Thanks, -- Bastien ^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2020-09-05 7:50 UTC | newest] Thread overview: 9+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- [not found] <M90MAnN--3-2@tutanota.com> 2020-06-05 21:32 ` FWD: Org-Babel Support for Powershell stanislaw_lem--- via General discussions about Org-mode. 2020-06-06 10:43 ` Russell Adams 2020-06-06 23:38 ` Gustav Wikström 2020-06-07 11:47 ` Russell Adams 2020-06-07 12:01 ` tomas 2020-06-06 14:01 ` stardiviner 2020-06-09 13:08 ` Neil Cherry [not found] ` <M9PnDEh--3-2@tutanota.com> 2020-06-09 20:45 ` FWD: " stanislaw_lem--- via General discussions about Org-mode. 2020-09-05 7:49 ` Bastien
Code repositories for project(s) associated with this public inbox https://git.savannah.gnu.org/cgit/emacs/org-mode.git This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).