[BUG] Recently master branch commit breaks open file: link

2020-02-23 Thread stardiviner
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 When I open a link like this: #+begin_src org [[file:~/Org/Tasks/Computer Todos.org::*TODO 厉害的人是怎么分析问题的?][厉害的人是怎么分析问题的?]] #+end_src I =[M-x toggle-debug-on-error]= got following stacktrace: #+begin_example Debugger entered--Lisp error:

Re: ob-python.el: questions about output

2020-02-23 Thread Jack Kamm
Sorry, my email had a typo: > #+begin_src python :session session1 :results output > x > #+end_src That should be ":results value".

Re: ob-python.el: questions about output

2020-02-23 Thread Jack Kamm
Hi RC, R C writes: > 1. Is it possible to have both types of output displayed from a single src > block to avoid having to duplicate the src block, using :exports results > for one and :exports both for the other? No, there's no option to output both ":results output" and ":results value". If

Re: Exploring properties

2020-02-23 Thread Vikas Rawal
Thanks Bastien for advice and for connecting with Jose. It would be useful to write some lisp for inserting and adding data from org into rec files. It could either be from org-mode tables or from properties. I am essentially thinking of org-mode providing an interface for feeding data to

Re: Limiting properties and property values

2020-02-23 Thread Vikas Rawal
Dear Eric, Bastien and John, Thanks for references to recutils and org-ql. These are very interesting, and I am looking at those. A recutils database with a possibility of selecting, inserting and updating records from org is one possibility. Let me play around with these tools a bit and see

Re: [PATCH] support colorful blocks display on org-agenda

2020-02-23 Thread Daniele Nicolodi
On 20/02/2020 00:15, Bastien wrote: > Days for the "contrib/" directory are counted: before Org 9.5, I will > extract it from Org's repository, make it an independant repository on > code.orgmode.org and make it available through Org ELPA. This is an excellent plan! Cheers, Dan

ob-python.el: questions about output

2020-02-23 Thread R C
The approach proposed for graphical output at https://orgmode.org/worg/org-contrib/babel/languages/ob-doc-python.html is #+begin_src python :results file import matplotlib, numpy matplotlib.use('Agg') import matplotlib.pyplot as plt fig=plt.figure(figsize=(4,2)) x=numpy.linspace(-15,15)

Re: Exporting comments to comments?

2020-02-23 Thread Christian Moe
I use a rather complex comment macro to make ODT annotations without introducing unwanted paragraph breaks. I'm not sure what the Markdown comment syntax is. But e.g. for HTML, the macro could be defined as simply as: #+MACRO: comment @@html:@@ Then you can write things like This is a

Re: Possible to exclude/include tags for agenda custom commands?

2020-02-23 Thread Eric Abrahamsen
Bastien writes: > Hi Eric, > > Eric Abrahamsen writes: > >> I hope that helps! > > thanks for the detailed example. What verison of Org and Emacs? > > With your example and Org mode version 9.3.6 and GNU Emacs 28.0.50 > I don't get the warning. If you have a ECM I'm willing to test more. The

Re: Bug or not a bug? dot expansion in ob-shell

2020-02-23 Thread Bastien
Hi Jack, Jack Kamm writes: > Stefan Nobis writes: > >> What about a third collection option 'none' and make this the default? > > A variant on this idea, would be to instead have the third collection > option be 'default', which would stand for a language-specific > default. For example,

Org Babel: Submit SQL to command line app & capture results

2020-02-23 Thread Nathan Neff
Hello all, I would like to use org-babel to have SQL code like this: * Some heading #+begin_src something SELECT COUNT(*) FROM some_table; #+end_src I would like to have the code highlighted as SQL. However, I'm not reading from a DB matching the requirements of

Building MWE DEBUG.org template file

2020-02-23 Thread Ken Mankoff
Hello, I'm trying to build a DEBUG.org that makes it easy to share MWEs of bugs I run across in Emacs packages. I'd like it to load the latest Org mode by default. Then for any given bug I load the needed packages, configure them, and demonstrate the bug. Right now when I run the attached

Re: Limiting properties and property values

2020-02-23 Thread Fraga, Eric
On Sunday, 23 Feb 2020 at 15:10, Vikas Rawal wrote: > I am thinking of using org-mode to compile a small database. Although org is fantastic, it is sometimes worth considering other tools (and with babel, these can often be brought into the org sphere of activity easily). For instance, GNU

Re: ICS agenda export exceeds max-specpdl-size probably because of org-depend (org-edna same?)

2020-02-23 Thread Karl Voit
* Bastien wrote: > Hi Karl, > > Karl Voit writes: > >> So maybe I have to invest a weekend or so to bisect the issue. My >> gut feeling tells me that I won't like the output somehow. > > In the meantime, can you share the values of your org-id-* options? Easy: I could not find any change of the

Re: Bug or not a bug? dot expansion in ob-shell

2020-02-23 Thread Jack Kamm
Hi Stefan, Stefan Nobis writes: > What about a third collection option 'none' and make this the default? A variant on this idea, would be to instead have the third collection option be 'default', which would stand for a language-specific default. For example, ":results default" could be

Re: Bug or not a bug? dot expansion in ob-shell

2020-02-23 Thread Fraga, Eric
On Friday, 21 Feb 2020 at 09:04, Bastien wrote: [...] > That said, we have three solutions: > > 1. Stick to a strict reading of Org and bash manuals: the absence of a >:results header means "return the value, i.e. the exit status". [...] > Obviously, nobody wants the first solution.

Feature freeze before 9.4

2020-02-23 Thread Bastien
Hi all, let's have a small phase of feature-freeze before 9.4, which should be released by the end of next week. Only important bug fixes should will be committed. Thanks! -- Bastien

Re: How to display overlay or propertize text on file: link type about the file?

2020-02-23 Thread John Kitchin
In that case: #+BEGIN_SRC emacs-lisp (defun file-description (start end path bracketp) (put-text-property start end 'display (shell-command-to-string (format "file %s" path (org-link-set-parameters "file" :activate-func 'file-description) #+END_SRC With this, you have to have a way to

Re: Exploring properties

2020-02-23 Thread John Kitchin
org-ql (https://github.com/alphapapa/org-ql) is also quite good for this kind of thing. Here is even a database like query to find the heading, and EMAIL property from all the files in a list returned by the function nb-org-files. (org-ql-query :select '(cons (fifth (org-heading-components))

Re: Exploring properties

2020-02-23 Thread Bastien
Hi Vikas, Vikas Rawal writes: > Would you think that an extension of org-collector is the direction to > look at? Doesn't look like org-collector has seen any updates in a > long time. You might want to look at recutils instead. It was announced on org-mode mailing list here 10 years ago:

Re: ICS agenda export exceeds max-specpdl-size probably because of org-depend (org-edna same?)

2020-02-23 Thread Bastien
Hi Karl, Karl Voit writes: > So maybe I have to invest a weekend or so to bisect the issue. My > gut feeling tells me that I won't like the output somehow. In the meantime, can you share the values of your org-id-* options? Thanks, -- Bastien

Re: Limiting properties and property values

2020-02-23 Thread John Kitchin
One solution to this is a function you would write that validates the properties, and prevents saving if they are invalid. You would want to use it in a buffer/directory hook. For example: (defun validate-properties () (goto-char (point-min)) (catch 'error (while (re-search-forward

Re: Exploring properties

2020-02-23 Thread Vikas Rawal
> > > I don't know if I have missed something obvious. But I am trying to > > read all the properties data (key-value pairs) into an R source code > > block (essentially to gather into a data.frame before further > > processing). > > You might want to look at `org-map-entries'. Thanks. It seems

Re: Exploring properties

2020-02-23 Thread Vikas Rawal
> > You might want to look at `org-map-entries'. > Would you think that an extension of org-collector is the direction to look at? Doesn't look like org-collector has seen any updates in a long time. Vikas

Re: Possible to exclude/include tags for agenda custom commands?

2020-02-23 Thread Bastien
Hi Eric, Eric Abrahamsen writes: > I hope that helps! thanks for the detailed example. What verison of Org and Emacs? With your example and Org mode version 9.3.6 and GNU Emacs 28.0.50 I don't get the warning. If you have a ECM I'm willing to test more. Thanks, -- Bastien

Re: Bug or not a bug? dot expansion in ob-shell

2020-02-23 Thread Bastien
Hi Stefan, Stefan Nobis writes: > The downside would be that many existing Org documents needs to be > fixed (but maybe it would be not too hard to automate the adjustments) > and some source blocks may become a little more verbose. Yes, backward-compatibilities issues, verbosity, and a

Re: [SOLVED] Re: [Question] adding document global properties drawer

2020-02-23 Thread Bastien
stardiviner writes: > This problem has gone, I don't know what config caused this problem. I > recently > modify some config of Org Mode. Anyway, it's good news. Thanks for confirming! -- Bastien

Re: Bug or not a bug? dot expansion in ob-shell

2020-02-23 Thread Stefan Nobis
Bastien writes: > I agree we should have a discussion on whether :results value is a > good default. What about a third collection option 'none' and make this the default? This would emphasize that there is no sensible default for all babel languages, users and use cases. Users would be forced

Re: Limiting properties and property values

2020-02-23 Thread Vikas Rawal
On Sun, 23 Feb 2020 at 15:02, Bastien wrote: > Hi Vikas, > > Vikas Rawal writes: > > > 1. Is it possible to restrict the sub-tree of a headline to have only > > properties specified in the column property of the parent? That is, > > no additional property can be specified. > > No, it is

Re: Exploring properties

2020-02-23 Thread Bastien
Hi Vikas, Vikas Rawal writes: > I don't know if I have missed something obvious. But I am trying to > read all the properties data (key-value pairs) into an R source code > block (essentially to gather into a data.frame before further > processing). You might want to look at `org-map-entries'.

Re: ob-prolog is sick. . .

2020-02-23 Thread Bastien
Hi Lawrence, Lawrence Bottorff writes: > Besides the bad karma of listing a Babel language that actually > doesn't work, I would like to have Prolog working in Babel because I > get the sense Prolog's stock will slowly rise, mainly due to it being > the basis of querying graph databases. Prolog

Re: Limiting properties and property values

2020-02-23 Thread Bastien
Hi Vikas, Vikas Rawal writes: > 1. Is it possible to restrict the sub-tree of a headline to have only > properties specified in the column property of the parent? That is, > no additional property can be specified. No, it is currently not possible. What would be the use-case? > 2. Is it