Re: [O] ob-shell, output and continuation prompts

2018-02-04 Thread Shintaro Katayama
Hi,

A similar issue - a code block and the result below would be normal.

#+BEGIN_SRC shell
  echo $PWD
#+END_SRC

#+Results:
: /Users/shin/Documents


However, when I specified a session name, the first evaluation returns a
table-format value as below, ...

#+BEGIN_SRC shell :session *shell*
  echo $PWD
#+END_SRC

#+Results:
|   |
| /Users/shin/Documents |


... but, the second or more latter evaluations return the normal value.

#+BEGIN_SRC shell :session *shell*
  echo $PWD
#+END_SRC

#+Results:
: /Users/shin/Documents


... How can I get the normal value in all evaluations of the session?

I attached the session log in the *shell* buffer below. I am using Org mode
version 9.1.6 (9.1.6-16-g86a382-elpaplus @
/Users/shin/.emacs.d/elpa/org-plus-contrib-20180115/ on macOS.

Regards,
Shintaro


echo $PWD
bash-3.2$ /Users/shin/Documents
bash-3.2$ echo 'org_babel_sh_eoe'
org_babel_sh_eoe
bash-3.2$ echo $PWD
/Users/shin/Documents
bash-3.2$ echo 'org_babel_sh_eoe'
org_babel_sh_eoe
bash-3.2$


On Tue, Nov 28, 2017 at 1:25 PM Michael Welle  wrote:

> Hello,
>
> this code block:
>
> #+BEGIN_SRC shell :session n42 :shebang "#!/bin/bash"
> for i in "aa" "bb" "cc" ; do
> echo "u: $i"
> done
> #+end_src
>
> produces this output when it first runs:
>
> #+RESULTS:
> |||||
> | >  | >  | u: | aa |
> | u: | bb |||
> | u: | cc |||
>
>
> After the first run, subsequent runs produce this output:
>
> #+RESULTS:
> ||||
> | >  | u: | aa |
> | u: | bb ||
> | u: | cc ||
>
> If I set :session to none the output is always like follows:
>
> #+RESULTS:
> | u: | aa |
> | u: | bb |
> | u: | cc |
>
>
> I think that last one is what one would expect ;). Anyways, using sessions,
> is there a way to get rid off of the shell's continuation prompts?
>
> Regards
> hmw
>
>


[O] Patch: org-link-ignore-path-to-self

2016-07-27 Thread Shintaro Katayama
Hi,

The attached patch enables to choose whether link contains a (file-)path to
self, or not. One new variable "org-link-ignore-path-to-self" should be
true as the original behavior (~ no path to self by org-insert-link).
However, the path-to-self will remain when the value is nil.

This feature is helpful, especially for org-journal - you can use
org-insert-link from TODOs to journal entries in a journal; the links are
preserved even after carryover.

Regards,
Shintaro


--- /Users/shin/.emacs.d/elpa/org-20160711/org.el~  2016-07-16
01:46:09.0 +0200
+++ /Users/shin/.emacs.d/elpa/org-20160711/org.el   2016-07-27
10:40:30.0 +0200
@@ -10386,6 +10386,7 @@
 ;; option If yes, simplify the link by using only the search
 ;; option.
 (when (and buffer-file-name
+  org-link-ignore-path-to-self
   (string-match "^file:\\(.+?\\)::\\(.+\\)" link))
   (let* ((path (match-string 1 link))
 (case-fold-search nil)