Re: clock-table and hooking that into org-capture file+olp+datetree

2021-02-01 Thread Kyle Meyer
Christopher Causer writes:

> One snag I hit that I feel I should mention is what I believe to be a
> mistake in the documentation[1]. I was scratching my head as why
> org-clocktable-defaults wasn't working, but it was only when I brought
> up the inline documentation that I see that this probably is some
> vestigial variableand it has since moved to
> org-clock-clocktable-default-properties.

Despite their confusingly similar names as well as
org-clock-clocktable-default-properties not being documented in the
manual, they serve distinct purposes as far as I understand.
org-clock-clocktable-default-properties is about which properties are
inserted as part of the BEGIN line, while org-clocktable-defaults is the
set of defaults that are used when the value is not taken from the BEGIN
line.

For example, here's the result of calling
org-dynamic-block-insert-dblock and selecting "clocktable" with the
built-in values for both these options:

  * one
  :LOGBOOK:
  CLOCK: [2021-02-01 Mon 17:48]--[2021-02-01 Mon 19:48] =>  2:00
  
  #+BEGIN: clocktable :scope subtree :maxlevel 2
  #+CAPTION: Clock summary at [2021-02-02 Tue 00:08]
  | Headline | Time   |
  |--+|
  | *Total time* | *2:00* |
  |--+|
  | one  | 2:00   |
  #+END:

Redoing that after

  (setq org-clock-clocktable-default-properties '(:fileskip0 nil))

it looks like this

  * one
  :LOGBOOK:
  CLOCK: [2021-02-01 Mon 17:48]--[2021-02-01 Mon 19:48] =>  2:00
  
  #+BEGIN: clocktable :scope subtree :fileskip0 nil
  #+CAPTION: Clock summary at [2021-02-02 Tue 00:10]
  | Headline | Time   |
  |--+|
  | *Total time* | *2:00* |
  |--+|
  | one  | 2:00   |
  #+END:

Notice the ":fileskip0 nil" in the BEGIN line.

And redoing it once more with

  (setq org-clocktable-defaults
(plist-put org-clocktable-defaults :link t))

on top

  * one
  :LOGBOOK:
  CLOCK: [2021-02-01 Mon 17:48]--[2021-02-01 Mon 19:48] =>  2:00
  
  #+BEGIN: clocktable :scope subtree :fileskip0 nil
  #+CAPTION: Clock summary at [2021-02-02 Tue 00:11]
  | Headline | Time   |
  |--+|
  | *Total time* | *2:00* |
  |--+|
  | [[file:/tmp/scratch.org::*one][one]]  | 2:00   |
  #+END:

Notice that `:link t' has an effect, but it's not inserted in the BEGIN
line.



Re: [PATCH] capture: Fix handling of time range for :time-prompt

2021-02-01 Thread Kyle Meyer
Richard Lawrence writes:

> Kyle Meyer  writes:
>
>> Testing that against the cases in your initial report, I believe it
>> leads to the same results as your patch, so here's a cleaned-up version.
>
> I confirm that this cleaned up version works for me and gets the same
> results for my test cases. I think it should be applied (modulo one
> nitpick below). Are you willing to apply it, Kyle? I don't have commit
> rights myself.

Sure.  Thank you for testing it.

>> -  (cond ((and (or (not (boundp 'org-time-was-given))
>> -  (not org-time-was-given))
>> -  (not (= (time-to-days prompt-time) (org-today
>> - ;; Use 00:00 when no time is given for another
[...]
>> +  (if (and (or (not org-time-was-given))
>
> Nitpick: (or (not org-time-was-given)) is equivalent to (not 
> org-time-was-given)

Eh, thanks for spotting my sloppy conversion.  Fixed, though I ended up
rearranging things a bit more to avoid unnecessary `not's that were in
the original code.

Pushed (3e64d3475).

> As for this:
>
>> The original change came in b61ff117b (org-capture.el:
>> Set a correct time value with file+datetree+prompt, 2012-09-24), and I
>> believe the related thread is
>> .
>
> Thanks for the reference to this thread. I would like to be able to do
> exactly what Gregor mentioned there:
>
> - be prompted when capturing for the date and time / time range of the
>   event/appointment.
> - record the event/appointment in a date tree under the date entered at
>   the prompt
> - have a timestamp with the full time information entered at the prompt
>   appear in the resulting heading
>
> In short: enter the full date and time information *once*, and use this
> both to place the entry in the datetree and to give it a timestamp.

This isn't functionality I use myself, so I'm not sure I have things
straight in my head, but, yeah, sounds reasonable.
>
> As far as I can tell, that is not fully possible today, even with this
> patch. The reason is that time *range* information entered at the prompt
> generated by :time-prompt gets thrown away. The reason for *that* is
> that org-read-date is called with t as its to-time argument (the second
> argument), so that the date is returned in Emacs' internal time
> representation, which doesn't represent ranges.

Hmm.  Is it really about the TO-TIME argument?  If org-read-date is
called with TO-TIME as nil, doesn't it still throw away the end of the
range?

  (let ((org-time-was-given nil)
(org-end-time-was-given nil))
(org-read-date nil nil nil "Date for tree entry:"))
  ;; enter "3pm-4pm" => "2021-02-01 15:00"

Or, actually, it stores the end in org-end-time-was-given, but it does
that regardless of the TO-TIME argument.

  ;; TO-TIME nil
  (let ((org-time-was-given nil)
(org-end-time-was-given nil))
(org-read-date nil nil nil "Date for tree entry:")
org-end-time-was-given)
  ;; enter "3pm-4pm" => "16:00"

  ;; TO-TIME t
  (let ((org-time-was-given nil)
(org-end-time-was-given nil))
(org-read-date nil t nil "Date for tree entry:")
org-end-time-was-given)
  ;; enter "3pm-4pm" => "16:00"

And the org-time-stamp command uses a non-nil TO-TIME, formatting the
time stamp with something like this:

  ;; org-time-stamp
  (let* ((org-time-was-given nil)
 (org-end-time-was-given nil))
(org-insert-time-stamp
 (org-read-date nil t nil "Date for tree entry:")
 org-time-was-given
 nil nil nil
 (list org-end-time-was-given)))
  ;; enter "3pm-4pm" => "16:00" => <2021-02-01 Mon 15:00-16:00>

> Bastien's recommended solution back then was to use %^t and %^T in the
> capture template instead of %t and %T. The problem with that is that it
> requires entering the date twice: once at the prompt generated by
> :time-prompt, and once at the prompt to replace the %^T in the template.
>
> Could we instead save, say, :start-time and :end-time values in
> org-capture-plist after the :time-prompt, and use them to populate %T,
> %U, etc. in the template? This seems like the right solution to me, but
> it might require modifying org-read-date, which is a hairy piece of
> code. What do others think about this? Should I come up with a patch for
> this, or is there a different solution that the community and
> maintainers would prefer?

I don't have a good grasp of all the details here yet, but something in
that direction sounds worth considering to me.  And perhaps by carrying
along org-end-time-was-given, you won't need to modify org-read-date.

Thanks.



Re: Get =#+RESULTS= without re-evaluating source code block?

2021-02-01 Thread John Kitchin
I discovered that it matters a lot which block you cache. You have to
cache the long running block. I had put cache on the block with noweb
expansion, and then the long running block still runs every time. That
was a surprise to me, since nothing was changing in that block, so I
thought it would just use the cached result.


Greg Minshall  writes:

> John,
>
>> I tried this but it did not work for me.
>
> to be clear, caching means that the *first* time you execute, your
> reference will have to wait for the long-running computation to
> complete, but not during subsequent executions (unless the source block
> that performs the execution changes, in which case the reference will
> again have to wait).
>
> also, caching means that, after the first execution (ditto caveat) the
> source block *will no longer run*.  so, if there were any (other) side
> effects of running that source block, they will not happen.  (you could
> possibly split the side effect-producing code out of that block.)
>
> i'm not sure if this explains what did not work for you.
>
> cheers, Greg
>
>>
>>
>> On Wed, Jan 27, 2021 at 5:38 PM  wrote:
>>
>> > On Wed, Jan 27, 2021 at 05:14:43PM -0500, doltes wrote:
>> > > Get =#+RESULTS= without re-evaluating source code block?
>> > >
>> > > Let's suppose I have a code block which requires a long time to finish
>> > >
>> > > #+NAME: big-computation
>> > > #+begin_src bash
>> > > sleep 5 # Some computation which requires a long time to complete.
>> > > echo a
>> > > #+end_src
>> > >
>> > > #+RESULTS: big-computation
>> > > #+begin_example
>> > > a
>> > > #+end_example
>> > >
>> > > I want to use the results of that code block in other code blocks so I
>> > > use a =noweb= reference (see below.)
>> > >
>> > > #+begin_src bash :noweb yes
>> > > printf "%s\n" <>
>> > > #+end_src
>> > >
>> > > #+RESULTS:
>> > > #+begin_example
>> > > a
>> > >
>> > > #+end_example
>> > >
>> > > However, doing this (i.e. using a =noweb= reference) would make the
>> > > command to be evaluated whenever getting its results. I don't want
>> > > this, I want the =:noweb= reference to actually use the already
>> > > computed results.
>> > >
>> > > So, my question is: Is it possible to use the actual =#+RESULTS= code
>> > > block instead of always evaluating it when referencing the results
>> > > through a =:noweb= reference?
>> >
>> > Perhaps "Cache results of evaluation" (15.5 Evaluating Code Blocks,
>> > in the Interwebs here [1] is for you.
>> >
>> > In short, add a header argument :cache yes to your code block.
>> >
>> > Cheers
>> >
>> > [1] https://orgmode.org/org.html#Evaluating-Code-Blocks
>> >
>> >  - t
>> >
>> --
>> John
>>
>> ---
>> 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


--
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: word counts and org-mode drawers

2021-02-01 Thread Christopher Miles
<#secure method=pgpmime mode=sign>

Sharon Kimble  writes:

–—BEGIN PGP SIGNED MESSAGE–— Hash: SHA512

Hi folks.

How can I exempt an org-mode drawer, and its contents, from word counts please. 
I am using 'wc-mode' but I can't see how to do it.

Thanks Sharon.

I remember there is an extension called org-wc, did this thing. Suggest you to 
use that.

- – Debian 10.7, fluxbox 1.3.7, emacs 27.1.50, org 9.4.4 –—BEGIN PGP SIGNATURE–—

iQJPBAEBCgA5FiEELSc/6QwVBIYugJDbNoGAGQr4g1sFAmAYG6cbHGJvdWRpY2Nh 
c0Bza2ltYmxlLnBsdXMuY29tAAoJEDaBgBkK+INbCiMP+wU4WdnwbY9FEji4Ns56 
5nHDTCFolp1zvG3uuTWz2UIQl3dfyDiJeOHejFP/G77xNBXJrYFWXNb52TpvL436 
lvGGDsKewPaY+fRryxcXAq8EcOdI0AE3E62GJpX7iMAGXOGVGTjQY0Cpwi3owyHs 
R05UOiDcJJfNg+2oEK0sVL7HFk1Sg1o2vzbVI5Lxfj5/KR1ZuTJXkSvTiT1FgZBq 
j6+aXqlsqQvImINYxRHZ/oynU7PhuUFG5v8Gk6XHjERi2ia+BZWUev0AvrbYwCx0 
r0Zb5JPBg2gqBQ+Vk4PVd1cdz+n4jNGn+gZpJnxMF7rP4yzLjBKAwPzwnRiPgaEl 
OMfnn0x1NzdejLm3B363dOusTG/cwCIABFap9y3xgoRLpord+xBWywtJqgZhEqAs 
yAfE9erl0ON9UZD3gI2xspfsuRwIAkcjMQDQR8Ej2SAG1IClGVOEkECGV+tu7kSN 
lHWd/PCXXWQTaE9LR1QePUj6naRNqZCY1JfM2upoBXhcSB31r0v9K4zfnYM14qu3 
jS5NQasGKR74oSyboIlUyX+5M3r6Iowg57dGVM0JR3nB5O7XenFQv67iqWojYM4L 
jxCxFgflgh0ebRqxCEzMV5NiJiGfGAuGliwerB8l/lXkIjLuQ8ZxyjV0MbQe7BUk 
ngEgy0ZeKO8dG1z0GAgZfYkx =Ri0D –—END PGP SIGNATURE–—
-- 
[ stardiviner ]
   I try to make every word tell the meaning that I want to express.

   Blog: https://stardiviner.github.io/
   IRC(freenode): stardiviner, Matrix: stardiviner
   GPG: F09F650D7D674819892591401B5DF1C95AE89AC3


Re: word counts and org-mode drawers

2021-02-01 Thread Juan Manuel Macías
Hi,

Sharon Kimble  writes:

> How can I exempt an org-mode drawer, and its contents, from word counts
> please. I am using 'wc-mode' but I can't see how to do it.

It is not a solution with wc-mode, but maybe this simple function, based on
`count-words', can serve you. It counts the words in the buffer
excluding all drawers and their contents:

#+begin_src emacs-lisp
(defun my-count-words-in-org-buffer ()
  (interactive)
  (let ((words 0))
(save-excursion
  (save-restriction
(narrow-to-region (point-min) (point-max))
(goto-char (point-min))
(while (forward-word-strictly 1)
  (if (org-at-drawer-p)
  (re-search-forward ":END:")
(setq words (1+ words))
(message "Org buffer has %d word%s."
 words (if (= words 1) "" "s"
#+end_src

Best regards,

Juan Manuel 




Re: http links translated to html : target "_blank"

2021-02-01 Thread Juan Manuel Macías
Uwe Brauer  writes:

> That is odd (maybe my org version is a bit rusty (master june 2020)

It's strange...

It should work fine for you (as long as you set
`org-export-allow-bind-keywords' as non-nil)

You can also try `org-export-filter-link-functions' instead of
`...-final-output-functions'.

Anyway, if the `#+attr_latex' solution works for you, then all is fine.

Best regards,

Juan Manuel 



Re: http links translated to html : target "_blank"

2021-02-01 Thread Uwe Brauer
>>> "JMM" == Juan Manuel Macías  writes:

   > Hi Uwe,
   > Uwe Brauer  writes:

   >> Thanks that works, but not for link in a list. The only solution 
   >> seems to be this one

   > Doesn't it work for you in a list? I think it should work also in a
   > list. If I export this:

   > #+begin_src org
   >   ,#+BIND: org-export-filter-final-output-functions (correct-target-blank)
   >   ,#+begin_src emacs-lisp :exports results :results none
   > (defun correct-target-blank (text backend info)
   >  (when (org-export-derived-backend-p backend 'html)
   >(replace-regexp-in-string "%20target=%22_blank%22\""  "\" 
target=\"_blank\"" text)))
   >   ,#+end_src

   > + 
[[https://www.amazon.es/Rocketbook-Everlast-Notebook-riutilizzabile-Esecutivo/dp/B071Y3MSRK/ref=sr_1_5?__mk_es_ES=%C3%85M%C3%85%C5%BD%C3%95%C3%91=1=Rocketbook=1607847519=8-5=1
 target="_blank"][Book A4]]

   > + 
[[https://www.amazon.es/Rocketbook-Everlast-Notebook-riutilizzabile-Esecutivo/dp/B071Y3MSRK/ref=sr_1_5?__mk_es_ES=%C3%85M%C3%85%C5%BD%C3%95%C3%91=1=Rocketbook=1607847519=8-5=1
 target="_blank"][Book A4]]
   > #+end_src


   > I get this:

That is odd (maybe my org version is a bit rusty (master june 2020)
I obtain this:



https://www.amazon.es/Rocketbook-Everlast-Notebook-riutilizzabile-Esecutivo/dp/B071Y3MSRK/ref=sr_1_5?__mk_es_ES=%C3%85M%C3%85%C5%BD%C3%95%C3%91dchild=1keywords=Rocketbookqid=1607847519sr=8-5th=1%20target=%22_blank%22;>Book
 A4

https://www.amazon.es/Rocketbook-Everlast-Notebook-riutilizzabile-Esecutivo/dp/B071Y3MSRK/ref=sr_1_5?__mk_es_ES=%C3%85M%C3%85%C5%BD%C3%95%C3%91dchild=1keywords=Rocketbookqid=1607847519sr=8-5th=1%20target=%22_blank%22;>Book
 A4



smime.p7s
Description: S/MIME cryptographic signature


word counts and org-mode drawers

2021-02-01 Thread Sharon Kimble
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA512


Hi folks.

How can I exempt an org-mode drawer, and its contents, from word counts
please. I am using 'wc-mode' but I can't see how to do it.

Thanks
Sharon.
- -- 
Debian 10.7, fluxbox 1.3.7, emacs 27.1.50, org 9.4.4
-BEGIN PGP SIGNATURE-

iQJPBAEBCgA5FiEELSc/6QwVBIYugJDbNoGAGQr4g1sFAmAYG6cbHGJvdWRpY2Nh
c0Bza2ltYmxlLnBsdXMuY29tAAoJEDaBgBkK+INbCiMP+wU4WdnwbY9FEji4Ns56
5nHDTCFolp1zvG3uuTWz2UIQl3dfyDiJeOHejFP/G77xNBXJrYFWXNb52TpvL436
lvGGDsKewPaY+fRryxcXAq8EcOdI0AE3E62GJpX7iMAGXOGVGTjQY0Cpwi3owyHs
R05UOiDcJJfNg+2oEK0sVL7HFk1Sg1o2vzbVI5Lxfj5/KR1ZuTJXkSvTiT1FgZBq
j6+aXqlsqQvImINYxRHZ/oynU7PhuUFG5v8Gk6XHjERi2ia+BZWUev0AvrbYwCx0
r0Zb5JPBg2gqBQ+Vk4PVd1cdz+n4jNGn+gZpJnxMF7rP4yzLjBKAwPzwnRiPgaEl
OMfnn0x1NzdejLm3B363dOusTG/cwCIABFap9y3xgoRLpord+xBWywtJqgZhEqAs
yAfE9erl0ON9UZD3gI2xspfsuRwIAkcjMQDQR8Ej2SAG1IClGVOEkECGV+tu7kSN
lHWd/PCXXWQTaE9LR1QePUj6naRNqZCY1JfM2upoBXhcSB31r0v9K4zfnYM14qu3
jS5NQasGKR74oSyboIlUyX+5M3r6Iowg57dGVM0JR3nB5O7XenFQv67iqWojYM4L
jxCxFgflgh0ebRqxCEzMV5NiJiGfGAuGliwerB8l/lXkIjLuQ8ZxyjV0MbQe7BUk
ngEgy0ZeKO8dG1z0GAgZfYkx
=Ri0D
-END PGP SIGNATURE-



Re: http links translated to html : target "_blank"

2021-02-01 Thread Juan Manuel Macías
Hi Uwe,

Uwe Brauer  writes:

> Thanks that works, but not for link in a list. The only solution 
> seems to be this one

Doesn't it work for you in a list? I think it should work also in a
list. If I export this:

#+begin_src org
  ,#+BIND: org-export-filter-final-output-functions (correct-target-blank)
  ,#+begin_src emacs-lisp :exports results :results none
(defun correct-target-blank (text backend info)
 (when (org-export-derived-backend-p backend 'html)
(replace-regexp-in-string "%20target=%22_blank%22\""  "\" 
target=\"_blank\"" text)))
  ,#+end_src

+ 
[[https://www.amazon.es/Rocketbook-Everlast-Notebook-riutilizzabile-Esecutivo/dp/B071Y3MSRK/ref=sr_1_5?__mk_es_ES=%C3%85M%C3%85%C5%BD%C3%95%C3%91=1=Rocketbook=1607847519=8-5=1
 target="_blank"][Book A4]]

+ 
[[https://www.amazon.es/Rocketbook-Everlast-Notebook-riutilizzabile-Esecutivo/dp/B071Y3MSRK/ref=sr_1_5?__mk_es_ES=%C3%85M%C3%85%C5%BD%C3%95%C3%91=1=Rocketbook=1607847519=8-5=1
 target="_blank"][Book A4]]
#+end_src

I get this:

#+begin_src html

https://www.amazon.es/Rocketbook-Everlast-Notebook-riutilizzabile-Esecutivo/dp/B071Y3MSRK/ref=sr_1_5?__mk_es_ES=%C3%85M%C3%85%C5%BD%C3%95%C3%91dchild=1keywords=Rocketbookqid=1607847519sr=8-5th=1;
 target="_blank">Book A4

https://www.amazon.es/Rocketbook-Everlast-Notebook-riutilizzabile-Esecutivo/dp/B071Y3MSRK/ref=sr_1_5?__mk_es_ES=%C3%85M%C3%85%C5%BD%C3%95%C3%91dchild=1keywords=Rocketbookqid=1607847519sr=8-5th=1;
 target="_blank">Book A4

#+end_src

Using `#+attr_html:' is a simpler and cleaner solution, of course, but I think 
that
would not work with links within a paragraph.

Best regards / saludos,

Juan Manuel 



Re: Eval R-block: wrong-type-argument stringp nil

2021-02-01 Thread Loris Bennett
"Loris Bennett"  writes:

> Hi,
>
> I have just updated to 9.4.4-16-g0abd4a-elpa (and have patched ox.el with
> Eric Abrahamsen's patch available here at
> https://lists.gnu.org/archive/html/emacs-orgmode/2020-08/msg00039.html,
> but I don't think that that is relevant to the problem I am experiencing).
>
> I have an R block I evaluate at the beginning of each month.  Today I got
> the following error: 
>
>   Debugger entered--Lisp error: (wrong-type-argument stringp nil)
> file-directory-p(nil)
> 
> byte-code("\302\303\304\305\306\307\310\311\310\312&\011\210\302\313\304\314\306\303\315\316&\007\210\302\317\304\320\306\303\315\316&\007\210\302\321\304\322\306\303\315\316&\007\210\302\323\304\324\306\303\315\316&\007\210\302\325\304\326\306\303\315\316&\007\210\302\327\304\330\306\303\315\316&\007\210\302\331\304\332\306\327\315\316&\007\210\302\333\304\334\306\327\315\316&\007\210\302\335\304\336\306\303\315\337&\007\210\302\340\304\341\306\303\315\316&\007\210\302\342\304\343\306\303\306\344\306\345\315\316\306\346&\015\210\302\345\304\347\306\303\315\316&\007\210\302\350\304\351\306\303\306\352\315\316&\011\210\353\300\354\355\356DD\357\306\303\360\361\362\363&\011\210\353\301\354\355\364DD\365\306\303\360\361\362\366&\011\210\367\370\371\010!\"\210\367\370\371\372\373\010\"!\"\210\374\011!\204\350\0\375\303\376\377\011\"\201@\0#\210\353\201A\0\354\355\201B\0\
>  DD\201C\0\306\303\360\201D\0&\007\210\353\201E\0\354\355\201F\0\ 
> DD\201G\0\306\303\360\201D\0&\007\210\353\201H\0\354\355\201I\0\ 
> DD\201J\0\306\303\360\201D\0\362\201K\0&\011\210\353\201L\0\354\355\201M\0\ 
> DD\201N\0\306\303\360\201O\0\362\201P\0&\011\210\353\201Q\0\354\355\201R\0\ 
> DD\201S\0\306\303\360\201T\0&\007\207" [ess-lisp-directory ess-etc-directory 
> custom-declare-group ess nil "ESS: Emacs Speaks Statistics." :group languages 
> :link (info-link "(ESS)") (url-link "https://ess.r-project.org/;) ess-edit 
> "ESS: editing behavior, including comments/indentation." :prefix "ess-" 
> ess-proc "ESS: process control." ess-command "ESS: Commands for various 
> things." ess-help "ESS: help functions." ess-hooks "ESS: hooks for 
> customization." ess-S "ESS: S Languages." ess-SPLUS "ESS: S-PLUS Dialect of 
> S." ess-R "ESS: R Dialect of S." ess-Julia "ESS: Julia." "julia-" ess-sas 
> "ESS: SAS." ess-roxy "Mode for editing in-code Roxygen documentation." 
> convenience ess-extras tools "Extra utilities for ESS" ess-faces "Faces and 
> face options for ESS modes." faces custom-declare-variable funcall function 
> #f(compiled-function () #) "Directory containing 
> ess-site.el(c) and other ESS Lisp files." :type directory :package-version 
> (ess . "19.04") #f(compiled-function () #) "Location of 
> the ESS etc/ directory.\nThe ESS etc directory stores various auxiliary files 
> that are useful\nfor ESS, such as icons." (ess . "19.04") add-to-list 
> load-path directory-file-name expand-file-name "obsolete" file-directory-p 
> display-warning format "Could not find directory `ess-etc-directory': %s" 
> :error ess-imenu-use-p #f(compiled-function () #) 
> "Non-nil means use imenu facility.\nThis value can be overridden by 
> mode-specific variables, such\nas `ess-imenu-use-S'." boolean ess-imenu-use-S 
> #f(compiled-function () #) "Non-nil means include an 
> Imenu menu item in S buffers." ess-auto-width-visible #f(compiled-function () 
> #) "When non-nil, echo width setting in the inferior 
> buffer.\nSee `ess-auto-width'. Be warned that ESS can set the width a\nlot." 
> (ess . "19.04") ess-auto-width #f(compiled-function () #) 
> "When non-nil, set the width option when the window configuration 
> changes.\nWhen 'frame, set the width to the frame width. When 'window, 
> set\nthe width to the window width. If an integer, set the width to\nthat 
> integer. If it's a negative integer, set the width to the\nwindow's width 
> minus that number. Anything else is treated as\n'window." (choice (const :tag 
> "Do nothing" :value nil) (const :tag "Frame width" :value frame) (const :tag 
> "Window width" :value window) (integer :tag "Integer value")) (ess . "19.04") 
> ess-handy-commands #f(compiled-function () #) "An alist 
> of custom ESS commands.\nThese are available for call by function 
> `ess-handy-commands' and\n`ess-smart-comma' function." alist] 14)
> require(ess-custom)
> byte-code("\300\301!\210\300\302!\210\300\303!\210\300\304!\207" [require 
> cl-lib comint project ess-custom] 2)
> require(ess-utils)
> byte-code("\300\301!\210\300\302!\207" [require ess-utils cl-generic] 2)
> require(ess)
> 
> byte-code("\300\301!\210\300\302!\210\303\304\305\306\307DD\310\311\312\313\314&\007\207"
>  [require ess ess-inf custom-declare-variable ess-mode-hook funcall function 
> #f(compiled-function () #) "Hook for customizing ESS each 
> time it is entered." :group ess-hooks :type hook] 8)
> require(ess-mode)
> 
> 

Re: http links translated to html : target "_blank"

2021-02-01 Thread Uwe Brauer
>>> "T" == TEC   writes:

> Uwe Brauer  writes:

>> Aha, thanks, it works, sometimes:
>> 
>> The first two work, the last two not. Not sure what to think about it

> Mmm, you need to have #+attr_html immediately followed by the link on
> the next line.

> It would be nice if there was a way to set these attributes inline with
> the link, but AFAIK that's not currently possible.

Right so this works


#+attr_html: :target _blank
[[https://www.zeit.de/wissen/gesundheit/2020-11/coronavirus-aerosols-infection-risk-hotspot-interiors][Risk
  simulator]]


#+attr_html: :target _blank
[[https://www.mpic.de/4747361/risk-calculator][Risk simulator with more 
details]]

  1. RocketBook


 + Book A4
   #+attr_html: :target _blank
   
[[https://www.amazon.es/Rocketbook-Everlast-Notebook-riutilizzabile-Esecutivo/dp/B071Y3MSRK/ref=sr_1_5?__mk_es_ES=%C3%85M%C3%85%C5%BD%C3%95%C3%91=1=Rocketbook=1607847519=8-5=1][Book
 A4]]

 a. Book A4
#+attr_html: :target _blank

[[https://www.amazon.es/Rocketbook-Everlast-Notebook-riutilizzabile-Esecutivo/dp/B071Y3MSRK/ref=sr_1_5?__mk_es_ES=%C3%85M%C3%85%C5%BD%C3%95%C3%91=1=Rocketbook=1607847519=8-5=1][Book
 A4]]




smime.p7s
Description: S/MIME cryptographic signature


Re: http links translated to html : target "_blank"

2021-02-01 Thread Uwe Brauer
>>> "JMM" == Juan Manuel Macías  writes:

Hola Juan

> I think the problem is how the exporter understands the url string.
> Note that this:

> @@html:https://www.mpic.de/4747361/risk-calculator; 
> target="_blank">Simulador de riesgo con más detalle@@

> [[https://www.mpic.de/4747361/risk-calculator target="_blank"][Simulador de 
> riesgo con más detalle]]

> is exported like this:

> 
> https://www.mpic.de/4747361/risk-calculator; 
> target="_blank">Simulador de riesgo con más detalle
> 

> 
>  href="https://www.mpic.de/4747361/risk-calculator%20target=%22_blank%22;>Simulador
>  de riesgo con más detalle
> 

> The second link is wrong formatted. A dirty solution could be:

> #+BIND: org-export-filter-final-output-functions (correct-target-blank)
> #+begin_src emacs-lisp :exports results :results none

>   (defun correct-target-blank (text backend info)
> (when (org-export-derived-backend-p backend 'html)
>   (replace-regexp-in-string "%20target=%22_blank%22\""  "\" 
> target=\"_blank\"" text)))
> #+end_src

> Best regards,

Thanks that works, but not for link in a list. The only solution 
seems to be this one



#+attr_html: :target _blank
[[https://www.zeit.de/wissen/gesundheit/2020-11/coronavirus-aerosols-infection-risk-hotspot-interiors][Risk
  simulator]]


#+attr_html: :target _blank
[[https://www.mpic.de/4747361/risk-calculator][Risk simulator with more 
details]]

  1. RocketBook


 + Book A4
   #+attr_html: :target _blank
   
[[https://www.amazon.es/Rocketbook-Everlast-Notebook-riutilizzabile-Esecutivo/dp/B071Y3MSRK/ref=sr_1_5?__mk_es_ES=%C3%85M%C3%85%C5%BD%C3%95%C3%91=1=Rocketbook=1607847519=8-5=1][Book
 A4]]

 a. Book A4
#+attr_html: :target _blank

[[https://www.amazon.es/Rocketbook-Everlast-Notebook-riutilizzabile-Esecutivo/dp/B071Y3MSRK/ref=sr_1_5?__mk_es_ES=%C3%85M%C3%85%C5%BD%C3%95%C3%91=1=Rocketbook=1607847519=8-5=1][Book
 A4]]




smime.p7s
Description: S/MIME cryptographic signature


Re: http links translated to html : target "_blank"

2021-02-01 Thread TEC


Uwe Brauer  writes:

> Aha, thanks, it works, sometimes:
>
> The first two work, the last two not. Not sure what to think about it

Mmm, you need to have #+attr_html immediately followed by the link on
the next line.

It would be nice if there was a way to set these attributes inline with
the link, but AFAIK that's not currently possible.

--
Timothy



Re: http links translated to html : target "_blank"

2021-02-01 Thread Uwe Brauer
>>> "T" == TEC   writes:

> Uwe Brauer  writes:

>> I need to produce a html file, with links opening new tabs (pages) as in 
>> 
>> https://apps.apple.com/es/app/radar-covid/id1520443509; 
>> target="_blank">Descarga Directa
>> 
>> However 
>> 
>> [[https://www.mpic.de/4747361/risk-calculator target="_blank"][Simulador de 
>> riesgo con más detalle]]
>> 
>> Did not work
>> 
>> Any ideas?

> Have you tried:
> #+attr_html: :target _blank

Aha, thanks, it works, sometimes:

The first two work, the last two not. Not sure what to think about it

#+attr_html: :target _blank
[[https://www.zeit.de/wissen/gesundheit/2020-11/coronavirus-aerosols-infection-risk-hotspot-interiors][Risk
  simulator]]


#+attr_html: :target _blank
[[https://www.mpic.de/4747361/risk-calculator][Risk simulator with more 
details]]

  1. RocketBook

#+attr_html: :target _blank
 + 
[[https://www.amazon.es/Rocketbook-Everlast-Notebook-riutilizzabile-Esecutivo/dp/B071Y3MSRK/ref=sr_1_5?__mk_es_ES=%C3%85M%C3%85%C5%BD%C3%95%C3%91=1=Rocketbook=1607847519=8-5=1][Book
 A4]]


#+attr_html: :target _blank
 a. 
[[https://www.amazon.es/Rocketbook-Everlast-Notebook-riutilizzabile-Esecutivo/dp/B071Y3MSRK/ref=sr_1_5?__mk_es_ES=%C3%85M%C3%85%C5%BD%C3%95%C3%91=1=Rocketbook=1607847519=8-5=1][Book
 A4]]




smime.p7s
Description: S/MIME cryptographic signature


Re: emphasizing source code words

2021-02-01 Thread TEC


Luca Ferrari  writes:

> Hi all,
> I'm using org to produce beamer presentations, and I've a lot of src blocks.
> Is there any way to emphasize words or lines within such blocks? For
> example to place the command arguments in bold face?
>
> Thanks,
> Luca

I'd have to look at the manual for specifics, but I know that you can
highlight lines when using the minted backend.

Hope that might be of some help,

--
Timothy.



emphasizing source code words

2021-02-01 Thread Luca Ferrari
Hi all,
I'm using org to produce beamer presentations, and I've a lot of src blocks.
Is there any way to emphasize words or lines within such blocks? For
example to place the command arguments in bold face?

Thanks,
Luca



Re: http links translated to html : target "_blank"

2021-02-01 Thread TEC


Uwe Brauer  writes:

> I need to produce a html file, with links opening new tabs (pages) as in 
>
> https://apps.apple.com/es/app/radar-covid/id1520443509; 
> target="_blank">Descarga Directa
>
> However 
>
>  [[https://www.mpic.de/4747361/risk-calculator target="_blank"][Simulador de 
> riesgo con más detalle]]
>
> Did not work
>
> Any ideas?

Have you tried:
#+attr_html: :target _blank

That may work.

--
Timothy



Re: http links translated to html : target "_blank"

2021-02-01 Thread Juan Manuel Macías
I think the problem is how the exporter understands the url string.

Note that this:

@@html:https://www.mpic.de/4747361/risk-calculator; 
target="_blank">Simulador de riesgo con más detalle@@

[[https://www.mpic.de/4747361/risk-calculator target="_blank"][Simulador de 
riesgo con más detalle]]

is exported like this:


https://www.mpic.de/4747361/risk-calculator; target="_blank">Simulador 
de riesgo con más detalle



https://www.mpic.de/4747361/risk-calculator%20target=%22_blank%22;>Simulador
 de riesgo con más detalle


The second link is wrong formatted. A dirty solution could be:

#+BIND: org-export-filter-final-output-functions (correct-target-blank)
#+begin_src emacs-lisp :exports results :results none
  (defun correct-target-blank (text backend info)
(when (org-export-derived-backend-p backend 'html)
  (replace-regexp-in-string "%20target=%22_blank%22\""  "\" 
target=\"_blank\"" text)))
#+end_src

Best regards,

Juan Manuel

Uwe Brauer  writes:

> Hi
>
> I need to produce a html file, with links opening new tabs (pages) as in
>
> https://apps.apple.com/es/app/radar-covid/id1520443509; 
> target="_blank">Descarga Directa
>
> However
>
>  [[https://www.mpic.de/4747361/risk-calculator target="_blank"][Simulador de 
> riesgo con más detalle]]
>
> Did not work
>
> Any ideas?
>
> Thanks and regards
>
> Uwe Brauer
>
>



Eval R-block: wrong-type-argument stringp nil

2021-02-01 Thread Loris Bennett
Hi,

I have just updated to 9.4.4-16-g0abd4a-elpa (and have patched ox.el with
Eric Abrahamsen's patch available here at
https://lists.gnu.org/archive/html/emacs-orgmode/2020-08/msg00039.html,
but I don't think that that is relevant to the problem I am experiencing).

I have an R block I evaluate at the beginning of each month.  Today I got
the following error: 

  Debugger entered--Lisp error: (wrong-type-argument stringp nil)
file-directory-p(nil)

byte-code("\302\303\304\305\306\307\310\311\310\312&\011\210\302\313\304\314\306\303\315\316&\007\210\302\317\304\320\306\303\315\316&\007\210\302\321\304\322\306\303\315\316&\007\210\302\323\304\324\306\303\315\316&\007\210\302\325\304\326\306\303\315\316&\007\210\302\327\304\330\306\303\315\316&\007\210\302\331\304\332\306\327\315\316&\007\210\302\333\304\334\306\327\315\316&\007\210\302\335\304\336\306\303\315\337&\007\210\302\340\304\341\306\303\315\316&\007\210\302\342\304\343\306\303\306\344\306\345\315\316\306\346&\015\210\302\345\304\347\306\303\315\316&\007\210\302\350\304\351\306\303\306\352\315\316&\011\210\353\300\354\355\356DD\357\306\303\360\361\362\363&\011\210\353\301\354\355\364DD\365\306\303\360\361\362\366&\011\210\367\370\371\010!\"\210\367\370\371\372\373\010\"!\"\210\374\011!\204\350\0\375\303\376\377\011\"\201@\0#\210\353\201A\0\354\355\201B\0\
 DD\201C\0\306\303\360\201D\0&\007\210\353\201E\0\354\355\201F\0\ 
DD\201G\0\306\303\360\201D\0&\007\210\353\201H\0\354\355\201I\0\ 
DD\201J\0\306\303\360\201D\0\362\201K\0&\011\210\353\201L\0\354\355\201M\0\ 
DD\201N\0\306\303\360\201O\0\362\201P\0&\011\210\353\201Q\0\354\355\201R\0\ 
DD\201S\0\306\303\360\201T\0&\007\207" [ess-lisp-directory ess-etc-directory 
custom-declare-group ess nil "ESS: Emacs Speaks Statistics." :group languages 
:link (info-link "(ESS)") (url-link "https://ess.r-project.org/;) ess-edit 
"ESS: editing behavior, including comments/indentation." :prefix "ess-" 
ess-proc "ESS: process control." ess-command "ESS: Commands for various 
things." ess-help "ESS: help functions." ess-hooks "ESS: hooks for 
customization." ess-S "ESS: S Languages." ess-SPLUS "ESS: S-PLUS Dialect of S." 
ess-R "ESS: R Dialect of S." ess-Julia "ESS: Julia." "julia-" ess-sas "ESS: 
SAS." ess-roxy "Mode for editing in-code Roxygen documentation." convenience 
ess-extras tools "Extra utilities for ESS" ess-faces "Faces and face options 
for ESS modes." faces custom-declare-variable funcall function 
#f(compiled-function () #) "Directory containing 
ess-site.el(c) and other ESS Lisp files." :type directory :package-version (ess 
. "19.04") #f(compiled-function () #) "Location of the ESS 
etc/ directory.\nThe ESS etc directory stores various auxiliary files that are 
useful\nfor ESS, such as icons." (ess . "19.04") add-to-list load-path 
directory-file-name expand-file-name "obsolete" file-directory-p 
display-warning format "Could not find directory `ess-etc-directory': %s" 
:error ess-imenu-use-p #f(compiled-function () #) "Non-nil 
means use imenu facility.\nThis value can be overridden by mode-specific 
variables, such\nas `ess-imenu-use-S'." boolean ess-imenu-use-S 
#f(compiled-function () #) "Non-nil means include an Imenu 
menu item in S buffers." ess-auto-width-visible #f(compiled-function () 
#) "When non-nil, echo width setting in the inferior 
buffer.\nSee `ess-auto-width'. Be warned that ESS can set the width a\nlot." 
(ess . "19.04") ess-auto-width #f(compiled-function () #) 
"When non-nil, set the width option when the window configuration 
changes.\nWhen 'frame, set the width to the frame width. When 'window, set\nthe 
width to the window width. If an integer, set the width to\nthat integer. If 
it's a negative integer, set the width to the\nwindow's width minus that 
number. Anything else is treated as\n'window." (choice (const :tag "Do nothing" 
:value nil) (const :tag "Frame width" :value frame) (const :tag "Window width" 
:value window) (integer :tag "Integer value")) (ess . "19.04") 
ess-handy-commands #f(compiled-function () #) "An alist of 
custom ESS commands.\nThese are available for call by function 
`ess-handy-commands' and\n`ess-smart-comma' function." alist] 14)
require(ess-custom)
byte-code("\300\301!\210\300\302!\210\300\303!\210\300\304!\207" [require 
cl-lib comint project ess-custom] 2)
require(ess-utils)
byte-code("\300\301!\210\300\302!\207" [require ess-utils cl-generic] 2)
require(ess)

byte-code("\300\301!\210\300\302!\210\303\304\305\306\307DD\310\311\312\313\314&\007\207"
 [require ess ess-inf custom-declare-variable ess-mode-hook funcall function 
#f(compiled-function () #) "Hook for customizing ESS each 
time it is entered." :group ess-hooks :type hook] 8)
require(ess-mode)

byte-code("\301\302!\210\301\303!\210\301\304!\210\301\305!\210\301\306!\210\301\307!\210\301\310!\210\301\311!\210\301\312!\210\301\313!\210\301\314!\210\010\315Y\2036\0\301\316!\210\317\320\321\322\323\324\325\326\327\330&\011\207"
 

http links translated to html : target "_blank"

2021-02-01 Thread Uwe Brauer


Hi 

I need to produce a html file, with links opening new tabs (pages) as in 

https://apps.apple.com/es/app/radar-covid/id1520443509; 
target="_blank">Descarga Directa

However 

 [[https://www.mpic.de/4747361/risk-calculator target="_blank"][Simulador de 
riesgo con más detalle]]

Did not work

Any ideas?

Thanks and regards

Uwe Brauer