From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id 9usCDQ5asF8tNwAA0tVLHw (envelope-from ) for ; Sat, 14 Nov 2020 22:28:30 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id OJqTCA5asF+uOwAA1q6Kng (envelope-from ) for ; Sat, 14 Nov 2020 22:28:30 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id D432B9403A9 for ; Sat, 14 Nov 2020 22:28:28 +0000 (UTC) Received: from localhost ([::1]:56174 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ke41y-0005u2-8u for larch@yhetil.org; Sat, 14 Nov 2020 17:28:26 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:51488) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ke41Y-0005ts-5z for emacs-orgmode@gnu.org; Sat, 14 Nov 2020 17:28:00 -0500 Received: from mail-pf1-x42d.google.com ([2607:f8b0:4864:20::42d]:32979) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ke41V-0005eG-IH for emacs-orgmode@gnu.org; Sat, 14 Nov 2020 17:27:59 -0500 Received: by mail-pf1-x42d.google.com with SMTP id q10so10322591pfn.0 for ; Sat, 14 Nov 2020 14:27:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=andrew-cmu-edu.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Mhtq5nU/Tp9lTrrZzcRnJS7z2CYgHlt4Degoq91wLyc=; b=u6Bx4Rs97wLwIaF0dBxllDE0Swf7RJUA65DysZ7a+gUczJEufAnGQEwMjDSMfGVJaR Y5u9dVLCvTI2ghTM5+IiyTH8s5Cf7zHRha/zawbvA4ohohqNO747DpgRLmrCQLluyQ3F YVeNZRHI59x5WxI6wZmZcoRBJPgOgid/u3GCK/yt/HmFl7YW9juSOOwxz+A0RudCX2QB wPGika1+CXR/02mG/hUGPyHibY5VfI7Sywen5osjL4uCiZpzF6s734LuLhLNjolfa+MG 3TAUytMoGm0X/2CGx2CfOJOEN6Cdl234CAH9VGfKGjLHJAkAB8p69DevkuRpvMe/s5sG deUQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Mhtq5nU/Tp9lTrrZzcRnJS7z2CYgHlt4Degoq91wLyc=; b=t8B9X0Z2UwkK8eAI8UpXcyStxdyMBXtw71BwpzZFpCya6PoclBMa6h6qgFDgtuvSfO W1ZDVGdaOXhSthzbDdWrYlpOWwabtLTNYhfHEX/7ZXvyDpasLpjJ+3N/ueKOq3EXNam0 YXXj4WV5dYy9NHlZUJuHLc2EDdZpsBZ6G3A+LxYcxuB4XK5rX4NF8dsNt326Ik+1H/xQ zbICbO8hegbsACQrlFwGJvuQvVguX+nzFkP95NnXPy1JQzoiqnI+nTNDWLE2wUfxrByz G8tICB7q0Za6HwDZKcqAK83r9iLg4selobPibtzqBj0Mky7cBSWEYa0t2WNGmeupVQyi OEwg== X-Gm-Message-State: AOAM530vWbtqCWcKtn7Sp7gh0SYNpGxmZBdgfAj1sOEqJZHX12LHp6NU E0XgEsNi0OQxYxUwpssVbJdD7Oh1Qo/4qsVtIjPa9x/w1niRkQ== X-Google-Smtp-Source: ABdhPJzUVe0sO3p9nlmqkrgzbrF/qlaBON/6EAI9HEM/h0No1B6Rs/mhIBJd6Of/G1QVfWGcvAoR+98Hrkps4/+OnAM= X-Received: by 2002:a63:6c03:: with SMTP id h3mr2835411pgc.293.1605392874358; Sat, 14 Nov 2020 14:27:54 -0800 (PST) MIME-Version: 1.0 References: <87sg9bn19u.fsf@mail.linkov.net> In-Reply-To: <87sg9bn19u.fsf@mail.linkov.net> From: John Kitchin Date: Sat, 14 Nov 2020 17:27:43 -0500 Message-ID: Subject: Re: S-RET To: Juri Linkov Content-Type: multipart/alternative; boundary="0000000000000049e605b418a844" Received-SPF: pass client-ip=2607:f8b0:4864:20::42d; envelope-from=johnrkitchin@gmail.com; helo=mail-pf1-x42d.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -13 X-Spam_score: -1.4 X-Spam_bar: - X-Spam_report: (-1.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: org-mode-email Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Scanner: ns3122888.ip-94-23-21.eu Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=andrew-cmu-edu.20150623.gappssmtp.com header.s=20150623 header.b=u6Bx4Rs9; dmarc=fail reason="SPF not aligned (relaxed), DKIM not aligned (relaxed)" header.from=andrew.cmu.edu (policy=none); spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Spam-Score: -0.73 X-TUID: 4USowwjBqFV6 --0000000000000049e605b418a844 Content-Type: text/plain; charset="UTF-8" you can find a lot of functions like the ones in jupyter at https://github.com/jkitchin/scimax/blob/master/scimax-ob.el. I setup my ipython like this: https://github.com/jkitchin/scimax/blob/master/scimax-org-babel-ipython-upstream.el#L89 although I will note there are several setups in that file, e.g. this hydra: https://github.com/jkitchin/scimax/blob/master/scimax-org-babel-ipython-upstream.el#L271 and these: edit: https://github.com/jkitchin/scimax/blob/master/scimax-org-babel-ipython-upstream.el#L271 command: https://github.com/jkitchin/scimax/blob/master/scimax-org-babel-ipython-upstream.el#L526 I don't use them all, but leave them to remind me sometimes. John ----------------------------------- Professor John Kitchin Doherty Hall A207F Department of Chemical Engineering Carnegie Mellon University Pittsburgh, PA 15213 412-268-7803 @johnkitchin http://kitchingroup.cheme.cmu.edu On Sat, Nov 14, 2020 at 3:20 PM Juri Linkov wrote: > I've switched to Org Babel as a replacement of Jupyter Notebook since I > already > tired copying Julia program texts back and forth between Jupyter pages > in web browsers and Emacs. Fortunately, Org Babel can do everything that > Jupyter Notebook does. Except that there is a small usability feature > that I miss in Org Babel. Typing 'C-RET' in Jupyter evaluates the current > code block. In Org Babel 'C-RET' inserts a new heading at the end of > the current subtree. To evaluate the code block there is 'C-c C-c' > (org-ctrl-c-ctrl-c). Thus the equivalent of 'C-RET' is 'C-c C-c'. > So far, so good. > > What I miss in Org Babel is an equivalent of 'S-RET' that in Jupyter > creates a new code block relative to the current code block. > > Actually, in Org Babel such a command already exists and is bound to > the needed key 'S-RET', but currently it works only on tables: > the command is 'org-table-copy-down' and it copies the current field > down to the next row and moves point along with it. This is exactly > what is needed also in context of code blocks. > > Maybe like there is already the command named 'org-ctrl-c-ctrl-c', > a new general command bound to e.g. 'org-s-ret' could do this > depending on context. > > PS: another similarity is how typing RET in shell buffers > inserts a new prompt where the user can type a new command. > 'S-RET' in code blocks could work the same way: type 'S-RET' > and write code in the next code block, and type 'S-RET' again. > > --0000000000000049e605b418a844 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On Sat, Nov 14, 20= 20 at 3:20 PM Juri Linkov <juri@linko= v.net> wrote:
I've switched to Org Babel as a replacement of Jupyter Notebook si= nce I already
tired copying Julia program texts back and forth between Jupyter pages
in web browsers and Emacs.=C2=A0 Fortunately, Org Babel can do everything t= hat
Jupyter Notebook does.=C2=A0 Except that there is a small usability feature=
that I miss in Org Babel.=C2=A0 Typing 'C-RET' in Jupyter evaluates= the current
code block.=C2=A0 In Org Babel 'C-RET' inserts a new heading at the= end of
the current subtree.=C2=A0 To evaluate the code block there is 'C-c C-c= '
(org-ctrl-c-ctrl-c).=C2=A0 Thus the equivalent of 'C-RET' is 'C= -c C-c'.
So far, so good.

What I miss in Org Babel is an equivalent of 'S-RET' that in Jupyte= r
creates a new code block relative to the current code block.

Actually, in Org Babel such a command already exists and is bound to
the needed key 'S-RET', but currently it works only on tables:
the command is 'org-table-copy-down' and it copies the current fiel= d
down to the next row and moves point along with it.=C2=A0 This is exactly what is needed also in context of code blocks.

Maybe like there is already the command named 'org-ctrl-c-ctrl-c',<= br> a new general command bound to e.g. 'org-s-ret' could do this
depending on context.

PS: another similarity is how typing RET in shell buffers
inserts a new prompt where the user can type a new command.
'S-RET' in code blocks could work the same way: type 'S-RET'= ;
and write code in the next code block, and type 'S-RET' again.

--0000000000000049e605b418a844--