Re: [ANN] Emergency bugfix release: Org mode 9.7.5

2024-06-22 Thread emacs-orgmode



Ihor Radchenko  writes:


I just released Org mode 9.7.5 that fixes a critical vulnerability.
The release is coordinated with emergency Emacs 29.4 release.


Thanks for the release and the anouncement.

Will a CVE be released? I am interested if there are mitigating factors
such as using `emacs -nw` (without GUI), thus no possible preview of the
attachments (IIUC).

Best,



[O] Inject value of macro into code using a variable

2019-10-15 Thread wlharvey4 via Emacs-orgmode
Is it possible to inject the value of a macro into code using a variable?

I set a macro called ‘version’ with a version number at the top of my .org 
file.  I would like to do something like this:

#+macro:version Version 0.2.5

#+name:code-name
#+begin_src js :tangle some-file.js :var ver={{{version}}} :exports both 
:results output
const version = ver;
#+end_src

When this code is evaluated during export, there is an error:

org-babel-ref-resolve: Reference ‘{{{version}}}’ not found in this buffer

Regards,
Wesley




[O] add names to org-babel-header-arg-names

2019-09-06 Thread Charles Millar via Emacs-orgmode



Hi,

To avoid errors while running org-lint in an org file with many recutils
source blocks I have added the following to my init.el file

(setq recutils-babel-header-arg-names '(data type fields join sort groupby))
  ;; cmdline already included in org-babel-header-arg-names so not part 
of above list
(setq org-babel-header-arg-names (concatenate 'list 
org-babel-header-arg-names recutils-babel-header-arg-names))


It appears that there are no problems, Never the less,

Is there a "better" way? For that matter, is there a safer way?

Charlie Millar



Re: [O] Bug header argumednt :file does not produce a file or a link to the file

2019-08-24 Thread Charles Millar via Emacs-orgmode



Nicolas Goaziou  writes:



It changed between Org 9.2 and Org 9.3, for every language. There is an
ORG-NEWS entry about it, namely:

  *** ~:file~ header argument no longer assume "file" ~:results~



Thank you. I read that entry and others concerning ;file prior to
posting and it did not penetrate my thick skull.

Regards,



Re: [O] Bug header argumednt :file does not produce a file or a link to the file

2019-08-23 Thread Charles Millar via Emacs-orgmode

On 8/23/19 4:15 AM, Nicolas Goaziou wrote:

Hello,

Charles Millar via Emacs-orgmode  writes:


#+begin_src sh :file test.rec
cat << EOF
# -*- mode: rec -*-

%rec: somerecord

Account: something
Amount: 0.00

 end of file
EOF

#+end_src

I expect that when I execute the above code block that

1. An external file test.rec is produced with contents

# -*- mode: rec -*-

%rec: somerecord

Account: something
Amount: 0.00

 end of file

   and

2. A link to that file is placed below the source code block

Instead all I get is a table and no external file is created


You probably need to specify that the output is a file, which is not the
default for "sh" language. You may want to add ":results file" to the
header of the source block.

Regards,


Thank you, Nicolas. That solved it.

Now a "just curious," comment and question:

I had a few files that used the ECM source code block, just many more 
entries in each. The last time that I evaluated any of them was last 
October and it produced the results I expected, i.e. I did not specify 
":results file"


So, up until October was I just lucky or did something change in Org 
that affected the sh language?


Regards,

Charlie Millar






[O] Bug header argumednt :file does not produce a file or a link to the file

2019-08-22 Thread Charles Millar via Emacs-orgmode
Org mode version 9.2.5 (release_9.2.5-494-g4848b8 @ 
/usr/local/share/org-mode/lisp/)
GNU Emacs 27.0.50 (build 59, x86_64-pc-linux-gnu, GTK+ Version 3.24.10) 
of 2019-08-22


ECM

#+begin_src sh :file test.rec
cat << EOF
# -*- mode: rec -*-

%rec: somerecord

Account: something
Amount: 0.00

 end of file
EOF

#+end_src

I expect that when I execute the above code block that

1. An external file test.rec is produced with contents

# -*- mode: rec -*-

%rec: somerecord

Account: something
Amount: 0.00

 end of file

 and

2. A link to that file is placed below the source code block

Instead all I get is a table and no external file is created

#+RESULTS:
| # |   -*- | mode: | rec | -*- |
| %rec: | somerecord | | | |
| Account: | sometyhing | | | |
| Amount: | 0.0 | | | |
|  | end | of | file | |

I reported this earlier but my subject line was not correct.

Charlie Millar



Re: [O] bug: org-table-convert-region-max-lines causes a "Code block produced nop output"

2019-08-20 Thread Charles Millar via Emacs-orgmode

A follow up

On 8/20/19 9:32 AM, Charles Millar via Emacs-orgmode wrote:
In an org file I have a source code block to convert entries into and 
generate a recutils file


#+begin_src sh?? :file SomeFile.rec
cat << EOF
# -*- mode: rec -*-

 Begin recutils file

Approximately 770 records in recutils format each with about 20 
entries; over 17,000 lines including line feeds or carriage returns


#+end_src

The following error is produced:

Starting new Ispell process /usr/bin/aspell with en_US dictionary...
executing Sh code block...
Wrote /tmp/babel-k8j93s/ob-input-LL2cYo
Error reading results: (user-error Region is longer than 
???org-table-convert-region-max-lines??? (999) lines; not converting)

Code block produced no output.

I admit that I have not evaluated this code block since last 
October.At that time the SomeFile.rec file was produced, as expected. 
However, the size of the entries has not changed and now the above 
error results.


I modified my init.el file to include

(setq org-table-convert-region-max-lines 2)

closed emacs, etc. (load-file init.el did not change the default 999 
to 2)


When I C-c C-c'ed the code block again the process hung. I confirmed 
that org-table-convert-region-max-lines was set to 2.


Is org-table-convert-region-max-lines?? supposed to be invoked and if 
so what should I modify?


Version information

Org mode version 9.2.5 (release_9.2.5-488-g9ddba9 @ 
/usr/local/share/org-mode/lisp/)
GNU Emacs 27.0.50 (build 57, x86_64-pc-linux-gnu, GTK+ Version 
3.24.10) of 2019-08-20


Charlie Millar

It appears that the above now creates a table, not a recutils file. 
Spaces are the delimiter,



#+begin_src sh?? :file test.rec
cat << EOF
# -*- mode: rec -*-

%rec: somerecord

Account: something
Amount: 0.00

 end of file
EOF

#+end_src

#+RESULTS:
| #?? | -*-?? | mode: | rec?? | -*- |
| %rec:?? | somerecord | |?? | |
| Account: | sometyhing | |?? | |
| Amount:?? | 0.0?? | |?? | |
|  | end?? | of?? | file | |




[O] bug: org-table-convert-region-max-lines causes a "Code block produced nop output"

2019-08-20 Thread Charles Millar via Emacs-orgmode
In an org file I have a source code block to convert entries into and 
generate a recutils file


#+begin_src sh?? :file SomeFile.rec
cat << EOF
# -*- mode: rec -*-

 Begin recutils file

Approximately 770 records in recutils format each with about 20 entries; 
over 17,000 lines including line feeds or carriage returns


#+end_src

The following error is produced:

Starting new Ispell process /usr/bin/aspell with en_US dictionary...
executing Sh code block...
Wrote /tmp/babel-k8j93s/ob-input-LL2cYo
Error reading results: (user-error Region is longer than 
???org-table-convert-region-max-lines??? (999) lines; not converting)

Code block produced no output.

I admit that I have not evaluated this code block since last October.At 
that time the SomeFile.rec file was produced, as expected. However, the 
size of the entries has not changed and now the above error results.


I modified my init.el file to include

(setq org-table-convert-region-max-lines 2)

closed emacs, etc. (load-file init.el did not change the default 999 to 
2)


When I C-c C-c'ed the code block again the process hung. I confirmed 
that org-table-convert-region-max-lines was set to 2.


Is org-table-convert-region-max-lines?? supposed to be invoked and if so 
what should I modify?


Version information

Org mode version 9.2.5 (release_9.2.5-488-g9ddba9 @ 
/usr/local/share/org-mode/lisp/)
GNU Emacs 27.0.50 (build 57, x86_64-pc-linux-gnu, GTK+ Version 3.24.10) 
of 2019-08-20


Charlie Millar





[O] Bug: `#+OPTIONS: <:nil' has no effect when exporting to LaTeX [9.1.9 (release_9.1.9-65-g5e4542 @ /usr/share/emacs/26.2/lisp/org/)]

2019-08-13 Thread Jakob Rosenblattl via Emacs-orgmode
When I export to LaTeX, the created LaTeX file contains \date{\today}.
However, I don't want it to show the date.  Using #+OPTIONS: date:nil
the LaTeX result will contain \date{} instead, which indeed hides the
date, but now there's empty space in place of the date when compiled to
a PDF document, which is undesirable.  As per the manual the argument <
to the OPTIONS keyword is supposed to "[t]oggle inclusion of time/date
active/inactive stamps (org-export-with-timestamps)".  Putting
#+OPTIONS: <:nil, however, has no effect at all; \date{\today} will
still end up in the LaTeX export.

Do I misunderstand the meaning of the argument 

Re: [Orgmode] Cycling visibility of blocks

2009-05-25 Thread emacs-orgmode
Eric Schulte schulte.e...@gmail.com writes:

 The attached file should implement this feature, just load the file and
 then press tab while at the beginning of a source block.  Note that it
 requires a newish version of org-mode which includes the
 `org-tab-first-hook' variable.

Very nice ! Thank you.

 Maybe this would make sense for all org blocks, not just src blocks?

Sure, begin_src was just an example. It can be very useful in so many
cases.

-- 
Nicolas Goaziou



___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] C-k makes entries disappear in agenda view

2009-05-25 Thread emacs-orgmode
Carsten Dominik carsten.domi...@gmail.com writes:

 Fixed, thanks, please verify.

It works now. No more entries disappearing without notice.

-- 
Nicolas Goaziou



___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] C-k makes entries disappear in agenda view

2009-05-24 Thread emacs-orgmode
Carsten Dominik carsten.domi...@gmail.com writes:

 Fixed, thanks, please verify.

To tell the truth, I have no way of getting my hands on the latest git
at the moment. But I do trust in your debugging powers !

I'll tell you if anything goes wrong when I have the chance to test it.

Thanks anyway.

-- 
Nicolas Goaziou



___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Cycling visibility of blocks

2009-05-24 Thread emacs-orgmode
Hello,

I perhaps have missed it in the manual, but, would it be possible to
cycle visibility in blocks like in the example below ?

#+BEGIN_something
blah blah blah
blah
blah blah
and so much blah yet to come
#+END_something

becomes

#+BEGIN_something
...
#+END_something

It could help when you have those big BEGIN_SRC getting in the way.

Thanks.

-- 
Nicolas Goaziou



___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] C-k makes entries disappear in agenda view

2009-05-23 Thread emacs-orgmode
Hello,

As I was saying in anoter post, it looks like there's something weird
happening when using C-k in agenda view:

1. Create two new remember entries (i.e. test and test2) with the same
tag (I used @office)
2. Narrow down the agenda view to only see the @office entries.
3. Kill the last but one entry (it should be test) : both of test
and test2 disappear frow the view. Actually, test2 is not properly
killed, but it is scary nonetheless.

It only happens with two last entries.

Is anyone able to reproduce this ?

-- 
Nicolas Goaziou



___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] The patch (org-exp-blocks), the question and the bug

2009-05-17 Thread emacs-orgmode
Hello,

I have created (in fact, I have copied and pasted with slights
modifications) a function to use asymptote's code
(http://asymptote.sourceforge.net) with the help of org-exp-blocks.
Unfortunately, I am clueless about how to make a patch with git. So,
with all my apologies, I will put it here as it might be useful to
someone.

(defun org-export-blocks-format-asy (body rest headers)
  Pass block BODY to the asy utility creating an image.
Specify the path at which the image should be saved as the first
element of headers, any additional elements of headers will be
passed to the asy utility as command line arguments. The default
output format is pdf, but you can specify any format supported by
Imagemagick convert program with '-f outformat'.
  (message asy-formatting...)
  (let ((out-file (if headers (car headers)))
(args (if (cdr headers) (mapconcat 'identity (cdr headers)  )))
(data-file (make-temp-file org-asy)))
(setq body (if (string-match ^\\([^:\\|:[^ ]\\) body)
   body
 (mapconcat (lambda (x) (substring x (if ( (length x) 1) 2 1)))
(org-split-string body \n)
\n)))
(cond 
 ((or htmlp latexp)
  (with-temp-file data-file (insert body))
  (message (concat asy -globalwrite -f pdf -o  out-file   args   
data-file))
  (shell-command (concat asy -globalwrite -f pdf -o  out-file   args  
 data-file))
  (format \n[[file:%s]]\n out-file))
 (t (concat
 \n#+BEGIN_EXAMPLE\n
 body (if (string-match \n$ body)  \n)
 #+END_EXAMPLE\n)

Don't forget to change accordingly org-export-blocks.

But that leads me to a question. I use (setq
org-export-latex-image-default-option ) in my .emacs. But, as it might
not be convenient for everyone, I would like to disable locally that
option in the asymptote's block. In fact, the code should take
precedence above export options : if I put 'size(5cm,0);' in my block, I
don't want no variable messing with that. Is there a way to do that ?

Last, but not least, I have something looking like a bug to report.
Sometimes, when I hit C-k in agenda view, it kills me 2 lines instead of
the one I am currently on. I can tell that kill-whole-line has nothing
to do with that. It scares me so much that I have to TAB first while in
agenda view in order to kill the item I want to make disappear. I use
6.26d but I could swear this bug has been on for ages (maybe 4.xx,
certainly 5.xx).

Thanks.

-- 
Nicolas Goaziou



___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode