emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


From: Nicolas Goaziou
Subject: Re: [O] [PATCH] ob-sql.el: Support sqlcmd and cygwin environment
Date: Sat, 11 Jun 2016 10:40:55 +0200

Hello,

Xi Shen <address@hidden> 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 not work. For the prefix, please advice
> me a better one. Maybe we should path this function first? How can I
> patch/update a Emacs native function?

Since there is no module in Emacs, you need to prefix functions and
variables according to the package, or, even better, the library they
belong to.

Hence, functions and variables in "ob-sql.el" are prefixed with
"org-babel-sql-".

Do you mind discussing it upstream on emacs-devel ML first? I don't
think this kind of function belongs to Org. If upstream has no
equivalent and doesn't want to add one, we might consider adding it to
the library.

WDYT?

>> > The `osql` command line tool was last updated in 2004,
>> > https://technet.microsoft.com/en-us/library/aa214012(v=sql.80).aspx,
>> > and could not output the query result in a way that morden
>> > `org-table.el` expects.  The `sqlcmd` is the preferred command line
>> > tool to connect the Microsoft SQL Server and it also has a Linux
>> > version,
>> > https://msdn.microsoft.com/en-us/library/hh568447(v=sql.110).aspx.
>>
>> Would it make sense to remove the msosql support then?
>>
> Yes, but I am also thinking about backward compatibility. Do you want
> me to create a patch to remove `msosql` support?

AFAIU, according to your comment, "osql" output is barely usable. If you
think it is still usable and even used by some users, then I do not mind
keeping it. I just wanted to be sure we're not keeping something that is
not reasonable to keep.

>> #'identity
>>
>>
>>> OK, but what's the difference? Care to give me a short lesson?
>>>Thanks!

Not much difference, hence the "nitpick" tag.

'identity is a generic symbol, #'identity clearly indicates we (the
user, the compiler) are interested in the symbol function cell.

In this case, it is obvious, but it is not always the case in other
parts of the code base, and more consistency in the right direction
doesn't hurt.


Regards,

-- 
Nicolas Goaziou



reply via email to

[Prev in Thread] Current Thread [Next in Thread]