From: qijian gong <gongqijian@gmail.com>
To: Nicolas Goaziou <mail@nicolasgoaziou.fr>
Cc: Emacs-orgmode@gnu.org
Subject: Re: [PATCH] ob-python: Insert necessary blank line when sending code to interpreter
Date: Tue, 03 Apr 2018 22:29:31 +0000 [thread overview]
Message-ID: <CAPWNH1OOSbXRo5LVmq=Q+YdQh67s6-fwJoKHJghPj3gP0s+VDw@mail.gmail.com> (raw)
In-Reply-To: <871sfx1lpy.fsf@nicolasgoaziou.fr>
[-- Attachment #1.1: Type: text/plain, Size: 1852 bytes --]
I've added comment and test (New path file in attachment),the test results
look fine.
#+BEGIN_SRC sh
$ make BTEST_RE="test-ob-python" test-dirty
...
selected tests: test-ob-python
Running 7 tests (2018-04-03 16:51:31+0800)
executing Python code block...
Code block evaluation complete.
passed 1/7 test-ob-python/colnames-nil-header-argument
executing Python code block...
Code block evaluation complete.
passed 2/7 test-ob-python/colnames-no-header-argument
executing Python code block...
Code block evaluation complete.
passed 3/7 test-ob-python/colnames-no-header-argument-again
executing Python code block...
Code block evaluation complete.
passed 4/7 test-ob-python/colnames-yes-header-argument
executing Python code block...
Code block evaluation complete.
passed 5/7 test-ob-python/colnames-yes-header-argument-again
executing Python code block...
Code block evaluation complete.
passed 6/7
test-ob-python/insert-necessary-blank-line-when-sending-code-to-interpreter
executing Python code block...
Code block evaluation complete.
passed 7/7 test-ob-python/session-multiline
Ran 7 tests, 7 results as expected (2018-04-03 16:51:33+0800)
#+END_SRC
Nicolas Goaziou <mail@nicolasgoaziou.fr>于2018年4月3日 周二上午2:56写道:
> Hello,
>
> qijian gong <gongqijian@gmail.com> writes:
>
> > I've written this patch to fix the syntax error alarm caused by
> evaluating
> > the following code block:
> >
> > #+BEGIN_SRC python :session
> > if True:
> > 1
> > 2
> > #+END_SRC
>
> Thank you.
>
> Could you add a test in "test-ob-python.el"? Could you also add
> a comment explaining what you are doing?
>
> > + (let ((curr-indent (string-match "[^\s]" line)))
>
> (string-match "\\S-" line)
>
> Regards,
>
> --
> Nicolas Goaziou
>
[-- Attachment #1.2: Type: text/html, Size: 5745 bytes --]
[-- Attachment #2: 0001-ob-python-Insert-necessary-blank-line-when-sending-c.patch --]
[-- Type: application/x-patch, Size: 2750 bytes --]
prev parent reply other threads:[~2018-04-03 22:29 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-04-02 2:21 [PATCH] ob-python: Insert necessary blank line when sending code to interpreter qijian gong
2018-04-02 18:56 ` Nicolas Goaziou
2018-04-03 22:29 ` qijian gong [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAPWNH1OOSbXRo5LVmq=Q+YdQh67s6-fwJoKHJghPj3gP0s+VDw@mail.gmail.com' \
--to=gongqijian@gmail.com \
--cc=Emacs-orgmode@gnu.org \
--cc=mail@nicolasgoaziou.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.