Re: [O] Is it possible to pass variable to variables of src block?

2017-12-11 Thread Xi Shen
PM Michael Welle wrote: > Hello, > > Xi Shen writes: > > > Hi, > > > > http://orgmode.org/manual/var.html > > > > This wiki explains how to use variable inside a src block. But I wonder > if > > it is possible to specify variable to the variable

[O] Is it possible to pass variable to variables of src block?

2017-12-04 Thread Xi Shen
Hi, http://orgmode.org/manual/var.html This wiki explains how to use variable inside a src block. But I wonder if it is possible to specify variable to the variables in the src definition. E.g. for the sql src block, I want to execute a script on different server. I want to define a variable for

Re: [O] org-capture-expand-file: Invalid file location: nil

2017-11-04 Thread Xi Shen
with empty string solves my problem. Regards, David On Sun, Nov 5, 2017 at 5:23 AM Nicolas Goaziou wrote: > Hello, > > Xi Shen writes: > > > When I do C-c c, I got an error: > > I don't see any "c" template in your `org-capture-templates'. > >

[O] org-capture-expand-file: Invalid file location: nil

2017-11-04 Thread Xi Shen
Hi, When I do C-c c, I got an error: org-capture-expand-file: Invalid file location: nil But (org-capture-expand-file "") returns the expected value. And the file does exist. But (org-capture-expand-file nil) raise an error. So I guess the function was given an erroneous value. My relevant sett

[O] ob-sclang.el error on Windows 10 64 bit

2017-09-29 Thread Xi Shen
Hi, I have seeing this error many times when I update org-plus-contrib package on Emacs for Windows. ob-sclang.el:63:1:Error: Cannot open load file: No such file or directory, sclang-interp So far, nothing breaks, because I do not use anything related to ob-sclang.el. The error is caused by

Re: [O] [PATCH] lisp/ob-sql.el: Fix filename conversion in minGW environment.

2017-04-14 Thread Xi Shen
On Wed, Apr 12, 2017, 11:16 Xi Shen wrote: > Hi, > > Regarding a patch I made early. Ref. title: [PATCH] ob-sql.el: Support > sqlcmd and cygwin environment. > > I found it does not for Emacs for Windows. More generally, it does not > work in minGW or MSYS environments.

[O] [PATCH] lisp/ob-sql.el: Fix filename conversion in minGW environment.

2017-04-11 Thread Xi Shen
Hi, Regarding a patch I made early. Ref. title: [PATCH] ob-sql.el: Support sqlcmd and cygwin environment. I found it does not for Emacs for Windows. More generally, it does not work in minGW or MSYS environments. I think it is because minGW is not a POSIX environment, and applications in minGW ca

Re: [O] How to use org mode shell with ssh?

2016-09-23 Thread Xi Shen
I got it :) After reading http://orgmode.org/cgit.cgi/org-mode.git/tree/lisp/ob-shell.el#n57, I found I can simply specify the shell name in the block. On Fri, Sep 23, 2016 at 6:50 PM Fabrice Popineau < fabrice.popin...@centralesupelec.fr> wrote: > 2016-09-23 10:32 GMT+02:00 Xi Shen

Re: [O] How to use org mode shell with ssh?

2016-09-23 Thread Xi Shen
Hi, On my Windows system, I have Cygwin setup, with Emacs as part of the Cygwin installation. I also setup my Cygwin environment to use zsh. I started my Emacs from this zsh environment. I think that's where org inherited this setting. I think when org execute my block, it some how assumed that i

Re: [O] How to use org mode shell with ssh?

2016-09-22 Thread Xi Shen
installed. Is there's way to specify the shell to use on the remote end? On Thu, Sep 22, 2016 at 8:15 PM Xi Shen wrote: > Hi, > > I just tried with: > > #+BEGIN_SRC shell :dir /ssh:openwrt:/mnt/sda1 > ls -al > #+END_SRC > > But still got the same error. I wonder

Re: [O] How to use org mode shell with ssh?

2016-09-22 Thread Xi Shen
has limited function? On Thu, Sep 22, 2016 at 4:57 PM Colin Baxter wrote: > On Wed, Sep 21 2016, William Denton wrote: > > > On 22 September 2016, Xi Shen wrote: > > > >> #+BEGIN_SRC sh :dir /sshx:openwrt:/mnt/sda1 > >> ls -al > >> #+END_SRC >

[O] How to use org mode shell with ssh?

2016-09-21 Thread Xi Shen
Hi, I tried this block #+BEGIN_SRC sh :dir /sshx:openwrt:/mnt/sda1 ls -al #+END_SRC But I got byte-code: Method `sshx' should specify both encoding and decoding command or an scp program But I could not find a way to define the encoding/decoding command... -- Thanks, David S.

[O] Can I quote/ref value in the output table?

2016-07-12 Thread Xi Shen
Hi, Say I have a sql babel block which outputs a table. Is there any way that I can reference the values in the output table in another babel block?

Re: [O] [PATCH] ob-sql.el: Support sqlcmd and cygwin environment

2016-07-04 Thread Xi Shen
n Mon, Jun 20, 2016 at 8:34 PM Xi Shen wrote: > > Thanks Nicolas! I will consider to sign FSF the next time :) > > > On Fri, Jun 17, 2016 at 6:29 AM Nicolas Goaziou > wrote: >> >> Hello, >> >> Xi Shen writes: >> >> > Please take a look at th

[O] dbus-error with org-notify

2016-06-28 Thread Xi Shen
Hi, I am using Emacs within a Cygwin environment on Windows 7 64bit. I have install the dbus Windows service with "messagebus-config", and started the service from Windows service console. After I called (org-notify-start), I got below Message before my task deadline: Warning: notification f

Re: [O] Does org-nofity uses dbus?

2016-06-23 Thread Xi Shen
I also think it is a good idea to add some functions in Emacs for Win32 platform, and let other's used those functions from elisp. Thanks~ On Thu, Jun 23, 2016 at 1:02 AM Fabrice Popineau wrote: > 2016-06-22 14:16 GMT+02:00 Xi Shen : > >> Well~that's good news. But I thin

Re: [O] Does org-nofity uses dbus?

2016-06-22 Thread Xi Shen
o get some Windows native behavior for org-notify on Windows/Cygwin environment. On Tue, Jun 21, 2016 at 10:25 PM Fabrice Popineau < fabrice.popin...@centralesupelec.fr> wrote: > > Le 21 juin 2016 16:14, "Xi Shen" a écrit : > > > > Yeah...getting dbus to work on

Re: [O] Does org-nofity uses dbus?

2016-06-21 Thread Xi Shen
deploy this command line tool with Emacs system...any suggestions/ideas? Thanks, David On Tue, Jun 21, 2016 at 4:45 PM Fabrice Popineau < fabrice.popin...@supelec.fr> wrote: > 2016-06-21 8:31 GMT+02:00 Xi Shen : > >> Hi, >> >> I got below error after I called (o

[O] Does org-nofity uses dbus?

2016-06-20 Thread Xi Shen
Hi, I got below error after I called (org-notify-start). It seems the dbus-error happens very close to the task notification. I wonder if org-notify uses dbus. Error: (dbus-error "No connection to bus" :session) Warning: notification for "Go to dental in 30 mins." behind schedule! Error: (dbus-er

Re: [O] [PATCH] ob-sql.el: Support sqlcmd and cygwin environment

2016-06-20 Thread Xi Shen
Thanks Nicolas! I will consider to sign FSF the next time :) On Fri, Jun 17, 2016 at 6:29 AM Nicolas Goaziou wrote: > Hello, > > Xi Shen writes: > > > Please take a look at the updated patch. Changes: > > > > - add ORG-NEWS entry > > - add function decla

Re: [O] [PATCH] ob-sql.el: Support sqlcmd and cygwin environment

2016-06-15 Thread Xi Shen
Hi Nicolas, Please take a look at the updated patch. Changes: - add ORG-NEWS entry - add function declaration - add input file template for `mssql' engine to remove the "affected rows" tail On Thu, Jun 16, 2016 at 12:49 AM Nicolas Goaziou wrote: > Hello, > > Xi Shen

[O] Does org-notify work on Windows?

2016-06-15 Thread Xi Shen
Hi, I am using Emacs in a Cygwin environment on Windows 7. I installed the latest org from http://orgmode.org/elpa/. I added (org-notify-start) in my .emacs file, and added some tasks. I can see the tasks in my org-agenda, but I never got any notification. I want to know if it is expected to wor

Re: [O] [PATCH] ob-sql.el: Support sqlcmd and cygwin environment

2016-06-14 Thread Xi Shen
s? Maybe I should keep the behavior align with other engines? On Tue, Jun 14, 2016 at 9:02 PM Xi Shen wrote: > Hi Nicholas, > > Sure, I will add the news and declaration. > > The "format" is required to quote the filename, so the spaces won't > surprise sqlcmd. Mayb

Re: [O] [PATCH] ob-sql.el: Support sqlcmd and cygwin environment

2016-06-14 Thread Xi Shen
Hi Nicholas, Sure, I will add the news and declaration. The "format" is required to quote the filename, so the spaces won't surprise sqlcmd. Maybe the arguments will be quoted when passing to the command? On Tue, Jun 14, 2016, 19:52 Nicolas Goaziou wrote: > Hello, > >

[O] Bug? when add the first item using capture

2016-06-13 Thread Xi Shen
Hi, This is my first time using org-capture. I am not sure if it is a bug, or I made a mistake in the configuration. Here's my settings for capture templates: (setq org-capture-templates '(("t" "Task" entry (file+headline nil "Tasks") "* TODO %? %^g") ("q" "Quick note" entry (file+headline

Re: [O] Code in contrib directory is not published with ELPA?

2016-06-13 Thread Xi Shen
err~sorry! http://orgmode.org/elpa.html On Mon, Jun 13, 2016 at 5:19 PM Xi Shen wrote: > Hi, > > I am using Emacs on Windows within Cygwin environment. I found installing > org from the ELPA will not include code in the `contrib' directory. Is it > correct? What is the righ

[O] Code in contrib directory is not published with ELPA?

2016-06-13 Thread Xi Shen
Hi, I am using Emacs on Windows within Cygwin environment. I found installing org from the ELPA will not include code in the `contrib' directory. Is it correct? What is the right way to get code in the `contrib' directory to work on my local? -- Thanks, David S.

Re: [O] [PATCH] ob-sql.el: Support sqlcmd and cygwin environment

2016-06-12 Thread Xi Shen
Hi Nicolas, I think I uploaded the wrong patch. Sorry~ Please check this one. On Mon, Jun 13, 2016 at 1:36 PM Xi Shen wrote: > Hi Nicolas, > > Please see my updated patch. > > > On Sun, Jun 12, 2016 at 6:37 PM Xi Shen wrote: > >> Hi Nicolas, >> >>

Re: [O] [PATCH] ob-sql.el: Support sqlcmd and cygwin environment

2016-06-12 Thread Xi Shen
Hi Nicolas, Please see my updated patch. On Sun, Jun 12, 2016 at 6:37 PM Xi Shen wrote: > Hi Nicolas, > > So I will: > > - add "org-babel-sql-convert-filename", so another name...I am thinking > - remove `msosql` support. I am been playing with the options for a w

Re: [O] [PATCH] ob-sql.el: Support sqlcmd and cygwin environment

2016-06-12 Thread Xi Shen
t 10:12 AM Xi Shen wrote: > Yes, I think it is better to let upstream function to resolve the path for > org-mode. > > But I have never contacted Emacs developers before. Should I go through > the bug-gnu-em...@gnu.org mail list? Or there's a more effective channel? > &g

[O] Fwd: Request to support Cygwin in convert-standard-filename function

2016-06-12 Thread Xi Shen
i Date: Sun, Jun 12, 2016 at 3:10 PM Subject: Re: Request to support Cygwin in convert-standard-filename function To: Xi Shen Cc: > From: Xi Shen > Date: Sun, 12 Jun 2016 02:51:14 + > > I encounter a problem with `convert-standard-filename`, > https://www.gnu.org/software/emacs/m

Re: [O] [PATCH] ob-sql.el: Support sqlcmd and cygwin environment

2016-06-11 Thread Xi Shen
t; Hello, > > Xi Shen writes: > > > According to > > > https://www.gnu.org/software/emacs/manual/html_node/elisp/Standard-File-Names.html > , > > the `convert-standard-filename` works for *nix and MS-DOS, but not Cygwin > > environment. And I tested, it does n

Re: [O] [PATCH] ob-sql.el: Support sqlcmd and cygwin environment

2016-06-10 Thread Xi Shen
Hello Nicolas, Please see my replies inline. On Sat, Jun 11, 2016 at 6:06 AM Nicolas Goaziou wrote: > Hello, > > Xi Shen writes: > > > I would like to apply this path to add sqlcmd support, and allow org-mode > > to execute and capture sqlcmd output in cygwin enviro

[O] [PATCH] ob-sql.el: Support sqlcmd and cygwin environment

2016-06-08 Thread Xi Shen
Hi, I would like to apply this path to add sqlcmd support, and allow org-mode to execute and capture sqlcmd output in cygwin environment. I added a "platform-convert-file-name" function to convert a *nix path to Windows path. Should I put this function in ob-sql.el, or somewhere else? Thanks, D

[O] Where should I add a new utility function?

2016-06-08 Thread Xi Shen
Hi, I would like to add a utility function which will be used by the org-babel-execute:sql function. The function would look like this: +(defun platform-convert-file-name (file) + (if (fboundp 'cygwin-convert-file-name-to-windows) + (format "\"%s\"" (cygwin-convert-file-name-to-windows file

Re: [O] How to setup a development for org-mode?

2016-06-08 Thread Xi Shen
I found the minimal-org trick works for me. On Wed, Jun 8, 2016 at 3:04 PM Robert Klein wrote: > Hi, > > On Wed, 08 Jun 2016 06:55:08 +0000 > Xi Shen wrote: > > > Tried that at first, but got: > > > > Symbol's function definition is void: org-babel--get

[O] Proposal to use sqlcmd for connecting to SQL Server

2016-06-08 Thread Xi Shen
Hi, I tried the use the msosql engine in org-mode, but it cannot format the result into a table. I think MS has made some change that the output of the command is not compatible with org-mode. More specifically, the output add "1> 2> 3> 4> " to the begging and break the table formatting. I saw th

Re: [O] How to setup a development for org-mode?

2016-06-07 Thread Xi Shen
Tried that at first, but got: Symbol's function definition is void: org-babel--get-vars Maybe it is because I am in cygwin environment, so Emacs eval buffers differently? Thanks, David On Wed, Jun 8, 2016 at 2:42 PM Rasmus wrote: > Xi Shen writes: > > > Hi, > >

[O] How to setup a development for org-mode?

2016-06-07 Thread Xi Shen
Hi, I want to make some change to the ob-sql.el file. But I don't want to "make install" every time I change something. I tried to use “load-file" to reload the file I changed, but I got symbol not found error. Any suggestions? Thanks, David -- Thanks, David S.

[O] How to contribute?

2016-06-07 Thread Xi Shen
Hi, I would like to make some code change to org-mode. I followed the instruction on http://orgmode.org/worg/org-contribute.html#patches, but I got stuck at the first step. I send my RSA public key, to the system, but I never got a response. What is the preferred public key specification? Than

[O] Could org-babel-process-file-name support cygwin environment?

2016-06-06 Thread Xi Shen
Hi, I have been using the latest version of the Emacs in cygwin environment for a long time. Recently, I want to use the sql source environment in the org-mode. But I got some error from the "osql" tool on Windows environment. I did some investigation, and I believe it is because this tool cannot