Re: [O] [PATCH] ob-sql.el: Support sqlcmd and cygwin environment
You can use sqsh to connect MS-sql too, more info you can see: https://github.com/tumashu/sql-mssql At 2016-06-16 14:04:26, "Xi Shen" wrote: 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 writes: > I suppose I should put the news entry to ./etc/ORG-NEWS file, but into > which version? I created below entry, please take look and let me know > where do you want me to put it. I'd say Version 9.0 > New features > Babel or Version 9.0 > Miscellaneous > *** Improved support to Microsoft SQL Server in =ob-sql.el= > =ob-sql.el= library removes support to the ~msosql~ engine which uses > the deprecated =osql= command line tool, and replaces it with ~mssql~ > engine which uses the =sqlcmd= command line tool. Use with properties > like this: > > #+BEGIN_EXAMPLE > :engine mssql > :dbhost > :dbuser > :dbpassword > :database > #+END_EXAMPLE > > If you want to use the *trusted connection* feature, omit *both* the > =dbuser= and =dbpassword= properties and add =cmdline -E= to the > properties. > > If your Emacs is running in a Cygwin environment, the =ob-sql.el= > library can pass the converted path to the =sqlcmd= tool. It looks good. > I checked the code and it does not quote the arguments for me. It is a safe > manner in Windows to always quote the path. So I will keep it. Fair enough. > I have a question. Currently the table generated by mssql engine has the > "affected rows" append to the end, like this. > > | memberid | username | xx | flags | > |---+--+--+---| > | 1 | GPL | Indo | NULL | > | 2 | GPL | Indo | NULL | > | | | | | > | (2 rows affected) | | | | > > I personally prefer to remove it. Do you or the org community has a > preference about this? Maybe I should keep the behavior align with other > engines? I lean towards removing it, too. I doesn't give useful feedback. We can always insert it back later if it introduces unwanted side-effects. Thank you. Regards, -- Nicolas Goaziou -- Thanks, David S.
Re: [O] Should org-get-outline-path strip dedicated targets?
Hello Nicolas, Custom IDs seem to be a good alternative here, although I would think about the <> part as an invisible part, since I don't expect it to be visible for e.g. export. Thanks. Regards, timor
[O] HTML Export of Links to Source Blocks seems broken
Hello, considering the following example: -- #+NAME: test_fun #+BEGIN_SRC js function test_fun() { } #+END_SRC Link to [[test_fun]] #+NAME: another_test_fun #+BEGIN_SRC js function another_test_fun() { } #+END_SRC Link to [[another_test_fun]] - the exported html code creates to tags, like this: Link to 1 and this: Link to 1 Is that behavior desired? I would expect the link text to actually spell "test_fun" and "another_test_fun" in this case, since those are the names of the source blocks. As a workaround, is there anywhere in the exporter that I could hook into to change the link text myself? (org version 8.3.4) Regads, timor
Re: [O] how do you select tasks for clocking in?
On Thursday, 16 Jun 2016 at 06:24, Alan Schmitt wrote: > Hello, > > I'm trying to consistently use org-clock, but I'm encountering a big > obstacle: task selection. I very often do not start working on a task as > I'm in my main org file, so to clock it in I would first need to find it > there, which is a big enough hurdle for me not to do it. Ideally, I > would like to have a global key that I hit that let me choose with > ivy/helm/ido one task from my agenda files and start clocking it. > > Does such a thing exist? If not, how do you start clocking in? Depending on how many tasks you clock, you may find setting this variable helpful: ,[ C-h v org-clock-goto-may-find-recent-task RET ] | org-clock-goto-may-find-recent-task is a variable defined in ‘org-clock.el’. | Its value is t | | Documentation: | Non-nil means ‘org-clock-goto’ can go to recent task if no active clock. | | You can customize this variable. | | [back] ` -- : Eric S Fraga (0xFFFCF67D), Emacs 25.0.94.1, Org release_8.3.4-869-gf2c421
Re: [O] how do you select tasks for clocking in?
On 2016-06-16 12:43, Eric S Fraga writes: > On Thursday, 16 Jun 2016 at 06:24, Alan Schmitt wrote: >> Hello, >> >> I'm trying to consistently use org-clock, but I'm encountering a big >> obstacle: task selection. I very often do not start working on a task as >> I'm in my main org file, so to clock it in I would first need to find it >> there, which is a big enough hurdle for me not to do it. Ideally, I >> would like to have a global key that I hit that let me choose with >> ivy/helm/ido one task from my agenda files and start clocking it. >> >> Does such a thing exist? If not, how do you start clocking in? > > Depending on how many tasks you clock, you may find setting this > variable helpful: Thank you for the suggestion. This would probably be enough if I could figure out how to use `org-clock-select-task' with a completion engine. Alan -- OpenPGP Key ID : 040D0A3B4ED2E5C7 Monthly Athmospheric CO₂, Mauna Loa Obs. 2015-05: 403.94, 2016-05: 407.70 signature.asc Description: PGP signature
Re: [O] how do you select tasks for clocking in?
Alan Schmitt writes: > [ Unknown signature status ] > Hello, > > I'm trying to consistently use org-clock, but I'm encountering a big > obstacle: task selection. I very often do not start working on a task as > I'm in my main org file, so to clock it in I would first need to find it > there, which is a big enough hurdle for me not to do it. Ideally, I > would like to have a global key that I hit that let me choose with > ivy/helm/ido one task from my agenda files and start clocking it. > > Does such a thing exist? If not, how do you start clocking in? > > Thanks, > > Alan this http://doc.norang.ca/org-mode.html#Clocking is a different approach using a default task and clocking history. it might be helpful. -cm
Re: [O] how do you select tasks for clocking in?
Alan Schmitt writes: > I'm trying to consistently use org-clock, but I'm encountering a big > obstacle: task selection. I very often do not start working on a task > as I'm in my main org file, so to clock it in I would first need to > find it there, which is a big enough hurdle for me not to do > it. Ideally, I would like to have a global key that I hit that let me > choose with ivy/helm/ido one task from my agenda files and start > clocking it. I clock in on the Agenda view. Assumming the tasks for which you are tracking time are "TODO" items or otherwise on your agenda, this works pretty well for me. Allan
Re: [O] how do you select tasks for clocking in?
On 2016-06-16 15:20, cesar mena writes: >> I'm trying to consistently use org-clock, but I'm encountering a big >> obstacle: task selection. I very often do not start working on a task as >> I'm in my main org file, so to clock it in I would first need to find it >> there, which is a big enough hurdle for me not to do it. Ideally, I >> would like to have a global key that I hit that let me choose with >> ivy/helm/ido one task from my agenda files and start clocking it. >> >> Does such a thing exist? If not, how do you start clocking in? >> >> Thanks, >> >> Alan > > this http://doc.norang.ca/org-mode.html#Clocking is a different approach > using a default task and clocking history. it might be helpful. This is great! I already use the project structure from this document, so I should be able to adapt this to my setting. Thanks a lot for reminding me of this treasure trove. Alan -- OpenPGP Key ID : 040D0A3B4ED2E5C7 Monthly Athmospheric CO₂, Mauna Loa Obs. 2015-05: 403.94, 2016-05: 407.70 signature.asc Description: PGP signature
Re: [O] how do you select tasks for clocking in?
On 2016-06-16 16:17, Allan Streib writes: > Alan Schmitt writes: > >> I'm trying to consistently use org-clock, but I'm encountering a big >> obstacle: task selection. I very often do not start working on a task >> as I'm in my main org file, so to clock it in I would first need to >> find it there, which is a big enough hurdle for me not to do >> it. Ideally, I would like to have a global key that I hit that let me >> choose with ivy/helm/ido one task from my agenda files and start >> clocking it. > > I clock in on the Agenda view. Assumming the tasks for which you are > tracking time are "TODO" items or otherwise on your agenda, this works > pretty well for me. Thank you for the suggestion. I guess that keeping too many tasks implicit (not in the agenda) works against this, and I should try to make them explicit if I want to clock them. Alan -- OpenPGP Key ID : 040D0A3B4ED2E5C7 Monthly Athmospheric CO₂, Mauna Loa Obs. 2015-05: 403.94, 2016-05: 407.70 signature.asc Description: PGP signature
[O] tag search seems not to work.
Hi I am using GNU emacs 25.1.50 (compiled yesterday) and the latest org version available in ELPA. I really never used tag search as provided by the agenda. So today I just copied the examples of http://orgmode.org/worg/org-tutorials/advanced-searching.html * TODO Buy clothes for wedding:wedding:important:errands: SCHEDULED: <2010-12-01 Wed> :PROPERTIES: :estimated-cost: 100 :END: [2010-11-17 Wed 12:22] I need to look spiffy for the big day! - [ ] Suit - [ ] Tie - [ ] Shoes - [ ] Hat Possible stores to visit: | Store | Location | Miles away | |-++| | The Suit King | 1000 E. Washington St. |5.1 | | Mr. Haberdasher | 259 Western Rd.|7.2 | Into an org file and run, as indicated C-m a and then I searched for wedding, However nothing was found, I expected, as in occur, a buffer showing me all the tags matching my search criterion, but there was none. What do I miss? thanks Uwe Brauer
[O] Upper or lower case in BEGIN_SRC and other keywords
When I use the #+RESULTS is in upper case too. I noticed other people have these keywords in lower case in examples or config files, so I looked in the manual, which says [1] "Org uses option keywords (like #+TITLE to set the title) and environment keywords (like #+BEGIN_HTML to start a HTML environment). They are written in uppercase in the manual to enhance its readability, but you can use lowercase in your Org files." There's a footnote [2] that says: "Easy templates insert lowercase keywords and Babel dynamically inserts #+results." How come this doesn't happen for me? I don't see any variable that's making things default to upper case for me. This isn't a problem ... I'm just curious. Bill [1] http://orgmode.org/org.html#Conventions [2] http://orgmode.org/org.html#fn-3 -- William Denton :: Toronto, Canada :: https://www.miskatonic.org/ Caveat lector.
[O] Some progress (was: tag search seems not to work.)
>>> "Uwe" == Uwe Brauer writes: > Hi > I really never used tag search as provided by the agenda. So today I > just copied the examples of > http://orgmode.org/worg/org-tutorials/advanced-searching.html > * TODO Buy clothes for wedding :wedding:important:errands: > SCHEDULED: <2010-12-01 Wed> > :PROPERTIES: > :estimated-cost: 100 > :END: > [2010-11-17 Wed 12:22] > I need to look spiffy for the big day! > - [ ] Suit > - [ ] Tie > - [ ] Shoes > - [ ] Hat > Possible stores to visit: > | Store | Location | Miles away | > |-++| > | The Suit King | 1000 E. Washington St. |5.1 | > | Mr. Haberdasher | 259 Western Rd.|7.2 | > Into an org file and run, as indicated > C-m a > and then I searched for wedding, > However nothing was found, I expected, as in occur, a buffer showing me > all the tags matching my search criterion, but there was none. > What do I miss? It seems that I have to add the file in which I am searching to the list of agenda files (https://stackoverflow.com/questions/24966333/emacs-org-mode-tags-not-found) that however is not described in the manual nor is it intuitive. Now I can search and find tags in headings, but I cannot find properties, how do I find these? thanks Uwe Brauer
Re: [O] extract a region from a table and export it
> Uwe Brauer writes: > See (info "(org) var") in particular the section on "Indexable variable > values". > Additionally, an empty index, or the single character ‘*’, > are both > interpreted to mean the entire range and as such are equivalent to > ‘0:-1’, as shown in the following example in which the entire first > column is referenced. > #+NAME: example-table > | 1 | a | > | 2 | b | > | 3 | c | > | 4 | d | > #+BEGIN_SRC emacs-lisp :var data=example-table[,0] > data > #+END_SRC > #+RESULTS: > | 1 | 2 | 3 | 4 | Thanks that looks like a very simple solution, however how can one obtain the first column of the table in column format? (I know I could transverse it, but just out of curiosity.
Re: [O] extract a region from a table and export it
> Uwe Brauer writes: > See (info "(org) var") in particular the section on "Indexable variable > values". > Additionally, an empty index, or the single character ‘*’, are both > interpreted to mean the entire range and as such are equivalent to > ‘0:-1’, as shown in the following example in which the entire first > column is referenced. > #+NAME: example-table > | 1 | a | > | 2 | b | > | 3 | c | > | 4 | d | > #+BEGIN_SRC emacs-lisp :var data=example-table[,0] > data > #+END_SRC > #+RESULTS: > | 1 | 2 | 3 | 4 | It is also not clear to me how you could extract say the first and the third column from the following table | 1 | a | 3 | | 2 | b | 4 | | 3 | c | 6 | | 4 | d | 7 | Using your approach?
Re: [O] Upper or lower case in BEGIN_SRC and other keywords
I believe that, in general, things are case-insensitive in org-mode. Please do help clarify this if this is wrong. The only place that I have come across as case-sensitive is the tag system. If you tag a sub-tree with ':archive:', it will not be archived. The tag has to be ':ARCHIVE:'. On Thu, Jun 16, 2016 at 12:32 PM William Denton wrote: > When I use the #+RESULTS is in upper case too. I noticed other people have these > keywords in > lower case in examples or config files, so I looked in the manual, which > says > [1] > > "Org uses option keywords (like #+TITLE to set the title) and environment > keywords (like #+BEGIN_HTML to start a HTML environment). They are written > in > uppercase in the manual to enhance its readability, but you can use > lowercase in > your Org files." > > There's a footnote [2] that says: > > "Easy templates insert lowercase keywords and Babel dynamically inserts > #+results." > > How come this doesn't happen for me? I don't see any variable that's > making > things default to upper case for me. > > This isn't a problem ... I'm just curious. > > Bill > > [1] http://orgmode.org/org.html#Conventions > [2] http://orgmode.org/org.html#fn-3 > > -- > William Denton :: Toronto, Canada :: https://www.miskatonic.org/ > Caveat lector. > > -- -- Kaushal Modi
Re: [O] extract a region from a table and export it
#+BEGIN_SRC emacs-lisp :var data=example-table[,0] (mapcar 'list data) #+END_SRC #+RESULTS: | 1 | | 2 | | 3 | | 4 | Uwe Brauer writes: >> Uwe Brauer writes: > >> See (info "(org) var") in particular the section on "Indexable variable >> values". > > >> Additionally, an empty index, or the single character ‘*’, >> are both >> interpreted to mean the entire range and as such are equivalent to >> ‘0:-1’, as shown in the following example in which the entire first >> column is referenced. > >> #+NAME: example-table >> | 1 | a | > >> | 2 | b | >> | 3 | c | >> | 4 | d | > >> #+BEGIN_SRC emacs-lisp :var data=example-table[,0] >> data >> #+END_SRC > >> #+RESULTS: >> | 1 | 2 | 3 | 4 | > > Thanks that looks like a very simple solution, however how can one > obtain the first column of the table in column format? (I know I could > transverse it, but just out of curiosity. -- 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
Re: [O] extract a region from a table and export it
(require 'dash) #+tblname: tab2 | 1 | a | 3 | | 2 | b | 4 | | 3 | c | 6 | | 4 | d | 7 | #+BEGIN_SRC emacs-lisp :var c0=tab2[,0] :var c2=tab2[,2] (-zip-with 'list c0 c2) #+END_SRC #+RESULTS: | 1 | 3 | | 2 | 4 | | 3 | 6 | | 4 | 7 | Uwe Brauer writes: >> Uwe Brauer writes: > >> See (info "(org) var") in particular the section on "Indexable variable >> values". > > >> Additionally, an empty index, or the single character ‘*’, are > both >> interpreted to mean the entire range and as such are equivalent to >> ‘0:-1’, as shown in the following example in which the entire first >> column is referenced. > >> #+NAME: example-table >> | 1 | a | > >> | 2 | b | >> | 3 | c | >> | 4 | d | > >> #+BEGIN_SRC emacs-lisp :var data=example-table[,0] >> data >> #+END_SRC > >> #+RESULTS: >> | 1 | 2 | 3 | 4 | > > It is also not clear to me how you could extract say the first and the > third column from the following table > > | 1 | a | 3 | > | 2 | b | 4 | > | 3 | c | 6 | > | 4 | d | 7 | > > Using your approach? -- 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
[O] [RFC] Modified Babel call execution and property deprecation
Hello, I just pushed changes about how Babel calls (including inline calls) are evaluated. Basically, they are not treated anymore as an Emacs Lisp variable, but as virtual Babel source blocks, which can then be executed with `org-babel-execute-src-block'. I had to tweak a few tests in the process so I guess it will introduce a few visible changes, in particular in header args as properties. In any case, please let me know if there's something fishy. That leads me to the second point. I think it's high time to remove the deprecated (3 years ago) syntax for header properties, e.g., :PROPERTIES: :tangle: no :END: I re-read discussions about it from a couple of years ago, and, AFAICT, the arguments against it do not hold anymore. So, if you think this syntax is still useful, i.e., it permits things that the current one cannot, please speak up. Regards, -- Nicolas Goaziou0x80A93738
Re: [O] [PATCH] ob-sql.el: Support sqlcmd and cygwin environment
Hello, Xi Shen writes: > 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 Applied. Thank you. Please consider signing FSF papers if you want to contribute more to Org. Regards, -- Nicolas Goaziou
Re: [O] org-refile works but dosent work from within a capture window (org-capture-refile)
Hello, Fabrice Popineau writes: > I don't know what is the minimal setup to reproduce the problem. > Basically: > > - call capture from Chrome (in my case) > - select n for note > - select C-c C-w for org-capture-refile > > Here is a backtrace. [...] > Debugger entered--Lisp error: (wrong-type-argument arrayp nil) > > replace-regexp-in-string("\\[\\[\\([^][]+\\)\\]\\(\\[\\([^][]+\\)\\]\\)?\\]" > "\\3" nil) I guess you are refiling to an empty headline. Anyway, it is fixed. Thank you. Regards, -- Nicolas Goaziou
Re: [O] issue w/ org-ref setup: C-c ] works, but C-u C-C ] not
I gave it another try, and I got it finally! I have to press C-u and then return (not just C-u), then the helm menu to chose the citation type pops up Thanks again, Andreas John Kitchin writes: > Andreas Reuleaux writes: > >> But what does not currently work for me (and what used to work): >> getting a choice of citation: cite/citep/citeauthor/nocite/whatever. > > To get this, you press C-u enter on the candidate you select, and that > should give you a new helm selection for citation type. This is > currently only possible in the helm backend. I am not sure if it can be > done with ivy yet.
Re: [O] Upper or lower case in BEGIN_SRC and other keywords
On Thu, 16. Jun 12:13, William Denton wrote: When I use the For one, there is a ~org-babel-results-keyword~ variable. Also I prefer src block keywords not to stand out as such: #+begin_src emacs-lisp (setcar org-structure-template-alist '("s" "#+begin_src ?\n\n#+end_src" "")) #+end_src For me, it's just a matter of taste. Regards, Bernhard
Re: [O] org-refile works but dosent work from within a capture window (org-capture-refile)
2016-06-17 0:43 GMT+02:00 Nicolas Goaziou : > Hello, > > ... > > I guess you are refiling to an empty headline. Hmmm ... the problem is that there was no chance to specify one. > Anyway, it is fixed. Thanks a lot! Fabrice