Re: Lisp error: (void-function org-element-keyword-parser)

2021-10-25 Thread Nick Dokos
Eric S Fraga  writes:

> On Thursday, 21 Oct 2021 at 20:54, William Denton wrote:
>> With my usual set up, I can get things working except that any Org files
>> initially loaded up aren't recognized as Org, but if I run =M-x org-mode= it 
>> all
>> kicks in.  
>
> For the record, I have had this or something very similar for a very
> long time (years) now.  All my org-agenda-files which get loaded during
> my initialization, when I set up the appointment handling, are in org
> mode but none of the in-file settings have been applied.  I brought this
> up on the list a long time ago and was told that this was the expected
> behaviour.
>
> Are you sure they are not recognised as org files or is it that your
> specific settings are ignored?

Hi Eric,

I'm pretty sure that that should *NOT* be the case: setting the mode
on the file consists of calling `org-mode'; that calls
`org-set-regexps-and-options' which loops over all the in-buffer
options and sets them.

When you do `C-c C-c' on an in-buffer option after the initialization,
that calls `org-mode-restart' which calls `org-mode' which calls
`org-set-regexps-and-options'.

So the only time an in-buffer setting would not be recognized is
after you've added it to the buffer and before you've restarted Org mode
on it (or closed and reopened which does pretty much the same thing).
If you have unrecognized settings when you open a file and the file is
already in Org mode, that needs to be investigated: it's very much
*un*expected AFAICT.

I haven't gone back to find the previous discussion, but if you can find
it, you might want to resurrect it.

-- 
Nick

"There are only two hard problems in computer science: cache invalidation, 
naming things, and off-by-one errors." -Martin Fowler




Re: Inequalities in math blocks

2021-10-11 Thread Nick Dokos
Rudolf Adamkovič  writes:

> Max Nikulin  writes:
>
>> Though I am a bit surprised that Org did not replace characters to
>>   and  during export. Perhaps, it is possible to define a
>> filter. 
>
> That makes sense, and thank you for the explanation. Ignoring the dead
> link in the Org manual, I wonder how this bug can even exist in Org
> after 15+ years of development. Some people, including the author of
> TeX himself, write TeX without unnecessary whitespace. Strange! Either
> way, rearranging bullet points should never break math without any
> visual sign inside of Emacs. Thus, this represents a bug in Org. R+

No, it does not. Org mode just passes LaTeX directly to MathJax
without changing anything. If you want to blame somebody, you can
blame HTML for choosing < and > as its delimiters: see

   http://docs.mathjax.org/en/latest/input/tex/html.html#html-special-characters

-- 
Nick




Re: 9.5: coping with loss of ditaa.jar

2021-10-11 Thread Nick Dokos
Tim Cross  writes:

> Another alternative which I just found is the ditaa version on github,
> which has SVG support. See https://github.com/stathissideris/ditaa. If
> you click on the 'release' link on the right, there is the most recent
> release, which includes a link to a standalone ditaa.jar file.
>
> I've not tried this version, but suspect it will work fine (assuming
> they use semantic versioning, which indicates the API has not
> changed). 
>
>
>

Perfect! Thank you for pointing that out.

I downloaded that, installed java-11-openjdk from the Fedora repos and
tried the standard example:

--8<---cut here---start->8---
#+begin_src ditaa :file example.svg :results file drawer
++   +---++---+
|| --+ ditaa +--> |   |
|  Text  |   +---+|diagram|
|Document|   |!magic!||   |
| {d}|   |   ||   |
+---++   +---++---+
: ^
|   Lots of work  |
+-+
#+end_src

#+RESULTS:
:results:
[[file:example.svg]]
:end:
--8<---cut here---end--->8---

It worked perfectly on Fedora 34.

Thanks!
-- 
Nick

"There are only two hard problems in computer science: cache
invalidation, naming things, and off-by-one errors." -Martin Fowler




Re: Switching to new Git repositories

2021-09-23 Thread Nick Dokos
FWIW, I get

$ git remote -v
upstreamhttps://git.savannah.gnu.org/git/emacs/org-mode.git (fetch)
upstreamhttps://git.savannah.gnu.org/git/emacs/org-mode.git (push)

$ git tag | wc -l
386

Maybe do

$ git remote update
$ git rebase

and try again?

-- 
Nick

"There are only two hard problems in computer science: cache
invalidation, naming things, and off-by-one errors." -Martin Fowler




Re: org-table-toggle-column-width turn on for either all tables

2021-09-10 Thread Nick Dokos
Uwe Brauer  writes:

> Hi
>
> I find 
>
> (org-table-toggle-column-width  ARG)
>
> Very very useful, but in the current org version I have to toggle this
> for each and every table. 
>
> So I was wondering, when opening an org file 
>
> 1. Would it be possible to have all tables in an org-file have their
>column toggled.

You mean shrunk? If so, there is a #+STARTUP option for that:

#+STARTUP: shrink

>
> 2. Or with a special variable for single tables, just some of them?
>
I don't know of any such variable.

-- 
Nick

"There are only two hard problems in computer science: cache
invalidation, naming things, and off-by-one errors." -Martin Fowler




Re: [PATCH] Fix match/maxlevel conflict in colview dynblock

2021-08-31 Thread Nick Dokos
Timothy  writes:

> Hi Nick,
>
> Thanks for reporting this issue here, and providing a patch. Unfortunately the
> “main maintainers” seem to be rather busy as of late, leaving you hanging for
> quite a while. I’ve had a look at the issue and your patch, and it the issue
> seems clear, and your patch small and straightforward enough that I feel
> confident pushing it should be fine :) it’s now on master with a small tweak 
> to
> the commit message.
>
> Thanks for your efforts.
>

Hi Timothy,

Thanks and no worries! And thanks for working through the backlog!

--
Nick

"There are only two hard problems in computer science: cache
invalidation, naming things, and off-by-one errors." -Martin Fowler




Re: Org table: emphasizing calculated cell

2021-08-27 Thread Nick Dokos
Jarmo Hurri  writes:

> Greetings Norwid.
>
> Norwid Behrnd  writes:
>
>> try extending the format of the table formula with asterisks, i.e.
>>
>> ```
>> | quantity |  value |
>> |--+|
>> | A|  1 |
>> | B|  3 |
>> |--+|
>> | *C*  | *0.33* |
>>
>> #+TBLFM:  @4$2=@-2/@-1; *%.2f*
>> ```
>>
>> Subsequently, issue the call ```C-c *``` for an update while the
>> cursor is within the table.  This approach works well enough for me
>> (equally for emphasis with enclosing forward slashes, or underscores)
>> in Emacs' native display (backed by elpa-org 9.4.0) as well as for a
>> subsequent export into .html and display (e.g., in Firefox), or .tex.
>
> Excellent, this is a working solution for the basic case. Much
> appreciated!
>
> This solution seems to change the contents of a cell, not only its
> formatting. So the following, where I try to increase the value of "C"
> by one, leads to an error:
>
> ```
> | quantity | value  |
> |--+|
> | A| 1  |
> | B| 3  |
> |--+|
> | *C*  | *0.33* |
> | D| #ERROR |
>
> #+TBLFM: @4$2=@-2/@-1; *%.2f*::@5$2=@-1+1
> ```
>
> I wonder if there is a way around this effect?
>

The error here is that `*0.33*' is no longer a string that can be converted to 
a number,
so the calculator barfs.

TUrn on formula debugging with `C-c {' and try evaluating it.

-- 
Nick

"There are only two hard problems in computer science: cache
invalidation, naming things, and off-by-one errors." -Martin Fowler




Re: ob-lilypond.el doesn't generate midi files

2021-08-27 Thread Nick Dokos
Michael Maurer  writes:

> On Thu, 26 Aug 2021 at 21:54, Nick Dokos  wrote:

>>
>> Michael Maurer  writes:
>>
>> > On Thu, 26 Aug 2021 at 15:03, Jonathan Gregory  wrote:
>> >>
>> >> Hi
>> >>
>> >> On 26 Aug 2021, Michael Maurer wrote:
>> >>
>> >> > I've installed lilypond and customized ob-lilypond to use the
>> >> > appropriate helper programs, but although it generates & shows
>> >> > pdfs just fine, generating a midi file it does not. I execute
>> >> > tangle on the codeblock, and all I get is "No midi file
>> >> > generated so can't play!". org-version 9.4.6 emacs 27.2 Win 10
>> >>
>> >> Can you also send a MWE of the code you're using to generate the
>> >> score?
>> >>
>> >
>> > I used a test file I copied over from Frescobaldi
>> >
>> > #+begin_src lilypond :file test.pdf
>> > \version "2.18.2"
>> > \score {
>> > \drums {
>> >   \time 2/4
>> >   sn16 sn8 sn16 sn8 sn8:32 ~
>> >   sn8 sn8 sn4:32 ~
>> >   sn4 sn8 sn16 sn16
>> >   sn4 r4
>> > }
>> >   \layout { }
>> >   \midi { }
>> > }
>> > #+end_src
>> >
>> > In Frescobaldi this gets me both midi-output and pdf. In Emacs with
>> > org it does say "Midi output to test.midi", but then there's that "no
>> > midi file generated" message.
>> >
>>
>> What happens if you save the contents of the source block into a file
>> and run lilypond on the file from the command line?
>>
>
> Both pdf and midi files get generated. Btw, ob-lilypond does generate
> the midi file as well, it just doesn't want to play it/recognize it.
> Maybe it's related to what helper app I've configured to open it? (but
> why that doesn't make sense, it's vlc btw).
>
>

Oh, I thought that it did not generate a midi file at all. So you are
saying that the midi file *is* produced and you *can* play it from the
command line with vlc, correct?

If that's the case, check the value of the variable
`org-babel-lilypond-midi-command' and see what happens when you invoke
that command on the midi file. In my case, the command is `xdg-open'
(I'm using Gnome on Fedora 33) and it opens Banshee to play it which
fails because of missing codecs. I installed the missing codecs and
`xdg-open foo.midi' sends the file to Banshee which can play it fine.

Also check if `org-babel-lilypond-arrange-mode' is t or nil: behavior
is very different depending on that.

Final thought: `xdg-open' starts whatever app it is supposed to run
in the background and returns immediately. That may cause problems with
babel. I still don't get anything when processing the file in babel.

-- 
Nick

"There are only two hard problems in computer science: cache
invalidation, naming things, and off-by-one errors." -Martin Fowler




Re: ob-lilypond.el doesn't generate midi files

2021-08-26 Thread Nick Dokos
Michael Maurer  writes:

> On Thu, 26 Aug 2021 at 15:03, Jonathan Gregory  wrote:
>>
>> Hi
>>
>> On 26 Aug 2021, Michael Maurer wrote:
>>
>> > I've installed lilypond and customized ob-lilypond to use the
>> > appropriate helper programs, but although it generates & shows
>> > pdfs just fine, generating a midi file it does not. I execute
>> > tangle on the codeblock, and all I get is "No midi file
>> > generated so can't play!". org-version 9.4.6 emacs 27.2 Win 10
>>
>> Can you also send a MWE of the code you're using to generate the
>> score?
>>
>
> I used a test file I copied over from Frescobaldi
>
> #+begin_src lilypond :file test.pdf
> \version "2.18.2"
> \score {
> \drums {
>   \time 2/4
>   sn16 sn8 sn16 sn8 sn8:32 ~
>   sn8 sn8 sn4:32 ~
>   sn4 sn8 sn16 sn16
>   sn4 r4
> }
>   \layout { }
>   \midi { }
> }
> #+end_src
>
> In Frescobaldi this gets me both midi-output and pdf. In Emacs with
> org it does say "Midi output to test.midi", but then there's that "no
> midi file generated" message.
>

What happens if you save the contents of the source block into a file
and run lilypond on the file from the command line?

-- 
Nick

"There are only two hard problems in computer science: cache
invalidation, naming things, and off-by-one errors." -Martin Fowler




Re: I can't find "org-latex-toc-command"

2021-08-25 Thread Nick Dokos
Ypo  writes:

> Hi. I was trying to add a break-line after the TOC. I've search for
> some help, and I found this: (setq org-latex-toc-command
> "\\tableofcontents \\clearpage"). But, it seems
> org-latex-toc-command doesn't exist anymore? I can't find it, but
> since I am quite newbie, I am not sure if it's there or not.
>

It's there AFAICT: it's a variable defined in `ox-latex.el'.
Maybe you looked for it as a function with `C-h f ...' rather
than `C-h v ...'? Or maybe `ox-latex' is not loaded for some
unfathomable reason?

-- 
Nick

"There are only two hard problems in computer science: cache
invalidation, naming things, and off-by-one errors." -Martin Fowler




Re: Repeating task not repeating

2021-08-18 Thread Nick Dokos
Do `M-x org-lint` on your agenda files. It may not solve this problem, but
it's always worth trying first, since it's so easy - and it may find other
problems that you are unaware of.
-- 
Nick

"There are only two hard problems in computer science: cache
invalidation, naming things, and off-by-one errors." -Martin Fowler




Re: Bug: refreshing agenda moves all lines up [9.4.6 (9.4.6-12-gdcc3a8-elpa @ /Users/pu/.emacs.d/elpa/org-20210802/)]

2021-08-10 Thread Nick Dokos
p...@disroot.org writes:

> Hello everybody,
>
> my first bug report so I hope this is useful.
>
> Since the last org-mode update, whenever I press "r" to refresh my customised 
> agenda view (org-agenda-redo),
> the whole buffer moves up by 1 line, which hasn't been the case until now.
>

This was probably a bad interaction with `visual-line-mode', although
what exactly that means is not clear to me: see


https://emacs.stackexchange.com/questions/67999/refresh-org-agenda-org-agenda-redo-scrolls-buffer-by-1-line

for some more details.

-- 
Nick

"There are only two hard problems in computer science: cache
invalidation, naming things, and off-by-one errors." -Martin Fowler




Re: Bug: org-clock-report tag matching seems to be broken [9.1.9 (release_9.1.9-65-g5e4542 @ c:/Users/user/emacs-26.3-x86_64/share/emacs/26.3/lisp/org/)]

2021-08-10 Thread Nick Dokos
"Lewalder, Sebastian" via "General discussions about Org-mode." 
 writes:

> I recently updated my packages and after the update the clock tables are
>
> not working anymore. I reran an report from june and here too the
>
> matching didn't work anymore.
>
> #+BEGIN: clocktable :scope file :maxlevel 4 :match "traj"

IIUC, the problem is the presence of both `maxlevel' and `match' specifiers:
the code does not handle that case correctly.

You might want to try a patch that I submitted some time ago to fix that:

https://orgmode.org/list/87h7h0w5nz@alphaville.usersys.redhat.com/

I believe this is the second time that this problem has been reported
to the mailing list since then (plus there was a question about the
same problem on Emacs SE), so if you can review it and/or try it out,
that might help to get it reviewed and merged.

If anybody else is willing to review it as well, I'd appreciate it.

Thanks!
--
Nick

>
> #+CAPTION: Clock summary at [2021-08-06 Fr 08:48]
>
> | Headline  | Time   |  |  |  |
>
> |---++--+--+--|
>
> | *Total time*  | *2:33* |  |  |  |
>
> |---++--+--+--|
>
> | 2021  | 2:33   |  |  |  |
>
> | \_  2021-06 Juni  || 2:33 |  |  |
>
> | \_2021-06-01 Dienstag ||  | 2:33 |  |
>
> | \_  Trajectory calc   ||  |  | 0:41 |
>
> | \_  Concept work  ||  |  | 1:52 |
>
> #+END:
>
> * 2021
>
> ** 2021-06 Juni
>
> *** 2021-06-01 Dienstag
>
>  Trajectory calc   :traj:
>
>  :LOGBOOK:
>
>  CLOCK: [2021-06-01 Di 11:40]--[2021-06-01 Di 12:21] =>  0:41
>
>  :END:
>
>  Concept work  
> :concept:
>
>  :LOGBOOK:
>
>  CLOCK: [2021-06-01 Di 13:10]--[2021-06-01 Di 13:24] =>  0:14
>
>  CLOCK: [2021-06-01 Di 12:21]--[2021-06-01 Di 12:41] =>  0:20
>
>  CLOCK: [2021-06-01 Di 10:22]--[2021-06-01 Di 11:40] =>  1:18
>
>  :END:
>
> Emacs  : GNU Emacs 26.3 (build 1, x86_64-w64-mingw32)
>
> of 2019-08-29
>
> Package: Org mode version 9.1.9 (release_9.1.9-65-g5e4542 @ 
> c:/Users/user/emacs-26.3-x86_64/share/emacs/26.3/lisp/org/)
>
> current state:
>
> ==
>
> (setq
>
> org-src-mode-hook '(org-src-babel-configure-edit-buffer 
> org-src-mode-configure-edit-buffer)
>
> org-after-todo-state-change-hook '(org-clock-out-if-current)
>
> org-metadown-hook '(org-babel-pop-to-session-maybe)
>
> org-clock-out-hook '(org-clock-remove-empty-clock-drawer)
>
> org-agenda-files '("~/org")
>
> org-modules '(org-habit)
>
> org-mode-hook '(er/add-org-mode-expansions
>
>  #[0 "\300\301\302\303\304$\207"
>
>[add-hook change-major-mode-hook org-show-block-all append 
> local] 5]
>
>  #[0 "\300\301\302\303\304$\207"
>
>[add-hook change-major-mode-hook org-babel-show-result-all 
> append local] 5]
>
>  org-babel-result-hide-spec org-babel-hide-all-hashes
>
>  #[nil "\300\301!\207" [run-hooks prelude-org-mode-hook] 2])
>
> org-archive-hook '(org-attach-archive-delete-maybe)
>
> org-confirm-elisp-link-function 'yes-or-no-p
>
> org-agenda-before-write-hook '(org-agenda-add-entry-text)
>
> org-metaup-hook '(org-babel-load-in-session-maybe)
>
> org-babel-pre-tangle-hook '(save-buffer)
>
> org-tab-first-hook '(org-babel-hide-result-toggle-maybe 
> org-babel-header-arg-expand)
>
> org-log-done 'time
>
> org-habit-show-habits-only-for-today nil
>
> org-occur-hook '(org-first-headline-recenter)
>
> org-cycle-hook '(org-cycle-hide-archived-subtrees org-cycle-hide-drawers 
> org-cycle-show-empty-lines
>
>   org-optimize-window-after-visibility-change)
>
> org-speed-command-hook '(org-speed-command-activate 
> org-babel-speed-command-activate)
>
> org-confirm-shell-link-function 'yes-or-no-p
>
> org-link-parameters '(("id" :follow org-id-open) ("file+sys") ("file+emacs") 
> ("doi" :follow org--open-doi-link)
>
>("elisp" :follow org--open-elisp-link) ("file" 
> :complete org-file-complete-link)
>
>("ftp" :follow (lambda (path) (browse-url (concat 
> "ftp:" path
>
>("help" :follow org--open-help-link)
>
>("http" :follow (lambda (path) (browse-url (concat 
> "http:" path
>
>("https" :follow (lambda (path) (browse-url (concat 
> "https:" path
>
>("mailto" :follow (lambda (path) (browse-url (concat 
> "mailto:; path
>
>("news" :follow (lambda (path) (browse-url (concat 
> "news:; path
>
>("shell" :follow org--open-shell-link))
>
> )
>

-- 
Nick

"There are only two hard problems in computer science: cache
invalidation, 

Re: Bug: :match filter fails on columnview dblock when :maxlevel present [9.4.6 (9.4.6-gab9f2a @ /Users/pabfr/.emacs.d/elpa/org-9.4.6/)]

2021-07-27 Thread Nick Dokos
I have submitted a patch to allow both match and maxlevel to be specified:

https://orgmode.org/list/87h7h0w5nz@alphaville.usersys.redhat.com/

but it has not been reviewed, tested or merged yet. Maybe you can test it
and report? That should help move it forward.

-- 
Nick

"There are only two hard problems in computer science: cache
invalidation, naming things, and off-by-one errors." -Martin Fowler




Re: a repeater doesn't increment

2021-07-27 Thread Nick Dokos
Jude DaShiell  writes:

> What I'm trying to do is more complex than that.
> * Reorder pills
> ** TODO order hctz, lisinipril, metformin, provacol, claritin, Co-q10,
>Deadline: <8-2-2021 +4w>
> ** TODO order Colase
>Deadline: <10-13-2021 +14w>
> ** TODO order Turmerick
>Deadline: <8-30-2021 +8w>
>
> On Thu, 22 Jul 2021, Nick Dokos wrote:
>
>> Jude DaShiell  writes:
>>
>> > Does enough material exist on werg tutorials that document how to get a
>> > repeater operational?  That or maybe I don't understand repeaters.  Had
>> > the repeater I tried to use worked correctly it would have advanced the
>> > original date by 4 weeks when that date got copied down to another cell.
>> > I selected the whole line including both verticals and perhaps this works
>> > when only a time stamp is copied.
>> >
>> >> I am likely doing this wrong but will describe what has been done.
>> >> I put an agenda time stamp into a field in test.org and add +4w to the end
>> >> of the time stamp inside the >.
>> >> I get on the left of the field column on the vertical character and type
>> >> control-space to set mark.
>> >> I move to the end of the field on the > sign and type space and another
>> >> vertical to close the column entry for that field.
>> >> Next I do control-c+x+v and am told strings are copied to the kill ring.
>> >> Next I move down one line and type control-y to yank those strings out of
>> >> the kill buffer and paste them on that line.
>> >> When this is done, I expected the time stamp to increment by 4 weeks.
>> >> What happened was the same information got copied down and it didn't
>> >> increment.
>> >> What am I doing wrong?
>> >>

I still don't understand: in your most recent response (at the top of this 
thread)
you are talking about headlines with DEADLINE added (which seems the right 
approach
to me: is there a problem with it?) But in your original mail, as well as in 
the followup, you are
taling about "field columns" and "vertical characters" and "cop[ying] down to 
another cell",
which seems to imply that you have an Org mode table somewhere.

Maybe you can elaborate a bit?
-- 
Nick

"There are only two hard problems in computer science: cache
invalidation, naming things, and off-by-one errors." -Martin Fowler




Re: a repeater doesn't increment

2021-07-22 Thread Nick Dokos
Jude DaShiell  writes:

> Does enough material exist on werg tutorials that document how to get a
> repeater operational?  That or maybe I don't understand repeaters.  Had
> the repeater I tried to use worked correctly it would have advanced the
> original date by 4 weeks when that date got copied down to another cell.
> I selected the whole line including both verticals and perhaps this works
> when only a time stamp is copied.
>

I may be misunderstanding, but are you trying to fill a column in a table
with dates that are four weeks apart? If so, repeaters have nothing to do
with it (AFAIK). You need `org-table-copy-increment' to be set to 28.

--8<---cut here---start->8---

| date | foo |
|--+-|
| <2021-07-22 Thu> | |
| <2021-08-19 Thu> | |
| <2021-09-16 Thu> | |
| <2021-10-14 Thu> | |
| <2021-11-11 Thu> | |
| <2021-12-09 Thu> | |


* Code

#+begin_src elisp
(setq-local org-table-copy-increment 28)

#+end_src

#+RESULTS:
: 28

--8<---cut here---end--->8---

Then keep pressing `S-RET' to get the next date.


>
> On Tue, 20 Jul 2021, Jude DaShiell wrote:
>
>> I am likely doing this wrong but will describe what has been done.
>> I put an agenda time stamp into a field in test.org and add +4w to the end
>> of the time stamp inside the >.
>> I get on the left of the field column on the vertical character and type
>> control-space to set mark.
>> I move to the end of the field on the > sign and type space and another
>> vertical to close the column entry for that field.
>> Next I do control-c+x+v and am told strings are copied to the kill ring.
>> Next I move down one line and type control-y to yank those strings out of
>> the kill buffer and paste them on that line.
>> When this is done, I expected the time stamp to increment by 4 weeks.
>> What happened was the same information got copied down and it didn't
>> increment.
>> What am I doing wrong?
>>
>>
>>
>
>

-- 
Nick

"There are only two hard problems in computer science: cache
invalidation, naming things, and off-by-one errors." -Martin Fowler




Re: what would cause failure in template for org capture?

2021-07-21 Thread Nick Dokos
Eric S Fraga  writes:

> Hello all,
>
> I am getting this error message:
>
> org-capture: Capture abort: Unknown template placeholder: "%^G"
>
> when attempting to capture a task using this template:
>
> #+begin_src emacs-lisp
>   (add-to-list 'org-capture-templates
>'("t"
>  "todo"
>  entry (file+headline "~/s/notes/todo.org" "refile")
>  "* %^{Task}   %^G\n%i%?\n%U\n"))
> #+end_src
>
> The error happens after having entered the information for the Task in
> the template so next would be the tags.
>
> This was working until recently.  Both Emacs and org are up to date
> relative to their git repositories.  The only change done recently in my
> configuration is a move from ivy to selectrum for completion.

FWIW, it's working for me. There was a change on July 8 having to do
with tags completion (using completing-read-multiple), but I'm running
with that change and I don't see a problem. OTOH, I'm not using
selectrum (or ivy for that matter), so the change may be interacting
badly with it.

I would probably edebug `org-capture-fille-template` and check that the
code around l.1733 in `org-capture.el' behaves as expected.

-- 
Nick

"There are only two hard problems in computer science: cache
invalidation, naming things, and off-by-one errors." -Martin Fowler




Re: convert subtree or nested list to table

2021-07-20 Thread Nick Dokos
Matt Price  writes:

> Christian et al,
>
> I seem to have broken something while fiddling around and I can't quite make 
> out what.  Would someone be willing to check for me whether this does or does 
> not produce the desired full table? Right now I am again getting a truncated 
> result and I'm not
> fully sure what I might be oding wrong.  Here is what I have:
>
> #+NAME: rubric-one
> - Grade
>   a. A
>   b. B
>   c. C
>   d. D
>   e. F
> - Style
>   a. Excellent
>   b. Good
>   c. Adequate
>   d. Lousy
>   e. Failing
>
These seem to have zero-width spaces and maybe that breaks the structure. To 
make sure that the structure is recognized properly,
maybe try a very simple code block:


--8<---cut here---start->8---
#+begin_src elisp :var data=rubric-one :results drawer
data
#+end_src

#+RESULTS:
:results:
((Grade (ordered (A) (B) (C) (D) (F))) (Style (ordered (Excellent) (Good) 
(Adequate) (Lousy) (Failing
:end:
--8<---cut here---end--->8---

If that does not work, then something is fishy with `rubric-one', so start 
there.

--
Nick

"There are only two hard problems in computer science: cache
invalidation, naming things, and off-by-one errors." -Martin Fowler




Re: [PATCH] ob-core: tangle check library of babel after current buffer

2021-07-17 Thread Nick Dokos
Tom Gillespie  writes:

> Pinging on this to see if anyone can test it so that it can be merged.
> Tom
>
> On Wed, Jun 16, 2021 at 4:29 PM Tom Gillespie  wrote:
>>
>> Hi,
>>This is a patch that fixes tangling behavior when a block has been
>> ingested into the library of babel and then modified. Best!
>> Tom
>
>

I have not tested it but I reviewed the code and it looks good to me.

-- 
Nick

"There are only two hard problems in computer science: cache
invalidation, naming things, and off-by-one errors." -Martin Fowler




[PATCH] Fix match/maxlevel conflict in colview dynblock

2021-07-11 Thread Nick Dokos

Specifying both `maxlevel' and `match' in a columnview dynamic block
was broken: the `match' argument is ignored in that case. See the link
below for a (not so minimal) ECM.

Reported-by: Pablo A Perez-Fernandez
Link: 
https://emacs.stackexchange.com/questions/66658/filter-columnview-dblock-on-properties-or-tags

-- 
Nick

"There are only two hard problems in computer science: cache
invalidation, naming things, and off-by-one errors." -Martin Fowler

>From 8bcff482e59c24758f87b9b5cdef3bc123dc12f8 Mon Sep 17 00:00:00 2001
From: Nick Dokos 
Date: Sun, 11 Jul 2021 22:30:22 -0400
Subject: [PATCH] Fix match/maxlevel conflict in colview dynblock

* lisp/org-coplview.el (org-columns--capture-view): Combine the match
and maxlevel arguments properly to construct the MATCH argument of
`org-map-entries'.

Specifying both `maxlevel' and `match' in a columnview dynamic block
does not work: the `match' argument is ignored in that case. See the
link below for a (not so minimal) ECM.

Reported-by: Pablo A Perez-Fernandez
Link: https://emacs.stackexchange.com/questions/66658/filter-columnview-dblock-on-properties-or-tags
---
 lisp/org-colview.el | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/lisp/org-colview.el b/lisp/org-colview.el
index 2e1c29a99..7144308ff 100644
--- a/lisp/org-colview.el
+++ b/lisp/org-colview.el
@@ -1398,8 +1398,9 @@ other rows.  Each row is a list of fields, as strings, or
   (org-get-tags
 	 (push (cons (org-reduced-level (org-current-level)) (nreverse row))
 		   table)
- (or (and maxlevel (format "LEVEL<=%d" maxlevel))
-	 (and match match))
+ (if match
+ (concat match (and maxlevel (format "+LEVEL<=%d" maxlevel)))
+   (and maxlevel (format "LEVEL<=%d" maxlevel)))
  (and local 'tree)
  'archive 'comment)
 (org-columns-quit)
-- 
2.31.1



Re: breakpoint in debugging org-table formulas

2021-07-08 Thread Nick Dokos
Uwe Brauer  writes:

> Hi 
>
> I just started to use the formula debugger
> (org-table-toggle-formula-debugger) which is quite nice.
>
> However for large tables with a lot of rows it would be more
> convenient to use breakpoints and not start just in the first row.
>
> I can't find any reference for that. 
>
> It is not implemented?
>
I've often wished for the same, but I don't think it's implemented.

-- 
Nick

"There are only two hard problems in computer science: cache
invalidation, naming things, and off-by-one errors." -Martin Fowler




Re: how to document/comment a complex org table formula

2021-07-08 Thread Nick Dokos
Uwe Brauer  writes:

 "GdaO" == General discussions about Org-mode  writes:
>
>> Limbic answer : 
>>   - create an emacs-lisp function doing what you want
>>   - comment /ad libitum/
>>   - call this function in your spreadsheet.
>
> I hoped such a function already existed and somebody would point it out
> to me (I searched the package-list-package list but nothing came up)
>

IIUC, the function would replace the formula, so it's really the
formula in a different guise, similar to what Eric F. was talking
about: implementing the formula as a source block. Both of them put
the code in some other place, where there is space to add comments.
IOW, it's not a general-purpose function. But I may be misconstruing
what Emmanuel was suggesting.

-- 
Nick

"There are only two hard problems in computer science: cache
invalidation, naming things, and off-by-one errors." -Martin Fowler




Re: table: problem with nan and if

2021-06-22 Thread Nick Dokos
Uwe Brauer  writes:

>> Uwe Brauer  writes:
>
>
>> I'm not very familiar with calc, but am wondering if the issue is the
>> 'nan'. In many languages, a nan is a 'polluting' variable i.e. once you
>> have a nan as a form anywhere in your calculation, the result will
>> always be a nan. Many languages actually have a special function to test
>> for a nan because it isn't actually a 'value'. Don't know if this is the
>> case with calc. 
>
> Yeah, when I googled, I found complains about nan using in calc but I
> did not really found an working alternative.
>
>> Perhaps an alternative strategy might help. Could you address what is
>> generating the nan and change that so that it generates something else,
>> possibly even a blank string and avoid the nan altogether? 
>
> I tried nil and other expressions but non really worked, so maybe a calc
> guru could clarify?
>

Could you write the formulas in lisp instead? You might be able to control
things more easily:

  (info "(org) Formula syntax for Lisp")

-- 
Nick

"There are only two hard problems in computer science: cache
invalidation, naming things, and off-by-one errors." -Martin Fowler




Re: [BUG] org babel fails with matlab+python kernel on MacOS-10.15 [9.4.6 (release_9.4.6-541-g52b097 @ /Users/oub/emacs/site-lisp/packages/org/)]

2021-06-14 Thread Nick Dokos
Uwe Brauer  writes:

>
>>> |   ob-ipython--dump-error("Traceback (most recent call last):\n  File 
>>> \"/Users/...")
>
>
>
>> This line seems to be the critical one in the error output. If you can
>> expand out the full error message, it may elucidate what the problem is.
>
> This message drives my crazy since the most important information is
> just not shown.
>

IIUC, clicking on the three dots should expand the message to its full
glory. You'll probably need to cut-n-past it to another buffer and
replace "\n" with "real" newlines to make it readable.

-- 
Nick

"There are only two hard problems in computer science: cache
invalidation, naming things, and off-by-one errors." -Martin Fowler




Re: LaTeX fragment preview weirdness

2021-06-02 Thread Nick Dokos
Scott Randby  writes:

> First, I'm using Emacs 27.2 and Org 9.4.6.
>
> I have the following code in an Org file:
>
> #+latex_header: 
> \hypersetup{pdfauthor={Author},pdftitle={Title},pdfsubject={Subject},pdfkeywords={keyword},pdfproducer={Emacs
>  Org},pdfcreator={pdflatex}}
> #+latex_header: \hypersetup{colorlinks=true,urlcolor=blue,linkcolor=black}
>
> The above lines are in a section at the end of my document.
>
> When I do C-c C-x C-l in a section (or with a fragment at point), the 
> following appears above every  fragment that is previewed:
>
> pdfauthor=Author,pdftitle=Title,pdfsubject=Subject,pdfkeywords=keyword,pdfproducer=Emacs
>  Org,pdfcreator=pdflatex colorlinks=true,urlcolor=blue,linkcolor=black
>
> Here is a sample section from my Org file:
>
> --BEGIN--
>
> * Distance Formula
>
> Let $d$ be the distance between $(x_{1}, y_{1})$ and $(x_{2}, y_{2})$.
> \[
> d=\sqrt{\left(x_{1}-x_{2}\right)^{2}+\left(y_{1}-y_{2}\right)^{2}}
> \]
>
> --END--
>
>

You probably want #+LATEX_HEADER_EXTRA, not #+LATEX_HEADER. Do

   (info "(org) Latex header and sectioning")

where it says:

#+BEGIN_QUOTE
   The LaTeX export back-end appends values from ‘LATEX_HEADER’ and
‘LATEX_HEADER_EXTRA’ keywords to the LaTeX header.  The docstring for
‘org-latex-classes’ explains in more detail.  Also note that LaTeX
export back-end does not append ‘LATEX_HEADER_EXTRA’ to the header when
previewing LaTeX snippets (see *note Previewing LaTeX fragments::).
#+END_QUOTE

-- 
Nick

"There are only two hard problems in computer science: cache
invalidation, naming things, and off-by-one errors." -Martin Fowler




Re: suggestion to change default org-latex-pdf-process to latexmk

2021-06-01 Thread Nick Dokos
"Bruce D'Arcus"  writes:

> While testing org-cite a few weeks ago, I noticed by default bibtex
> won't run with natbib export, or biblatex with biblatex export.
>
> Since org has not had native citations, this is not surprising.
>
> But with org-cite coming soon, this will change.
>
> At the time I suggested changing default to use latexmk, which will
> handle both bibtex and biblatex runs.
>
> https://lists.gnu.org/archive/html/emacs-orgmode/2021-05/msg00486.html
>
> So what do LaTeX users think about changing the default for
> "org-latex-pdf-process" to "latexmk"?
>
> Is there any reason not to do this?
>

The only reason I can think of is that it might not be available by
default, so it will be one more thing for a noob to install before Org mode
starts "working".

-- 
Nick

"There are only two hard problems in computer science: cache
invalidation, naming things, and off-by-one errors." -Martin Fowler




Re: Manual on web site is not the latest version

2021-05-17 Thread Nick Dokos
William Denton  writes:

> On 28 April 2021, Bastien wrote:
>
>> Do you still see differences between the doc/org-manual.org and the
>> one published on https://orgmode.org/manual/ ?
>>
>> If so, please point at one or two differences.  Thanks!
>
> Here's a late follow-up.  Thanks for checking.
>
> On the web at https://orgmode.org/manual/Languages.html#Languages
>
> "Code blocks in the following languages are supported."
>
> "Additional documentation for some languages is at 
> https://orgmode.org/worg/org-contrib/babel/languages.html.;
>
> In org-manual.org, both sentence are different:
>
> $ grep -A2 "Code blocks" doc/org-manual.org
> Code blocks in dozens of languages are supported.  See Worg for
> [[https://orgmode.org/worg/org-contrib/babel/languages/index.html][language
> specific documentation]].
>
>
> Bill
>
> --
> William Denton
> https://www.miskatonic.org/
> Librarian, artist and licensed private investigator.
>
>

The online manual is for 9.4 (the released version). What you see in 
org-manual.org
is for 9.5 (which AFAIK has not been released yet).

-- 
Nick

"There are only two hard problems in computer science: cache
invalidation, naming things, and off-by-one errors." -Martin Fowler




Re: The fate of ditaa.jar (9.4.5.)

2021-05-10 Thread Nick Dokos
Jarmo Hurri  writes:

> Greetings.
>
> I pulled the latest master and noticed that contrib has been moved into
> a separate repository. I also cloned this contrib repository, but can
> not find the file
>
> scripts/ditaa.jar
>
> in the repo. In fact, there is no directory scripts in the repo.
>
> The documentation in the latest master states that
>
> Stathis Sideris wrote the ‘ditaa.jar’ ASCII to PNG converter that is now
> packaged into the org-contrib repository.
>
> How should I proceed? Should I build this separately
>
> https://github.com/stathissideris/ditaa

You don't need to build it: it's available in the release area

https://github.com/stathissideris/ditaa/releases

>
> or will it still be included into contrib?

In general, I think it's a better idea to point to the canonical sources
and document how to integrate it into Org mode, than bundle things like
that, but I have no idea how things are going to go. I'm sure there will
be some problems that will need fixing one way or another.

-- 
Nick

"There are only two hard problems in computer science: cache
invalidation, naming things, and off-by-one errors." -Martin Fowler




Re: publishing does not work anymore

2021-05-06 Thread Nick Dokos
Giuseppe Lipari  writes:


> (setq org-publish-project-alist
>    '(("fil-web"
>       :base-directory "./"
>       :base-extension "org"
>       :publishing-directory "./"
>       :preparation-function update-all-dblocks-before-exporting
>       :publishing-function org-html-publish-to-html
>       :html-extension "php"
>       :body-only t
>       :html-postamble: t
>       :html-postamble-format : ""

This last one seems wrong: the extra space before the colon should probably not 
be there.
And I'm not sure whethe the colon after the last two properties should be there 
at all.

-- 
Nick

"There are only two hard problems in computer science: cache
invalidation, naming things, and off-by-one errors." -Martin Fowler




Re: Programmatically set TODO labels per file?

2021-04-29 Thread Nick Dokos
Arthur Miller  writes:

> I have a simple question, but I wasn't able to find answer on the web,
> so finally I'll try my luck here.
>

> I know I can setq org-todo-keywords with a list '((sequence "TODO"
> DONE")), as an example. But what variable is used for per-file keywords?
> Once that are set with #+TODO: ... line?
>
> I guess when org mode parses a file when starting up the mode, it has to
> parse that line into some var, where do I find it?
>

It is parsed into a buffer-local variable by the name of
`org-todo-keywords-1'. Do `C-h v org-todo-keywords' and `C-h v
org-todo-keywords-1' for all the details.

BTW, when the interwebs fail you (or even before that), use the source :-)

-- 
Nick

"There are only two hard problems in computer science: cache
invalidation, naming things, and off-by-one errors." -Martin Fowler




Re: splot and #+PLOT keyword

2021-04-28 Thread Nick Dokos
Eric S Fraga  writes:

> Hello,
>
> a question/problem regarding the #+plot: keyword.
>
> I am trying to plot out some data where the table looks like this:
>
> #+begin_src org
>   ,#+plot: ind:(6 7) deps:(1) with:"linespoints pt 7" set:"logscale xy" 
> type:3d
>   | 1 |   81 |  5 |  0 |   2.27 | 0.9729848950975623 |   
> 0.019370016994566613 | 0.0 |
>   | 2 |  179 | 12 |  2 |   3.68 |0.42919355355596267 |  
> 0.098179980500945 | 0.0 |
>   | 3 |  192 |  6 |  4 |   3.73 |   0.022272788298562045 | 
> 107.57399021086516 | 0.0 |
>   | 4 |  207 |  7 |  8 |   3.78 |  5.793210638997738 |  
> 0.0012069891001225872 | 0.0 |
>   | 5 |  194 | 10 | 12 |   3.83 |0.06356594000544429 |
> 0.04724965431965522 | 0.0 |
>   | 6 |  216 |  8 | 14 |   3.89 |0.06342050747033937 |  
> 0.0030380306687021346 | 0.0 |
>   | 7 |  193 |  7 | 18 |   3.94 | 0.0021538841210584 |
> 0.05771587421360767 | 0.0 |
>   | 8 |  193 |  7 | 19 |   3.99 |  0.0010739216097561438 |
> 0.10625133051680691 | 0.0 |
>   | 9 |  182 |  6 | 19 |   4.04 |  0.0014893478573963876 |
> 0.03593357278451856 | 0.0 |
>   |10 |  192 |  6 | 21 |   4.10 |   0.013251328328567616 |  
> 0.0006605631984014402 | 0.0 |
> #+end_src
>
>
> I have tried a variety of directives for the #+PLOT: keyword but none
> give me what I want.  I would like to plot column 1 (dependent variable)
> versus columns 6 and 7 (independent variables) in 3d.  (don't ask ;-))
>
> I have also tried:
>
>#+plot: ind:6 deps:(7 1) ...
>
> but in all cases I seem to be getting somewhat random data plotted,
> possibly columns 2 versus 3 and 4, which makes no sense except that
> maybe the "|" table column separator is being retained in the data file
> created.  Is there any way to stop the data file from being deleted
> after plotting?  I can inspect the *gnuplot* buffer but cannot see the
> actual data.
>
> 2d plots work just fine, by the way.
>
> thank you,
> eric

Have you tried looking at the produced gnuplot script? It goes in a temp file
so it's a bit of a pain, but that's my fallback method when I'm really confused 
:-)

-- 
Nick

"There are only two hard problems in computer science: cache
invalidation, naming things, and off-by-one errors." -Martin Fowler




Re: Bug: org-columns--compute-spec tries to set CLOCKSUM property [9.4.4 (release_9.4.4-231-gf46925 @ /home/nick/elisp/org-mode/lisp/)]

2021-04-09 Thread Nick Dokos
Nicolas Goaziou  writes:

>>   | ITEM  | CLOCKSUM |
>>   |---+--|
>>   | Goal 3| 2:11 |
>>   |---+--|
>>   | Task 1| 2:11 |
>>   |---+--|
>>   | Subtask 1 | 1:00 |
>>   #+END
>> --8<---cut here---end--->8---
>
> Why do you say the entries are wrong?
>

Temporary (I hope...) brain damage.

-- 
Nick

"There are only two hard problems in computer science: cache
invalidation, naming things, and off-by-one errors." -Martin Fowler




Re: Bug: Display Inline Images from Subdirectory [9.4.4 (9.4.4-33-g5450d6-elpaplus @ /home/ded/.emacs.d/elpa/org-plus-contrib-20210322/)]

2021-04-06 Thread Nick Dokos
"Daniel E. Doherty"  writes:

> I have a hook function (cribbed from Emacs Stack Exchange) to re-display 
> inline images in the current subtree after execution of a source block 
> if the header argument contains, ':results graphics'.  As its last 
> action, it calls:
>
> (org-display-inline-images nil nil beg end)
>
> where beg and end have been set to the bounds of the current subtree.
>
> This works perfectly if the image file is in the current directory.  For
> example, here is a block that displays as expected:
>
> #+begin_SRC dot :file lehman.svg :cmdline -Kdot -Tsvg :results graphics
>   digraph lehman {
> Thomas [shape=circle];
> TideWater [shape = box, label="Tide Water\nSecurities\n(Issuer)"];
> Lehman [shape = box];
> Thomas -> TideWater [label="Director"];
> Lehman -> TideWater [label="Shareholder"];
> Thomas -> Lehman [label="Partner"];
>   }
> #+end_SRC
>
>
> However, if I add a :dir header, it ceases to work:
>
> #+begin_SRC dot :dir dot :file lehman.svg :cmdline -Kdot -Tsvg :results 
>  graphics
>   digraph lehman {
> Thomas [shape=circle];
> TideWater [shape = box, label="Tide Water\nSecurities\n(Issuer)"];
> Lehman [shape = box];
> Thomas -> TideWater [label="Director"];
> Lehman -> TideWater [label="Shareholder"];
> Thomas -> Lehman [label="Partner"];
>   }
> #+end_SRC
>
>
> #+RESULTS:
> [[file:dot/lehman.svg]]
>
> I have run edebug on the function, and the only difference I can detect
> is the location of the image file in a subdirectory called 'dot'.
>
> Here is my hook function, just for the record:
>
> #+begin_SRC emacs-lisp
>   (setq org-startup-with-inline-images t)
>   (require 'subr-x)
>   (defun ded:org-babel-display-subtree ()
> "Redisplay inline images in subtree if cursor in source block with 
> :result graphics."
>
> (when (org-in-src-block-p)
>   (let (beg end)
> (save-excursion
>   (org-mark-subtree)
>   (setq beg (point))
>   (setq end (mark)))
> (when-let ((info (org-babel-get-src-block-info t))
>(params (org-babel-process-params (nth 2 info)))
>(result-params (cdr (assq :result-params params)))
>((member "graphics" result-params)))
>   (org-display-inline-images nil nil beg end)
>
>   (add-hook 'org-babel-after-execute-hook 
>   #'ded:org-babel-display-subtree)
> #+end_SRC
>

FWIW, this works fine for me: Org mode version 9.4.4 (release_9.4.4-231-gf46925 
@ /home/nick/elisp/org-mode/lisp/)

The only things I had to do was 1) to make the above into a tree by
adding a headline (otherwise, I guess org-mark-subtree would complain:
Not in a subtree) and 2) create the dot subdirectory.

-- 
Nick

"There are only two hard problems in computer science: cache
invalidation, naming things, and off-by-one errors." -Martin Fowler




Re: "#+STARTUP: hideblocks" has no effect?

2021-04-06 Thread Nick Dokos
autofrettage  writes:


> I recently read about the #+STARTUP parameter "hideblocks", but it
> doesn't seem to have any effect in my set-up. All the blocks kept
> laughing straight in my face. :-(
>
> Any ideas about what could have gone wrong?
>
> I use Org Mode 9.4.5 with Emacs 26.3, and I also tried closing the
> file and Emacs before I tried.
>
>
> p.s. Setting org-hide-block-startup with local variables is a
> solution, but not as nice as doing it with #+STARTUP, I'd say.


It interacts with org-startup-folded (whose default was changed
recently to 'showeverything'): you need to set the latter to something
other than 'showeverything' in order for hideblocks to be effective.

-- 
Nick

"There are only two hard problems in computer science: cache
invalidation, naming things, and off-by-one errors." -Martin Fowler




Bug: org-columns--compute-spec tries to set CLOCKSUM property [9.4.4 (release_9.4.4-231-gf46925 @ /home/nick/elisp/org-mode/lisp/)]

2021-04-05 Thread Nick Dokos
The following MWE illustrates:

--8<---cut here---start->8---
#+COLUMNS: %25ITEM %6CLOCKSUM{:}

* Goal 3
  :PROPERTIES:
  :ID: goal_3
  :END:

  #+BEGIN: columnview :hlines 4 :id goal_3 :maxlevel 3

  #+END

** TODO Task 1
   :LOGBOOK:
   CLOCK: [2020-01-26 18:05]--[2020-01-26 Mon 19:16] =>  1:11
   :END:

   Task body

*** TODO Subtask 1
 :LOGBOOK:
 CLOCK: [2020-01-28 Tue 15:45]--[2020-01-28 Tue 16:45] =>  1:00
 :END:
 
--8<---cut here---end--->8---

Starting with `emacs -Q foo.org', place the cursor on the `#+BEGIN:
columnview' line and type `C-c C-c`. That produces a table (although
the entries are wrong):

--8<---cut here---start->8---
  #+BEGIN: columnview :hlines 4 :id goal_3 :maxlevel 3
  | ITEM  | CLOCKSUM |
  |---+--|
  | Goal 3| 2:11 |
  |---+--|
  | Task 1| 2:11 |
  |---+--|
  | Subtask 1 | 1:00 |
  #+END
--8<---cut here---end--->8---

But then doing it again fails with the following (elided) backtrace:

--8<---cut here---start->8---
Debugger entered--Lisp error: (error "The CLOCKSUM property cannot be set with 
‘org-entr...")
  signal(error ("The CLOCKSUM property cannot be set with ‘org-entr..."))
  error("The %s property cannot be set with `org-entry-put'" "CLOCKSUM")
  ...
  org-entry-put(147 "CLOCKSUM" "1:00")
  (progn (org-entry-put (point) property new-value))
  (if (and update value (not (equal value new-value))) (progn (org-entry-put 
(point) property new-value)))
  (let ((new-value (org-trim summary))) (if (and update value (not (equal value 
new-value))) (progn (org-entry-put (point) property new-value
  ...
  org-columns--compute-spec(("CLOCKSUM" "CLOCKSUM" 6 ":" nil) t)
  ...
  org-columns-compute-all()
  ...
  org-columns(nil nil)
  org-columns--capture-view(3 nil nil nil nil 35)
  ...
  org-dblock-write:columnview((:name "columnview" :hlines 4 :id goal_3 
:maxlevel 3 :indentation-column 2 :content #("\n" 0 1 (org-category "foo500" 
wrap-prefix #("  " 0 2 (face org-indent)) line-prefix #("  " 0 2 (face 
org-indent)) fontified t
  ...
  org-update-dblock()
  (save-excursion (goto-char (org-element-property :post-affiliated context)) 
(org-update-dblock))
  ...
  org-ctrl-c-ctrl-c(nil)
--8<---cut here---end--->8---

Part of the problem seems to be that `org-get-entry' manufactures
CLOCKSUM properties out of the CLOCK entries above, but
`org-put-entry' knows that that's a special property and refuses to
put it. But I think the major fail is in `org-columns--compute-spec'
which takes the property at face value and just passes it along. I
believe it needs to do whatever accumulation it is supposed to do and
set a text property to store the value in the headline, but that's
guessing on my part.

I saw this on Emacs SE (the above example is a simplified version of
the example in the post):


https://emacs.stackexchange.com/questions/55164/org-columns-error-the-clocksum-property-cannot-be-set-with-org-entry-put

and it has apparently been reported once before:

https://lists.gnu.org/archive/html/emacs-orgmode/2012-02/msg00309.html


Emacs : GNU Emacs 28.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version
 2.24.33, cairo version 1.16.0) of 2021-02-17
 
Package: Org mode version 9.4.4 (release_9.4.4-231-gf46925)
-- 
Nick




Re: How to get shell source blocks to read my profile?

2021-03-16 Thread Nick Dokos
George Mauer  writes:

> I understand why you say that maxim but testing that this worked was the 
> first thing I did
> and it does work. I was surprised as well. I haven't debugged all the way 
> into the eval
> functions to see why this works but my guess is that the authors were pretty 
> smart about
> figuring out which executable to invoke.
>

Starting with `emacs -q' I evaluate

(setq shell-file-name "bash -i")

in the *scratch* buffer and then do `M-x shell'. I get

apply: Searching for program: No such file or directory, bash -i


If I do

(setq shell-file-name "/bin/bash -i")

I get

emacs: /bin/bash -i: No such file or directory

Process shell exited abnormally with code 127

The trouble is that `shell-file-name' may be used much more widely than you 
expect.

> As for the problem I'm trying to solve, there isn't one exactly. This is more 
> me hacking on
> something I don't fully understand because it regularly trips me up.
>
> I do still wonder what would be the disadvantage of just configuring it to do 
> --login by
> default and doing all configuration in profile scripts. It would be 
> unconventional yes, but
> it would also make dynamic scoping of environment variable effectively opt-in 
> via
> --noprofile rather than opt-out (which imo is how it should be). I would 
> assume that uses
> extra resources or risks improperly handling crashed processes, but I can't 
> find anything to
> that effect in the docs
>
> On Tue, Mar 16, 2021, 07:32 Maxim Nikulin  wrote:
>
> On 16/03/2021 00:49, George Mauer wrote:
> >    shell-file-name: "/bin/zsh -i"
>
> I am afraid, you should be prepared to face some problem accidentally.
> The value of this variable is used to execute the specified file
> ("zsh -i" in the "/bin" directory, I do not think, you have such file),
> not as a part of shell command. shell-file-name in namely file name to
> be executed with shell-command-switch as first argument (separate
> arguments, not merged into a string) to run shell commands (next 
> argument).
>
> Environment variables could be set on OS level, inside emacs
> https://www.gnu.org/software/emacs/manual/html_node/emacs/Environment.html
> , etc. It is hard to suggest something since you have not described the
> problem you are trying to solve. Tim in details explained why you
> attempt to solve it did not work, but the problem (or the goal) is still
> unknown.
>

-- 
Nick

"There are only two hard problems in computer science: cache
invalidation, naming things, and off-by-one errors." -Martin Fowler




Re: Problems while trying to load feature

2021-03-16 Thread Nick Dokos
"Charles R (Charlie) Martin"  writes:

> This is a problem I’ve noticed as well. Now, I am a programmer — my
> code or it’s descendants is still in the distribution — I do update
> org mode regularly, and I get messages when I start up Emacs about
> Org mode files that can’t be loaded. I wouldn’t be surprised if the
> cause is this renaming. But honestly I stopped having time to hack
> emacs 30 years ago. Wouldn’t it be desirable if changes that aren’t
> backward-compatible included some kind of assistance for users? 
>

You probably don't want to hear this, but you will have to figure out
what those messages are telling you and fix the problems. At best,
they might be innocuous: your init file might be trying to load things
that don't exist any more. At worst, you may be running a mixed
installation: you might be loading things from various versions of Org
mode that might coexist on your system(s) (depending on how exactly
you install Org mode: if you use the version that is bundled with
emacs *only* you should not have any problems; but if you install a
more recent one from ELPA or from git, you should be careful). If you
encounter problems after the initial load, you might have a mixed
installation. See https://orgmode.org/worg/org-faq.html#mixed-install for more
details on how to check. Mixed installations are an unending source of
problems and need to be taken care of.

I install new versions of emacs and Org mode fairly frequently (every
couple of months) at which point I restart emacs to see whether any
such problems crop up. If there are, I fix them right then and there,
until I can get a clean restart. If it's not obvious, I take a look
through the etc/ORG-NEWS file, which you should have locally, but in a
pinch you can look for it online:

https://code.orgmode.org/bzg/org-mode/src/master/etc/ORG-NEWS

In particular, this is the best place for assistance with backward
incompatibilities that you mentioned above. Assuming you know which
release you came from and which release you are going to, look through
the sections describing them and all intermediate releases, to see
what backward incompatibilites were introduced and what suggested
solutions there are. As a last resort, you can always ask here. In
general, I find that fixing these problems asap is better for my
sanity.

Cleaning up your init file to get rid of the (now) useless loads is
also a good idea (even though they are innocuous): init files tend to
accumulate junk (mine has been doing that for 30 years), so getting
rid of old cruft is, for me, another essential activity to maintain a
semblance of sanity.

My $0.02, YMMV, etc.

-- 
Nick

"There are only two hard problems in computer science: cache
invalidation, naming things, and off-by-one errors." -Martin Fowler




Re: Problems while trying to load feature

2021-03-15 Thread Nick Dokos
The renaming was e.g org-bbdb to ol-bbdb, *NOT* to ol-org-bbdb.

Similarly for all the rest: you won't find any of them in any installation.

-- 
Nick

"There are only two hard problems in computer science: cache
invalidation, naming things, and off-by-one errors." -Martin Fowler




Re: org to beamer structure not working

2021-03-15 Thread Nick Dokos
Luca Ferrari  writes:

> On Mon, Mar 8, 2021 at 4:29 PM Eric S Fraga  wrote:
>>
>> How are you actually exporting?  Are you choosing a beamer export option
>> as it looks like article LaTeX output.  Your settings look fine
>> otherwise.
>
> Shame on me! I was exporting it as latex-pdf file (C-c C-e l p)
> instead of beamer (C-c C-e l P).
>

You are not the first (nor are you going to be the last) to do that - I speak 
from experience ;-)

> Sorry for the noise.
>
> Luca
>
>

-- 
Nick

"There are only two hard problems in computer science: cache
invalidation, naming things, and off-by-one errors." -Martin Fowler




Re: Bug: linking to <> requests tags table [9.4.4 ( @ /home/arne/.guix-profile/share/emacs/site-lisp/)]

2021-02-17 Thread Nick Dokos
"Dr. Arne Babenhauserheide"  writes:

>
> Following the manual at Hyperlinks Node: Internal Links
>
>  1. one item
>  2. <>another item
>  Here we refer to item [[target]].
>
> And then using C-c C-o on [[target]] I get the prompt in the minibuffer
> “Visit tags table (default TAGS)” instead of jumping to <>.
>

Does it happen with `emacs -q`? If not, your init file is at fault.
-- 
Nick

"There are only two hard problems in computer science: cache
invalidation, naming things, and off-by-one errors." -Martin Fowler




Re: Where has the manual on one html page gone?

2021-02-15 Thread Nick Dokos
Christine Köhn  writes:

> Hi,
>
> I always used the manual online as one html page but it does not seem to
> be available since (?) the website revamp. I prefer the manual as one
> page for many reasons. Is it still available online?
>

I've always used the one-page per section version on the web (although
I tend to use Info much more often), primarily because I thought that
downloading the whole manual to just look at a section or two or five
would be inefficient - in fact, I've wondered why the single-page
versions of various manuals (particularly the larger ones: emacs and
elisp) are made available. So it is idle curiosity on my part, but
what are the the reasons for your preference?

-- 
Nick

"There are only two hard problems in computer science: cache
invalidation, naming things, and off-by-one errors." -Martin Fowler




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

2021-02-02 Thread Nick Dokos
John Kitchin  writes:

> 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.
>

Just to elaborate a bit: Org mode checks whether to reevaluate a cached block
by checksumming it and seeing if the sum is different from before. That's why
you have to mark the actual block for caching, not its callers.

-- 
Nick

"There are only two hard problems in computer science: cache
invalidation, naming things, and off-by-one errors." -Martin Fowler




Re: [Bug] org-version returns empty string when called uninteractively [9.4]

2021-01-26 Thread Nick Dokos
Jean-Léon HENRY  writes:

> Hi,
>
> I just upgraded org to 9.4.4 and org-version is returning an empty string 
> when called
> unineractively. More precisely
>
> I started emacs with : emacs -Q -l minimal-org.el
> Contents of minimal-org.el :
>
> ;
> ;;; Minimal setup to load latest `org-mode'.
>
> ;; Activate debugging.
> (setq debug-on-error t
>   debug-on-signal nil
>   debug-on-quit nil)
>
> ;; Add latest Org mode to load path.
> (add-to-list 'load-path (expand-file-name 
> "/home/me/.emacs.d/elpa/org-9.4.4/"))
> 
>
> Then did :
> M-x org-version
>
> Result :
> "Org mode version  ( @ /home/me/.emacs.d/elpa/org-9.4.4/)"
>
> But when evaluated non-interactively :
> (org-version)
>
> Results :
> ""
>
> In my regular set-up, this breaks version checks used in other packages : 
> (version<
> (org-version) "9.0") for example is called. This gives you the following 
> backtrace :
> Debugger entered--Lisp error: (error "Invalid version syntax: ‘’ (must start 
> with a number)
> ")
>   signal(error ("Invalid version syntax: ‘’ (must start with a number)"))
>   error("Invalid version syntax: `%s' (must start with a number)" "")
>   version-to-list("")
>   version<("" "9.0")
> [...]
>
> Thanks for your help
>

It does not do that for me:

   (org-version)
   "9.4.4"

-- 
Nick

"There are only two hard problems in computer science: cache
invalidation, naming things, and off-by-one errors." -Martin Fowler




Re: Inserting LaTex expressions using a filter fails

2021-01-05 Thread Nick Dokos
Mart van de Wege  writes:

> I'm trying to replace U+00BD in an org buffer with \sfrac{1}{2} during
> export to LaTex, and obviously I'm doing something wrong, or I don't
> understand the documentation.
>
> I use the following code to set up the filter:
>
> #+BIND: org-export-filter-item-functions (latex-replace-half)
> #+BEGIN_SRC emacs-lisp :exports results :results none
>
>   (defun latex-replace-half (text backend info)
> (when (org-export-derived-backend-p backend 'latex)
>   (replace-regexp-in-string  "½" "\\sfrac{1}{2}" text)))
> #+END_SRC
>

Try

(replace-regexp-in-string  "½" "sfrac{1}{2}" text)))


> Down the line in the document there is this example line:
>
>- 1½ eetl. gehakte peterselie, ½ eetl. azijn, 4 eetl. olie
>
> Or this one:
>
>Laat de gewassen en gebroken vermicelli met de foelie ½ uur in de
>
> But neither of them get replaced. I tried plain-text, item, and
> final-output filters.
>

"item" will only deal with the first one: an item in a list. You'll need
to use "final-output" probably.

> What am I missing?
>
> Mart

-- 
Nick

"There are only two hard problems in computer science: cache
invalidation, naming things, and off-by-one errors." -Martin Fowler




Re: Bug: org-element does not recognize table.el tables [9.4 (release_9.4-53-g23f941 @ /home/nick/elisp/org-mode/lisp/)]

2021-01-04 Thread Nick Dokos
Nicolas Goaziou  writes:

> Hello,
>
> Nick Dokos  writes:
>
> [...]
>
>> Evaluating `(org-element-at-point)' returns `(paragraph ...)' all along
>> the top line and `(table ( :type org ))' when the cursor is at
>> the beginning of the `a b c' line.
>
> Fixed. Thank you.
>

Thank you!

-- 
Nick

"There are only two hard problems in computer science: cache
invalidation, naming things, and off-by-one errors." -Martin Fowler




Re: Bug: org-element does not recognize table.el tables [9.4 (release_9.4-53-g23f941 @ /home/nick/elisp/org-mode/lisp/)]

2020-12-22 Thread Nick Dokos
Bastien  writes:

> Hi Nick,
>
> Nick Dokos  writes:
>
>> Consider an Org mode file with a table.el table (which I made by
>> first constructing an Org mode table and then usind `C-c ~' to
>> convert it):
>
> Would it be so bad if org-mode decides to stop supporting table.el tables? 
>
> I don't see the benefit of supporting both Org tables and tables.el tables,
> and it calls for confusion.
>
> What do you and everyone else think?

I don't use table.el tables. The only reason I submitted the bug
report was because I was trying to investigate this Emacs SE question:

   
https://emacs.stackexchange.com/questions/62335/org-mode-export-table-to-latex-with-word-wrap

In the process, I discovered that the LaTeX file was broken and traced
it back to org-element. Note that the manual says:

"Org mode recognizes such tables and exports them properly."

See

   (info "(org) Cooperation") 

So there are three roads ahead as I see it:

- Fix the bug in org-element and make sure that table.el tables are
  exported properly.

- Do not fix the bug. Instead, tear out table.el support from Org mode
  code and fix the manual to say so.

- Do not fix the bug (and do nothing else).

I presume the third choice is distasteful to everybody, but that's
going to be the default choice unless somebody volunteers to do either
of the other two.

Either of the first two choices requires work. From my POV, it does
not matter which of the two is done: if somebody volunteers to do
either, I am not going to object (and I suspect, almost nobody else
will either: if the second course is chosen, there may be some table.el
users who would object to losing it, but if so, they should volunteer
to fix the bug).

My 0.02 kopek.

-- 
Nick

"There are only two hard problems in computer science: cache
invalidation, naming things, and off-by-one errors." -Martin Fowler




Re: Bug: org-element does not recognize table.el tables [9.4 (release_9.4-53-g23f941 @ /home/nick/elisp/org-mode/lisp/)]

2020-12-21 Thread Nick Dokos
Hi Bastien,

Bastien  writes:

> Would it be so bad if org-mode decides to stop supporting table.el tables? 
>

I don't use table.el tables so it's easy for me to say "Get rid of them" - but
there may be objections :-)

> I don't see the benefit of supporting both Org tables and tables.el tables,
> and it calls for confusion.
>
> What do you and everyone else think?

They do exist in a sort of twilight zone: not many people use them
AFAICT, but there is ostensible support and the manual says "Org mode
recognizes such tables and exports them properly", but the bug I sent
shows that that's not correct.

So: fix this bug now that it's been pointed out? Close it as "Will not
fix" with some guidance on what the user is supposed to do ("don't use
table.el tables" is probably the best advice)? Or decide to jettison
table.el support altogether? The first and the last involve real work,
the middle one not, but it's not particularly tasty.

Somebody else will have to make the decision: I'm fine with either of
the exreme ways, not so much with the middle option, but since I'm not
going to do the work, I am in no position to insist.

BTW, I ran into this while looking into this Emacs SE question:

https://emacs.stackexchange.com/questions/62335/org-mode-export-table-to-latex-with-word-wrap

-- 
Nick

"There are only two hard problems in computer science: cache
invalidation, naming things, and off-by-one errors." -Martin Fowler




Re: Selecting a date to show on the agenda with time grids

2020-12-21 Thread Nick Dokos
Christopher Dimech  writes:

> Dear Compeers,
>
> I able to run the command
>
> (org-agenda-list nil (org-read-date))
>
> to select the date and get the week for the agenda.
>
> But I would like the grid marks for the selected date to show up
> together with the list of appointments in the time slots.
>

No idea what you mean, but does `v d' on that day do what you want?
AFAIK, the grid is shown in the weekly/monthly agenda only for the
current date.  But as I said I don't really know what you mean, so I
may be misunderstanding you.  If so, please elaborate.

> Would be very grateful if somebody can help me further with this.
>
> Regards
> Christopher
>
>
>
>

-- 
Nick

"There are only two hard problems in computer science: cache
invalidation, naming things, and off-by-one errors." -Martin Fowler




Bug: org-element does not recognize table.el tables [9.4 (release_9.4-53-g23f941 @ /home/nick/elisp/org-mode/lisp/)]

2020-12-17 Thread Nick Dokos


Consider an Org mode file with a table.el table (which I made by
first constructing an Org mode table and then usind `C-c ~' to convert it):


--8<---cut here---start->8---
* table.el table


  ++++
  |  a |  b |  c |
  ++++
  |  1 |  2 |  3 |
  ++++
  |  4 |  5 |  6 |
  ++++
  |  7 |  8 |  9 |
  ++++
  | 10 | 11 | 12 |
  ++++
--8<---cut here---end--->8---

Trying to export to LaTeX produces pretty mangled output.

It turns out that when in
 `org-latex-table', (org-element-property :type table) returns `org', so
 it thinks it's an Org mode table and calls `org-latex--org-table' to
 process it, producing output like this:

--8<---cut here---start->8---
\sout{}\sout{}
\begin{center}
\begin{tabular}{lll}
a & b & c\\
\end{tabular}
\end{center}
\sout{}\sout{}
\begin{center}
\begin{tabular}{rrr}
1 & 2 & 3\\
\end{tabular}
\end{center}
\sout{}\sout{}

...

\begin{center}
\begin{tabular}{rrr}
10 & 11 & 12\\
\end{tabular}
\end{center}
\sout{}\sout{}
--8<---cut here---end--->8---


Evaluating `(org-element-at-point)' returns `(paragraph ...)' all along
the top line and `(table ( :type org ))' when the cursor is at
the beginning of the `a b c' line.


Emacs  : GNU Emacs 28.0.50 (build 3, x86_64-pc-linux-gnu, GTK+ Version 3.24.13, 
cairo version 1.16.0)
 of 2020-10-30
Package: Org mode version 9.4 (release_9.4-53-g23f941 @ 
/home/nick/elisp/org-mode/lisp/)

-- 
Nick





Re: [PATCH] Fix ODT output for scheduled items.

2020-11-28 Thread Nick Dokos
Same patch but fixes the typo in the Changelog:

>From 7dc4877469c5bed7580ff80e9534480e16972b93 Mon Sep 17 00:00:00 2001
From: Nick Dokos 
Date: Sat, 28 Nov 2020 10:01:02 -0500
Subject: [PATCH] org-odt-planning: Fix scheduled item output

* lisp/ox-odt.el (org-odt-planning): Use org-scheduled-string, not
  org-deadline-string, for scheduled items.

See <https://emacs.stackexchange.com/questions/61985/org-export-to-odt-incorrectly-use-deadline-for-scheduled> for an ECM.
---
 lisp/ox-odt.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lisp/ox-odt.el b/lisp/ox-odt.el
index 4619f9fcd..ef07acfed 100644
--- a/lisp/ox-odt.el
+++ b/lisp/ox-odt.el
@@ -2946,7 +2946,7 @@ channel."
 	 (when scheduled
 	   (concat
 		(format "%s"
-			"OrgScheduledKeyword" org-deadline-string)
+			"OrgScheduledKeyword" org-scheduled-string)
 		(org-odt-timestamp scheduled contents info)))
 
 
-- 
2.25.4


-- 
Nick




[PATCH] Fix ODT output for scheduled items.

2020-11-28 Thread Nick Dokos
The ODT exporter uses the org-deadline-string for scheduled items. This
apparently predates the introduction of the "new" exporter in 2013 -
time flies...

It was reported on Emacs SE:

 
https://emacs.stackexchange.com/questions/61985/org-export-to-odt-incorrectly-use-deadline-for-scheduled

Patch attached.

>From 429d3eb816d0673326969f50b478f4d622147432 Mon Sep 17 00:00:00 2001
From: Nick Dokos 
Date: Sat, 28 Nov 2020 10:01:02 -0500
Subject: [PATCH] org-odt-planning: Fix scheduled item output

* lis/ox-odt.el (org-odt-planning): Use org-scheduled-string, not
  org-deadline-string, for scheduled items.

See <https://emacs.stackexchange.com/questions/61985/org-export-to-odt-incorrectly-use-deadline-for-scheduled> for an ECM.
---
 lisp/ox-odt.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lisp/ox-odt.el b/lisp/ox-odt.el
index 4619f9fcd..ef07acfed 100644
--- a/lisp/ox-odt.el
+++ b/lisp/ox-odt.el
@@ -2946,7 +2946,7 @@ channel."
 	 (when scheduled
 	   (concat
 		(format "%s"
-			"OrgScheduledKeyword" org-deadline-string)
+			"OrgScheduledKeyword" org-scheduled-string)
 		(org-odt-timestamp scheduled contents info)))
 
 
-- 
2.25.4


-- 
Nick




Re: add linked files to agenda files

2020-11-16 Thread Nick Dokos
Alan Schmitt  writes:

> Hello,
>
> I'm experimenting with a setup where each project is its own org file,
> and where I have a master file linking to active projects. How can I
> configure org to add every linked file of that master file to the
> org-agenda-files?
>

You'll probably have to write a custom function to do that, but it
depends on how exactly your master file is set-up, so providing some
details on that would help.

Just guessing at this point, I would imagine you'd want something like
this:

--8<---cut here---start->8---
(defun path-from-link (link)
   (org-element-property :path link))

(setq org-agenda-files (with-current-buffer
 (find-file-noselect "master.org")
 (org-element-map (org-element-parse-buffer)
  '(link)
  #'path-from-link)))
--8<---cut here---end--->8---

but the details might make a difference.

-- 
Nick

"There are only two hard problems in computer science: cache
invalidation, naming things, and off-by-one errors." -Martin Fowler




Re: New website - back to the old unicorn!

2020-10-26 Thread Nick Dokos
Sounds good to me.

And thanks for all the work to update the site!
-- 
Nick

"There are only two hard problems in computer science: cache
invalidation, naming things, and off-by-one errors." -Martin Fowler




Re: New website - back to the old unicorn!

2020-10-26 Thread Nick Dokos
One thing that I have done in the past (and I'm probably not the onlye
one) on the Emacs SE is refer people to the mailing list through the
old link: https://orgmode.ord/community.html which does not exist any
more, so we have a whole lot of broken links on Emacs SE at the moment:
can something be done to restore the functionality of those links?

Thanks!
-- 
Nick

"There are only two hard problems in computer science: cache
invalidation, naming things, and off-by-one errors." -Martin Fowler




Re: recursive checkbox counting

2020-10-02 Thread Nick Dokos
Alan Schmitt  writes:

> On 2020-10-01 14:24, torys.ander...@gmail.com (Tory S. Anderson) writes:
>
>> The way I've made this work is with the following property:
>>
>>:COOKIE_DATA: ALL
>>
>> But I suppose I haven't tried if that's fully recursive.
>
> Thank you for the suggestion. I gave it a try, and unfortunately it does
> not work.
>

Not sure whether this will work (or whether it will help in your case):

   
https://emacs.stackexchange.com/questions/60710/is-there-any-way-of-getting-overview-statistics-for-all-checkboxes-in-a-given-or/60747#60747

There are some links to other questions on Emacs SE that might (or
might not) be helpful.

> Best,
>
> Alan
>

-- 
Nick

"There are only two hard problems in computer science: cache
invalidation, naming things, and off-by-one errors." -Martin Fowler




Re: Bug: Infinite loop caused by org-agenda-property-list [9.4 (9.4-elpa @ /home/dsmasterson/.emacs.d/elpa/org-9.4/)]

2020-09-25 Thread Nick Dokos
David Masterson  writes:

> Nick Dokos  writes:
>
>> From what I can gather, this does not have much to do with Org mode
>> proper, which has no org-agenda-property-list at all. I presume that
>> you have
>>
>> https://github.com/Malabarba/org-agenda-property/blob/master/org-agenda-property.el
>>
>> installed, which does provide such a variable, but all that one can
>> say atm is that that library has a bug *or* is incompatible with
>> (current?) Org mode.  In either case, I think you should report it as
>> an issue to the above site.  Once they have figured out what is wrong,
>> then maybe an RFE against Org mode *might* be indicated.
>
> Ah!  That makes sense.  I'll look into it.
>

You might be able to work around the problem by having org-agenda-property put 
the
property on the same line:

   (setq org-agenda-property-position 'same-line)

and adjusting the position on the line with

   (setq org-agenda-property-column 100)

if necessary.

If the infinite loop goes away in that case, then you have some confirmation of 
your
theory about two-line agenda entries.

-- 
Nick

"There are only two hard problems in computer science: cache
invalidation, naming things, and off-by-one errors." -Martin Fowler




Re: org-tempo question

2020-09-24 Thread Nick Dokos
I can't say anything about indentation (I encounter problems that I
have not reported because of lack of time to investigate combined with
laziness - but I suspect they are, partly at least, of my own making).

But when I do `8---
#+NAME: third
#+begin_src org

- an item
  - subitem

  ,#+begin_example

  ,#+end_example

#+end_src

#+begin_example

#+end_example


--8<---cut here---end--->8---

The commas are important: are you not getting them?

-- 
Nick

"There are only two hard problems in computer science: cache
invalidation, naming things, and off-by-one errors." -Martin Fowler




Re: The Website Revamp: The final stretch

2020-09-24 Thread Nick Dokos


"collapsable" should be "collapsible".

-- 
Nick

"There are only two hard problems in computer science: cache
invalidation, naming things, and off-by-one errors." -Martin Fowler




Re: The Website Revamp: The final stretch

2020-09-24 Thread Nick Dokos
Nix on variant C from me.

Slight lean towards B, but I personally would be happy with either A or B.

Thanks!
-- 
Nick

"There are only two hard problems in computer science: cache
invalidation, naming things, and off-by-one errors." -Martin Fowler




Re: Bug: Infinite loop caused by org-agenda-property-list [9.4 (9.4-elpa @ /home/dsmasterson/.emacs.d/elpa/org-9.4/)]

2020-09-23 Thread Nick Dokos
>From what I can gather, this does not have much to do with Org mode
proper, which has no org-agenda-property-list at all. I presume that
you have

https://github.com/Malabarba/org-agenda-property/blob/master/org-agenda-property.el

installed, which does provide such a variable, but all that one can
say atm is that that library has a bug *or* is incompatible with
(current?) Org mode.  In either case, I think you should report it as
an issue to the above site.  Once they have figured out what is wrong,
then maybe an RFE against Org mode *might* be indicated.

-- 
Nick

"There are only two hard problems in computer science: cache
invalidation, naming things, and off-by-one errors." -Martin Fowler




Re: org-tables with monetary amounts

2020-09-23 Thread Nick Dokos
For fixed precision, you can either use an explicit format as Russell Adams 
points out,
or you can modify (globally or per file) the variable org-calc-default-modes. 
That's a
complicated variable and you only need to change one part of it for this:

(plist-put org-calc-default-modes 'calc-float-format '(fix 2))

See e.g. https://emacs.stackexchange.com/a/59181/14825 for some discussion.
-- 
Nick

"There are only two hard problems in computer science: cache
invalidation, naming things, and off-by-one errors." -Martin Fowler




Re: Infinite recursion ?

2020-09-22 Thread Nick Dokos
Nick Dokos  writes:

> What's the error message? Did you try setting `debug-on-eror'? Does that give
> a more useful backtrace?

Backtrace: no variable named `debug-on-eror' - maybe you made an eror :-)

Sigh - should be `debug-on-error'.

-- 
Nick

"There are only two hard problems in computer science: cache
invalidation, naming things, and off-by-one errors." -Martin Fowler




Re: Infinite recursion ?

2020-09-22 Thread Nick Dokos
David Masterson  writes:

> Haven't figured this out yet, but I seem to be hitting an "infinite
> recursion" bug that eventually dies when it runs out of memory.
>
> The scenario (so far) is trying to change an Org tag in the agenda
> (':'). The command gives me the tags that I then edit and save whereupon
> it sits in an infinite recursion until it hits a limit in Emacs. If I
> quit, the files seem to have been updated, but the Agenda isn't.  I'm
> still trying to figure out how to debug this.  Setting debug-on-quit was
> not consistent and didn't seem to have a large list of function calls
> (ie. the recursion).  Any ideas?
>
> This is Emacs 26.3 with Orgmode 9.4.  I'm also using Org-Super-Agenda
> from Melpa (20200310.1337).
>
> Side question that might be related: org-agenda started positioning
> itself at the end of the agenda rather than the beginning after building
> the agenda.  I don't think I changed something for this.  What could
> cause this?

What's the error message? Did you try setting `debug-on-eror'? Does that give
a more useful backtrace?

-- 
Nick

"There are only two hard problems in computer science: cache
invalidation, naming things, and off-by-one errors." -Martin Fowler




Re: creating png images in emails with org-mode

2020-09-18 Thread Nick Dokos
Eric S Fraga  writes:

> On Thursday, 17 Sep 2020 at 00:57, Nick Dokos wrote:
>> Apparently, recent versions of ImageMagick (version 7 seems to be one)
>> on (perhaps) some distros ship with a
>> /etc/ImageMagick-/policy.xml file that imposes restrictions
>> on what can be done. Here's an SE question with some information:
>
> Thank you.  Interesting.
>
> For the OP, it might be worth noting that the solution on the
> StackExchange page you linked to refers to the generation of PDF files
> from the LaTeX snippet; I would imagine that the fix noted will need to
> be adjusted for PNG files but cannot verify as I'm still on ImageMagick
> version 6 and don't have these issues.

Actually, it refers to the generation of PNG files from PDF files using
`convert' (I think). The `imagemagick' process of LaTeX preview uses
`pdflatex'to go from TeX to PDF and `convert' to go from PDF to PNG.

-- 
Nick

"There are only two hard problems in computer science: cache
invalidation, naming things, and off-by-one errors." -Martin Fowler




Re: creating png images in emails with org-mode

2020-09-16 Thread Nick Dokos
Joseph Vidal-Rosset  writes:

> Hello,
>
> One more time, my setup to create png image via LaTeX in email in org-mode is 
> broken.
>
> I get this error message:
>
> Creating LaTeX preview...
> org-compile-file: File "/tmp/orgtex2wp50c.png" wasn’t produced.  Please 
> adjust ‘imagemagick’ part of ‘org-preview-latex-process-alist’.
>
> Your help is welcome, because I do not understand what I have to do, how I 
> have to "adjust" imagemagick.
>
> Best wishes,
>
> Jo.
>

Apparently, recent versions of ImageMagick (version 7 seems to be one)
on (perhaps) some distros ship with a
/etc/ImageMagick-/policy.xml file that imposes restrictions
on what can be done. Here's an SE question with some information:


https://emacs.stackexchange.com/questions/31408/error-message-when-previewing-latex-snippet-in-org-file

-- 
Nick

"There are only two hard problems in computer science: cache
invalidation, naming things, and off-by-one errors." -Martin Fowler




Re: basic org questions

2020-09-16 Thread Nick Dokos
Emanuel Berg via "General discussions about Org-mode."  
writes:

> Matt Huszagh wrote:
>
>> Were you referring to the tables being centered
>> after export (I see from another part of this chain
>> that that's what you were referring to in the 3rd
>> question) when you wanted them left-aligned?
>> If that is the case, it would really help if you
>> specify that in your original question.
>> Appearance in an org-mode buffer and appearance in
>> the PDF, HTML, etc. after export are very different
>> things with very different configuration.
>
> Yes, after export to PDF, they are centered. they =
> the whole table items.

(setq org-latex-tables-centered nil)

-- 
Nick

"There are only two hard problems in computer science: cache
invalidation, naming things, and off-by-one errors." -Martin Fowler




#+ATTR_HTML examples uses old syntax

2020-09-12 Thread Nick Dokos
The attached patch fixes an example in the "Tables in HTML export"
section of the manual that uses the old `border="3"' syntax instead
of `:border 3' etc.

>From 52be0b5b1fe492b3ff44e6ccd6dbfaed1eb88537 Mon Sep 17 00:00:00 2001
From: Nick Dokos 
Date: Sat, 12 Sep 2020 17:47:29 -0400
Subject: [PATCH] Fix syntax of #+ATTR_HTML

The example in the "Tables in HTML export" section of the manual
uses the old syntax: `border="2"' etc.

Change it to use `:border 2' etc.
---
 doc/org-manual.org | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/doc/org-manual.org b/doc/org-manual.org
index 46498bd22..be60d99f6 100644
--- a/doc/org-manual.org
+++ b/doc/org-manual.org
@@ -12817,7 +12817,7 @@ following lines before the table in the Org file:
 #+cindex: @samp{ATTR_HTML}, keyword
 #+begin_example
 ,#+CAPTION: This is a table with lines around and between cells
-,#+ATTR_HTML: border="2" rules="all" frame="border"
+,#+ATTR_HTML: :border 2 :rules all :frame border
 #+end_example
 
 The HTML export back-end preserves column groupings in Org tables (see
-- 
2.25.4


-- 
Nick

"There are only two hard problems in computer science: cache
invalidation, naming things, and off-by-one errors." -Martin Fowler


Re: latex fragments compilation error when exporting to html

2020-08-31 Thread Nick Dokos
Jeremie Juste  writes:

> Hello 
>
> When I export test.org to html, the latex fragment fail to compile. 
> The reason is a star get added to the tabular environment. {tabular*}
> (see tmpfile.tex). 
>
> I don't know why the function insists in using the tabular* environment.
>
> From this point I would have two questions:
>
> How can I remove the star from the tabular environment ?
> How can I can I find the culprit?
> - I was hoping to provide a patch by finding the culprit but I got lost.
>   - I tried to debug-on-entry org-format-latex.
>   
>
> Best regards,
> Jeremie
>
>> test.org 
>
> #+OPTIONS:   H:3 num:t toc:nil \n:nil @:t ::t |:t ^:t -:t f:t *:t 
> tex:imagemagick title:nil author:nil date:nil
> #+LATEX_HEADER: \usepackage{booktabs}
>
>  \begin{tabular}{lll}
>  \toprule
>   1 & 2 & 3 \\
>   5 & 6 & 8 \\
>  \bottomrule
>  \end{tabular}
>   
>> tmpfile.tex
>
> ...
>
> {\color{fg}
> \begin{tabular*}{lll}
> \toprule
>  1 & 2 & 3 \\
>  5 & 6 & 8 \\
> \hline
> \end{tabular*}
> %
> }
>
>

I cannot reproduce it with Org mode version 9.3.7 (release_9.3.7-705-gea9463 @ 
/home/nick/src/emacs/org/org-mode/lisp/).
What version are you using?

-- 
Nick

"There are only two hard problems in computer science: cache
invalidation, naming things, and off-by-one errors." -Martin Fowler




Re: convert a org table to plain text

2020-08-26 Thread Nick Dokos
Uwe Brauer  writes:

>> Uwe Brauer  writes:
>
>> Does this:
>
>> 
>> https://stackoverflow.com/questions/17717483/howto-convert-org-mode-table-to-original-tabbed-format/17726489#17726489
>
>
> Yes, very much so. It would be great to have that code included in
> orgmode. Did anybody try to contact the author?
>

You mean orgtbl-to-tsv and related? All of that *is* part of Org mode. All you 
have to do is write a code block calling it
to convert.

-- 
Nick

"There are only two hard problems in computer science: cache
invalidation, naming things, and off-by-one errors." -Martin Fowler




Re: convert a org table to plain text

2020-08-25 Thread Nick Dokos
Uwe Brauer  writes:

> Hi 
>
> What is the inverse function to 
> org-table-convert-region?
>
> I am unable to find anything in the documentation or google.
>
> Regards
>
> We Brauer 
>
>
>

Does this:


https://stackoverflow.com/questions/17717483/howto-convert-org-mode-table-to-original-tabbed-format/17726489#17726489

help?

-- 
Nick

"There are only two hard problems in computer science: cache
invalidation, naming things, and off-by-one errors." -Martin Fowler




Re: [BUG] babel runs bash instead of zsh when sessions are used

2020-08-24 Thread Nick Dokos
Kyle Meyer  writes:

> Rudi C writes:
>
>> #+BEGIN_SRC zsh :session z1
>> echo $HOME $0
>> #+END_SRC
>>
>> #+RESULTS:
>> : /Users/evar /bin/bash
>
> What version of Org are you using?
>
> I tried with both the latest release (9.3.7) and the current master
> branch (220f2b0d9), using default configuration aside from
>
> (org-babel-do-load-languages
>  'org-babel-load-languages
>  '((shell . t)))
>
> I see "/usr/bin/zsh" in both cases.
>
>

I was able to reproduce it (with ksh, rather than zsh) on Org mode version 
9.3.7 (release_9.3.7-705-gea9463 @ /home/nick/elisp/org-mode/lisp/).

--8<---cut here---start->8---
#+BEGIN_SRC ksh :session z1
echo $HOME $0 $(which $0)
#+END_SRC

#+RESULTS:
: /home/nick /bin/bash /bin/bash

#+BEGIN_SRC ksh
echo $HOME $0 $(which $0)
#+END_SRC

#+RESULTS:
: /home/nick ksh /usr/bin/ksh

--8<---cut here---end--->8---

-- 
Nick

"There are only two hard problems in computer science: cache
invalidation, naming things, and off-by-one errors." -Martin Fowler




Re: configure separator in org-table-insert-hline

2020-08-24 Thread Nick Dokos
Vladimir Alexiev  writes:

> How can I use radio tables for that?
>

By writing a translation function, similar to 
orgtbl-to-{csv,latex,html,texinfon,unicode,orgtbl}.
See

  (info "(org) Tables in Arbitrary Syntax")

-- 
Nick

"There are only two hard problems in computer science: cache
invalidation, naming things, and off-by-one errors." -Martin Fowler




Re: Bug: :results raw replace header args for a code block don't replace [9.3.7 (9.3.7-18-g093b47-elpaplus @ /Users/skoshelev/.emacs.d/elpa/26.2/develop/org-plus-contrib-20200810/)]

2020-08-21 Thread Nick Dokos
TEC  writes:

> Julius Dittmar  writes:  
>> as far as I know this is no bug. Reason: How could org tell where
>> the old results end? There's no end marker. Thus instead of removing
>> everything that follows, it refrains from removing anything. 
>
> This is my understanding. It's also why I tend to use
>
> :results raw drawer
>

You mean `:results drawer'? There is no reason to include `raw'.

-- 
Nick

"There are only two hard problems in computer science: cache
invalidation, naming things, and off-by-one errors." -Martin Fowler




Bug: inserting capture template [9.3.7 (release_9.3.7-705-gea9463 @ /home/nick/elisp/org-mode/lisp/)]

2020-08-04 Thread Nick Dokos

This was reported in 
https://emacs.stackexchange.com/questions/59928/org-capture-at-point-as-sibling-of-heading

I was able to reproduce it starting from emacs -q with the following ECM:

   emacs -q -l min.el foo.org

where min.el  looks like this (adjust load-path to taste):
--8<---cut here---start->8---

(add-to-list 'load-path "~/src/org-mode/org-mode/lisp")

(require 'org-loaddefs)

(add-to-list 'auto-mode-alist '("\\.org\\'" . org-mode))

(global-set-key "\C-cl" 'org-store-link)
(global-set-key "\C-cc" 'org-capture)
(global-set-key "\C-ca" 'org-agenda)


(setq org-capture-templates
  '(("a" "Appointment or call" entry (file+headline "~/todo.org" "Tasks")
 "* APPT %?\n %u")))
--8<---cut here---end--->8---

and foo.org looks like this (| is the position of the cursor):


--8<---cut here---start->8---
* foo

** one

*** two

 three
|
 four
--8<---cut here---end--->8---

In current Org mode, doing `C-0 M-x org-capture RET a' (where "a"
gets me an APPT template - see below), I get:
--8<---cut here---start->8---
* foo
** one

*** two

 three
* APPT 
  [2020-08-04 Tue 12:58]
 four
--8<---cut here---end--->8---

with the template at top level.

In 9.2, the same operation inserted a template as a sibling of the headline:

--8<---cut here---start->8---
* foo
** one
   
*** two

 three
 APPT 
 [2020-08-04 Tue 12:58]
 four
--8<---cut here---end--->8---

The current behavior looks like a bug to me, so I bisected it to the following 
commit:

--8<---cut here---start->8---
0201d1c0cc367fea0e561ba113f02f263b0ed501 is the first bad commit
commit 0201d1c0cc367fea0e561ba113f02f263b0ed501
Author: Nicolas Goaziou 
Date:   Sat Jul 6 15:59:12 2019 +0200

Fix inserting capture templates at point

* lisp/org-capture.el (org-capture):
(org-capture-set-target-location):
(org-capture-place-entry):
(org-capture-place-item):
(org-capture-place-table-line): Fix inserting capture templates at
point.  Insert a new internal property for capture
template: :insert-here.
(org-capture-insert-template-here): Remove function.

* testing/lisp/test-org-capture.el (test-org-caputre/entry):
(test-org-capture/item):
(test-org-capture/table-line): Add tests.

Reported-by: Dominic Surano 


 etc/ORG-NEWS |   4 +-
 lisp/org-capture.el  | 126 +++
 testing/lisp/test-org-capture.el |  58 +-
 3 files changed, 104 insertions(+), 84 deletions(-)
--8<---cut here---end--->8---

HTH


---

Emacs  : GNU Emacs 28.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 2.24.32, 
cairo version 1.16.0)
 of 2020-06-15
Package: Org mode version 9.3.7 (release_9.3.7-705-gea9463 @ 
/home/nick/elisp/org-mode/lisp/)

-- 
Nick

"There are only two hard problems in computer science: cache
invalidation, naming things, and off-by-one errors." -Martin Fowler




Re: File local setting for export directory?

2020-08-03 Thread Nick Dokos
Russell Adams  writes:

> On Mon, Aug 03, 2020 at 04:15:22PM +0200, Loris Bennett wrote:
>> I want to export an org file to a pdf and have the pdf created in
>> subdirectory relative to the org file.
>>
>> What's the simplest way to set the export directory in a file local way?
>
> Can you just set your EXPORT_FILE_NAME  to include that directory?
>
> #+EXPORT_FILE_NAME: subdir/Thing.html
>
> You might need a FQPN. You'll have to test.
>

Unfortunately, this produces the tex file in the subdir, but the
xelatex/pdflatex process is still run in the current directory, with
`subdir/file.tex' as input file, so it produces the PDF in the current
directory.

I was wondering why Eric A. suggested a patch, but I guess this
is the reason (N.B. I haven't tried his patch).

-- 
Nick

"There are only two hard problems in computer science: cache
invalidation, naming things, and off-by-one errors." -Martin Fowler




Re: Search for an entry expands parent

2020-07-20 Thread Nick Dokos
Gt Uit  writes:

>  
>  
> 18.07.2020, 18:48, "Kyle Meyer" :
>
> Gt Uit writes:
>  
>
>  Updates since my last email:
>  - Sometimes the first C-s yields intended result (minimal), with
>  subsequent C-s searches expanding all entries.
>  - I tried on Emacs 28.0.50 and am getting the same results.
>  - I tried with emacs -Q and isearch minimal behaves properly!
>  - I tried a live distribution (Linux Mint 20 Ulyana, same
>  distribution I am currently using) and isearch minimal behaves
>  properly.
>  - I tried the following without any success:
>  + Remove all emacs related packages and reinstall emacs (via apt)
>  + Install emacs from snap.
>   
>  Now that I have narrowed down the bug to be something local to my
>  current installation please advise on how to debug/resolve.
>
> Something that might give you a clue about what's going on is stepping
> through org-show-set-visibility, comparing what happens when it works as
> expected and what happens when it doesn't. If you haven't used Edebug
> before, take a look at its node in the Elisp manual:
> (info "(elisp)Edebug")
>
> Thanks for pointing me to Edebug, a tremendously useful tool.
>  
> I got the following:
>  - Executed:
>    + M-x find-function org-show-set-visibility
>    + C-u C-M-x (edebug-defun)
>  - The first time I launch emacs, the function org-show-set-visibility is
>    called and I can step through the code via Edebug

Typing "d" at this point should give you a stack trace, so you can figure out
who called it.

> - Subsequent calls do not invoke org-show-set-visibility
>  
> I didn't mention earlier that I got this bug after upgrading from Linux
> Mint 19.3 to Linux Mint 20.
>  
> Can you please point me to what to further debug, in particular function
> that is called before org-show-set-visibility.
>  
> Gt Uit
>  
>  
>

-- 
Nick

"There are only two hard problems in computer science: cache
invalidation, naming things, and off-by-one errors." -Martin Fowler




Re: Wring case when using org-insert-structure-template

2020-07-10 Thread Nick Dokos
Nicolas Goaziou  writes:

>> Second question: I couldn't find any configuration variable or
>> function to change the default behaviour. Is there a way to do so?
>
> You can customize `org-structure-template-alist'. I don't remember if
> that's possible in Org 9.1.9, tho.
>
But you cannot change the case of the begin/end that way, so it would be entered
in mixed case:

#+begin_SRC ...
..
#+end_SRC

(I think - but I have not tested.)
-- 
Nick

"There are only two hard problems in computer science: cache
invalidation, naming things, and off-by-one errors." -Martin Fowler




Re: [PATCH] agenda: Fold case when retrieving user-configured effort values

2020-07-09 Thread Nick Dokos
Kyle Meyer  writes:

> Nick Dokos writes:
>
>> BTW, I just thought of a possible problem: the manual says that property
>> keys are case-insensitive (although all the examples I can find spell
>> "_ALL" in upper case, but if I write
>>
>>   :PROPERTIES:
>>   :foo_all: bar baz
>>   :END:
>>
>> I don't think that the code is going to handle it correctly. There
>> are other places that also use "_ALL" without a let of case-fold-search
>> (at least AFAICT).
>>
>> Am I paranoid or is this a problem?
>
> case-fold-search is let-bound to t at the beginning of
> org-buffer-property-keys, so the added string-match is covered.
>

Wow - not only paranoid but blind as well.

> When collecting keys, there's no attempt to normalize to upper or lower,
> so the delete-dups call won't take care of any keys that are present in
> various case styles.  I don't think that's something worth worrying
> about (and perhaps it's even preferable, since we can't know which
> variant the caller would want to complete).
>
> As for other spots in the code base: looking through grep hits for
> "_ALL", it seems like most should be okay because they go through
> org-entry-get.  Two places in org-agenda are case-sensitive, though.
>
> -- >8 --
> Subject: [PATCH] agenda: Fold case when retrieving user-configured effort
>  values
>
> * lisp/org-agenda.el (org-agenda-filter-by-effort):
> (org-agenda-filter-completion-function): Ignore case when querying
> effort property key in org-global-properties since property keys are
> documented as case-insensitive.
> ---
>  lisp/org-agenda.el | 10 ++
>  1 file changed, 6 insertions(+), 4 deletions(-)
>
> diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
> index 90129b23e..5c2933b0a 100644
> --- a/lisp/org-agenda.el
> +++ b/lisp/org-agenda.el
> @@ -7611,8 +7611,9 @@ (defun org-agenda-filter-by-effort (strip-or-accumulate)
>  consistency with the other filter commands."
>(interactive "P")
>(let* ((efforts (split-string
> -(or (cdr (assoc (concat org-effort-property "_ALL")
> -org-global-properties))
> +(or (cdr (assoc-string (concat org-effort-property "_ALL")
> +   org-global-properties
> +   t))
>  "0 0:10 0:30 1:00 2:00 3:00 4:00 5:00 6:00 7:00")))
>;; XXX: the following handles only up to 10 different
>;; effort values.
> @@ -,8 +7778,9 @@ (defun org-agenda-filter-completion-function (string 
> _predicate  flag)
> (org-agenda-get-represented-tags
>   ((member operator '("<" ">" "="))
>(setq table (split-string
> -(or (cdr (assoc (concat org-effort-property "_ALL")
> -org-global-properties))
> +(or (cdr (assoc-string (concat org-effort-property "_ALL")
> +   org-global-properties
> +   t))
>  "0 0:10 0:30 1:00 2:00 3:00 4:00 5:00 6:00 7:00")
>  " +")))
>   (t (setq table nil)))
>
> base-commit: eac255d911e0793513b2e2f14b06b94194a04daf

Thanks! LGTM.

-- 
Nick




Re: [PATCH] org: add property names from #+PROPERTY keywords to completion list

2020-07-08 Thread Nick Dokos
Kyle Meyer  writes:

> Nick Dokos writes:
>
>> Here's the amended patch: it includes the fixes from Kyle's review, the 
>> modification
>> he suggested that adds the plain property for each _ALL property to the list
>> and a few test cases to the test/org-buffer-property-keys test.
>
> Thank you for the updates.  Applied (bc4fa8a00).
>
>> -nil)))
>> +;; Get property names from #+PROPERTY keywords as well
>> +(mapcar (lambda (s)
>> +  (nth 0 (split-string s)))
>> +(cdar (org-collect-keywords '("PROPERTY"
>> +nil))
>
> I didn't spot it earlier, but this nil (not added by your patch) is
> unnecessary.  Since the patch is touching the line anyway, I've dropped
> it on apply.
>
>> +bare-props)
>>  (org-with-wide-buffer
>>   (goto-char (point-min))
>>   (while (re-search-forward org-property-start-re nil t)
>> @@ -13132,7 +13137,15 @@ COLUMN formats in the current buffer."
>>   (let ((p (match-string-no-properties 1 value)))
>> (unless (member-ignore-case p org-special-properties)
>>   (push p props))
>> -(sort (delete-dups props) (lambda (a b) (string< (upcase a) (upcase 
>> b))
>> +(sort (delete-dups (append props
>> +   ;; for each xxx_ALL property, make sure
>> +   ;; the bare xxx property is also
>> +   ;; included
>> +   (dolist (x props bare-props)
>> + (if (string-match "_ALL\\b" x)
>> + (setq bare-props (cons (substring x 0 -4)
>> +bare-props))
>
> I did a cosmetic rewrite here to use mapcar, which I hope you won't
> mind.
>

BTW, I just thought of a possible problem: the manual says that property
keys are case-insensitive (although all the examples I can find spell
"_ALL" in upper case, but if I write

  :PROPERTIES:
  :foo_all: bar baz
  :END:

I don't think that the code is going to handle it correctly. There
are other places that also use "_ALL" without a let of case-fold-search
(at least AFAICT).

Am I paranoid or is this a problem?

-- 
Nick




Re: [PATCH] org: add property names from #+PROPERTY keywords to completion list

2020-07-08 Thread Nick Dokos
Kyle Meyer  writes:

> Nick Dokos writes:
>
>> Here's the amended patch: it includes the fixes from Kyle's review, the 
>> modification
>> he suggested that adds the plain property for each _ALL property to the list
>> and a few test cases to the test/org-buffer-property-keys test.
>
> Thank you for the updates.  Applied (bc4fa8a00).
>
>> -nil)))
>> +;; Get property names from #+PROPERTY keywords as well
>> +(mapcar (lambda (s)
>> +  (nth 0 (split-string s)))
>> +(cdar (org-collect-keywords '("PROPERTY"
>> +nil))
>
> I didn't spot it earlier, but this nil (not added by your patch) is
> unnecessary.  Since the patch is touching the line anyway, I've dropped
> it on apply.
>
>> +bare-props)
>>  (org-with-wide-buffer
>>   (goto-char (point-min))
>>   (while (re-search-forward org-property-start-re nil t)
>> @@ -13132,7 +13137,15 @@ COLUMN formats in the current buffer."
>>   (let ((p (match-string-no-properties 1 value)))
>> (unless (member-ignore-case p org-special-properties)
>>   (push p props))
>> -(sort (delete-dups props) (lambda (a b) (string< (upcase a) (upcase 
>> b))
>> +(sort (delete-dups (append props
>> +   ;; for each xxx_ALL property, make sure
>> +   ;; the bare xxx property is also
>> +   ;; included
>> +   (dolist (x props bare-props)
>> + (if (string-match "_ALL\\b" x)
>> + (setq bare-props (cons (substring x 0 -4)
>> +bare-props))
>
> I did a cosmetic rewrite here to use mapcar, which I hope you won't
> mind.

Not at all - thanks!

>
> Thanks again.
>
>

-- 
Nick




Re: [PATCH] org: add property names from #+PROPERTY keywords to completion list

2020-07-07 Thread Nick Dokos
Here's the amended patch: it includes the fixes from Kyle's review, the 
modification
he suggested that adds the plain property for each _ALL property to the list
and a few test cases to the test/org-buffer-property-keys test.

--8<---cut here---start->8---
>From 60b9ababe42c91ec6fcd2c53f6923d75daa12454 Mon Sep 17 00:00:00 2001
From: Nick Dokos 
Date: Mon, 6 Jul 2020 21:49:41 -0400
Subject: [PATCH] org: add property names from #+PROPERTY keywords to
 completion list

* lisp/org.el (org-buffer-property-keys): Enhance the completion list
with property names from #+PROPERTY keywords, not just property
drawers. Also, for each xxx_ALL property, make sure that the bare xxx
property is added too.

* testing/lisp/test-org.el (test-org/buffer-property-keys): Add test
cases for #+PROPERTY keywords and also for xxx_ALL --> xxx properties.

See https://emacs.stackexchange.com/questions/59448/ for details.
---
 lisp/org.el  | 17 +++--
 testing/lisp/test-org.el | 21 +
 2 files changed, 36 insertions(+), 2 deletions(-)

diff --git a/lisp/org.el b/lisp/org.el
index 4a1a83d0f..ccdb0dd5c 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -13084,7 +13084,12 @@ COLUMN formats in the current buffer."
(props (append
(and specials org-special-properties)
(and defaults (cons org-effort-property org-default-properties))
-   nil)))
+   ;; Get property names from #+PROPERTY keywords as well
+   (mapcar (lambda (s)
+ (nth 0 (split-string s)))
+   (cdar (org-collect-keywords '("PROPERTY"
+   nil))
+   bare-props)
 (org-with-wide-buffer
  (goto-char (point-min))
  (while (re-search-forward org-property-start-re nil t)
@@ -13132,7 +13137,15 @@ COLUMN formats in the current buffer."
 (let ((p (match-string-no-properties 1 value)))
   (unless (member-ignore-case p org-special-properties)
 (push p props))
-(sort (delete-dups props) (lambda (a b) (string< (upcase a) (upcase b))
+(sort (delete-dups (append props
+  ;; for each xxx_ALL property, make sure
+  ;; the bare xxx property is also
+  ;; included
+  (dolist (x props bare-props)
+(if (string-match "_ALL\\b" x)
+(setq bare-props (cons (substring x 0 -4)
+   bare-props))
+ (lambda (a b) (string< (upcase a) (upcase b))
 
 (defun org-property-values (key)
   "List all non-nil values of property KEY in current buffer."
diff --git a/testing/lisp/test-org.el b/testing/lisp/test-org.el
index 30a8067db..61e642d4f 100644
--- a/testing/lisp/test-org.el
+++ b/testing/lisp/test-org.el
@@ -5409,6 +5409,27 @@ Paragraph"
(equal '("A")
  (org-test-with-temp-text "* H\n:PROPERTIES:\n:A: 1\n:A+: 2\n:END:"
(org-buffer-property-keys
+  ;; Add bare property if xxx_ALL property is there
+  (should
+   (equal '("A" "B" "B_ALL")
+ (org-test-with-temp-text "* H\n:PROPERTIES:\n:A: 1\n:A+: 2\n:B_ALL: 
foo bar\n:END:"
+   (org-buffer-property-keys
+  ;; Add bare property if xxx_ALL property is there - check dupes
+  (should
+   (equal '("A" "B" "B_ALL")
+ (org-test-with-temp-text "* H\n:PROPERTIES:\n:A: 1\n:B: 2\n:B_ALL: 
foo bar\n:END:"
+   (org-buffer-property-keys
+  ;; Retrieve properties from #+PROPERTY keyword lines
+  (should
+   (equal '("A" "C")
+ (org-test-with-temp-text "#+PROPERTY: C foo\n* H\n:PROPERTIES:\n:A: 
1\n:A+: 2\n:END:"
+   (org-buffer-property-keys
+  ;; Retrieve properties from #+PROPERTY keyword lines - make sure an _ALL 
property also
+  ;; adds the bare property
+  (should
+   (equal '("A" "C" "C_ALL")
+ (org-test-with-temp-text "#+PROPERTY: C_ALL foo bar\n* 
H\n:PROPERTIES:\n:A: 1\n:A+: 2\n:END:"
+   (org-buffer-property-keys
   ;; With non-nil COLUMNS, extract property names from columns.
   (should
(equal '("A" "B")
-- 
2.25.1

--8<---cut here---end--->8---

-- 
Nick

"There are only two hard problems in computer science: cache
invalidation, naming things, and off-by-one errors." -Martin Fowler




Re: [PATCH] org: add property names from #+PROPERTY keywords to completion list

2020-07-07 Thread Nick Dokos
Kyle Meyer  writes:

> ,,,
> I think this patch is a clear improvement as is, but in the context of
> completion (and the stack exchange post you link to), isn't the handling
> around *_ALL keywords still a bit off?  It seems a caller would want to
> complete without the _ALL; to use the example from that post, with
> "#+PROPERTY: GENRE_ALL ...", the caller would want to complete "GENRE".
> Is it worth providing special handling here?
>

With a bit of caffeine in my system, I now see what you wrote and I
think you are right: if the _ALL property is present, then the bare
property should be added to the completion list if not already there.

-- 
Nick

"There are only two hard problems in computer science: cache
invalidation, naming things, and off-by-one errors." -Martin Fowler




Re: [PATCH] org: add property names from #+PROPERTY keywords to completion list

2020-07-07 Thread Nick Dokos
Hi Kyle,

thanks for the review.

Kyle Meyer  writes:

> Nick Dokos writes:
>
>> Here's a patch to enhance the property name completion list with names from
>> #+PROPERTY keyword lines: at the moment, only property names found in 
>> property
>> drawers are used to populate the completion list.
>
> Thanks for the patch.
>
>> org: add property names from #+PROPERTY keywords to completion list
>>
>> * lisp/org.el (org-buffer-property-keys): ehhance the completion list
>
> Typo: enhance.  And as a convention nit, it should be capitalized.
>
Fixed.

>> with property names from #+PROPERTY keywords, not just property
>> drawers.
>>
>> ... 
>> +(mapcar (lambda (s)
>> +  (let ((split (split-string s)))
>> +(nth 0 split)))
>> +(cdar (org-collect-keywords '("PROPERTY"
>>  nil)))
>
> IMO the let-binding doesn't add any clarity over
>
>   (nth 0 (split-string s))
>
Fixed.
>
> I wondered about possible duplicates, but it looks like
> org-buffer-property-keys already takes care of that at the end.
>
> I think this patch is a clear improvement as is, but in the context of
> completion (and the stack exchange post you link to), isn't the handling
> around *_ALL keywords still a bit off?  It seems a caller would want to
> complete without the _ALL; to use the example from that post, with
> "#+PROPERTY: GENRE_ALL ...", the caller would want to complete "GENRE".
> Is it worth providing special handling here?
>
>
My assumption was that one could put in two properties (that's what
the OP was doing in his setup file): a GENRE_ALL one already properly
set-up and the corresponding bare GENRE property as a placeholder with
an empty value, just to get the completion. It seems to me like a
reasonable way to do it, without making org-buffer-property-keys too
opinionated.

I could see stripping all the _ALL suffixes from the property names
at the end, but personally it just makes me a bit queasy :) But if
there is consensus one way or the other, I'd be happy to implement it.

Here's the updated patch:

--8<---cut here---start->8---
>From 50c625f935d5581952d37801943550ff44c473ff Mon Sep 17 00:00:00 2001
From: Nick Dokos 
Date: Mon, 6 Jul 2020 21:49:41 -0400
Subject: [PATCH] org: add property names from #+PROPERTY keywords to
 completion list

* lisp/org.el (org-buffer-property-keys): Enhance the completion list
with property names from #+PROPERTY keywords, not just property
drawers.

See https://emacs.stackexchange.com/questions/59448/ for details.
---
 lisp/org.el | 4 
 1 file changed, 4 insertions(+)

diff --git a/lisp/org.el b/lisp/org.el
index 4a1a83d0f..8deaa1ed9 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -13084,6 +13084,10 @@ COLUMN formats in the current buffer."
(props (append
(and specials org-special-properties)
(and defaults (cons org-effort-property org-default-properties))
+   ;; Get property names from #+PROPERTY keywords as well
+   (mapcar (lambda (s)
+ (nth 0 (split-string s)))
+   (cdar (org-collect-keywords '("PROPERTY"
nil)))
 (org-with-wide-buffer
  (goto-char (point-min))
-- 
2.25.1

--8<---cut here---end--->8---

-- 
Nick

"There are only two hard problems in computer science: cache
invalidation, naming things, and off-by-one errors." -Martin Fowler




Re: [PATCH] org: add property names from #+PROPERTY keywords to completion list

2020-07-06 Thread Nick Dokos
Adding a simple test to the previous patch:

--8<---cut here---start->8---
>From cae6b5596f69968003c053f53cb45ffb4139a5ad Mon Sep 17 00:00:00 2001
From: Nick Dokos 
Date: Mon, 6 Jul 2020 21:07:01 -0400
Subject: [PATCH] org: add property names from #+PROPERTY keywords to
 completion list

* lisp/org.el (org-buffer-property-keys): ehhance the completion list
with property names from #+PROPERTY keywords, not just property
drawers.

See https://emacs.stackexchange.com/questions/59448/ for details.
---
 lisp/org.el  | 5 +
 testing/lisp/test-org.el | 5 +
 2 files changed, 10 insertions(+)

diff --git a/lisp/org.el b/lisp/org.el
index 748c058ca..0e83162e8 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -13084,6 +13084,11 @@ COLUMN formats in the current buffer."
(props (append
(and specials org-special-properties)
(and defaults (cons org-effort-property org-default-properties))
+   ;; Get property names from #+PROPERTY keywords as well
+   (mapcar (lambda (s)
+ (let ((split (split-string s)))
+   (nth 0 split)))
+   (cdar (org-collect-keywords '("PROPERTY"
nil)))
 (org-with-wide-buffer
  (goto-char (point-min))
diff --git a/testing/lisp/test-org.el b/testing/lisp/test-org.el
index 3c563f344..ddda96105 100644
--- a/testing/lisp/test-org.el
+++ b/testing/lisp/test-org.el
@@ -5352,6 +5352,11 @@ Paragraph"
(equal '("A")
  (org-test-with-temp-text "* H\n:PROPERTIES:\n:A: 1\n:A+: 2\n:END:"
(org-buffer-property-keys
+  ;; Retrieve properties from #+PROPERTY keyword lines
+  (should
+   (equal '("A" "C")
+ (org-test-with-temp-text "#+PROPERTY: C foo\n* H\n:PROPERTIES:\n:A: 
1\n:A+: 2\n:END:"
+(org-buffer-property-keys
   ;; With non-nil COLUMNS, extract property names from columns.
   (should
(equal '("A" "B")
-- 
2.25.4
--8<---cut here---end--->8---


-- 
Nick

"There are only two hard problems in computer science: cache
invalidation, naming things, and off-by-one errors." -Martin Fowler




[PATCH] org: add property names from #+PROPERTY keywords to completion list

2020-07-06 Thread Nick Dokos
Here's a patch to enhance the property name completion list with names from
#+PROPERTY keyword lines: at the moment, only property names found in property
drawers are used to populate the completion list.

Keith Pinson posted the question on Emacs SE:

https://emacs.stackexchange.com/questions/59448/

Please let me know if the patch looks reasonable. If it does, I should
probably add a test.

Thanks!

--8<---cut here---start->8---
org: add property names from #+PROPERTY keywords to completion list

* lisp/org.el (org-buffer-property-keys): ehhance the completion list
with property names from #+PROPERTY keywords, not just property
drawers.

See https://emacs.stackexchange.com/questions/59448/ for details.
---
 lisp/org.el | 5 +
 1 file changed, 5 insertions(+)

diff --git a/lisp/org.el b/lisp/org.el
index 748c058ca..0e83162e8 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -13084,6 +13084,11 @@ COLUMN formats in the current buffer."
(props (append
(and specials org-special-properties)
(and defaults (cons org-effort-property org-default-properties))
+   ;; Get property names from #+PROPERTY keywords as well
+   (mapcar (lambda (s)
+ (let ((split (split-string s)))
+   (nth 0 split)))
+   (cdar (org-collect-keywords '("PROPERTY"
nil)))
 (org-with-wide-buffer
  (goto-char (point-min))
-- 
2.25.1
--8<---cut here---end--->8---

-- 
Nick

"There are only two hard problems in computer science: cache
invalidation, naming things, and off-by-one errors." -Martin Fowler




Bug: Clock table documentation [9.3.7 (release_9.3.7-644-ge3a724 @ /home/nick/elisp/org-mode/lisp/)]

2020-06-22 Thread Nick Dokos



Remember to cover the basics, that is, what you expected to happen and
what in fact did happen.  You don't know how to make a good report?  See

 https://orgmode.org/manual/Feedback.html#Feedback

Your bug report will be posted to the Org mailing list.


There is a sentence in the section "The clock table" of doc/org-manual.org
that seems to have been clipped. It's part of the paragraph that begins
on line 6600 of that file:

,
| The =#+BEGIN= line and specify a number of options to define the
| scope, structure, and formatting of the report.  Defaults for all
| these options can be configured in the variable
| ~org-clocktable-defaults~.
`

There's obviously something garbled there, but I'm not sure how it should go.


Emacs  : GNU Emacs 28.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 2.24.32, 
cairo version 1.16.0)
 of 2020-06-15
Package: Org mode version 9.3.7 (release_9.3.7-644-ge3a724 @ 
/home/nick/elisp/org-mode/lisp/)
-- 
Nick

"There are only two hard problems in computer science: cache
invalidation, naming things, and off-by-one errors." -Martin Fowler




Re: multiple EXPORT_LATEX_HEADER lines

2020-06-16 Thread Nick Dokos
Dominik Schrempf  writes:

> Hello,
>
> are you looking for, e.g.,
>
> #+latex_header: \addbibresource{bibliography.bib}
> #+latex_header_extra: do some stuff
> #+latex_header_extra: and even more
>
> I don't use the EXPORT keyword at the beginning, I am not sure if it is 
> needed.
>
> Best,
> Dominik

Just as a clarification: the "_extra" here does not mean "append to previous 
value".

The only difference between "#+latex_header: " and #+latex_header_extra: " is
that anything specified in the former is *also* used when constructing the 
header
for the LaTeX file for previewing LaTeX fragments, whereas anything specified 
in the
latter is only used when exporting: it is not used when previewing.

See

(info "(org) LaTeX header and sectioning")

which says:

,
|The LaTeX export back-end appends values from ‘LATEX_HEADER’ and
| ‘LATEX_HEADER_EXTRA’ keywords to the LaTeX header.  The docstring for
| ‘org-latex-classes’ explains in more detail.  Also note that LaTeX
| export back-end does not append ‘LATEX_HEADER_EXTRA’ to the header when
| previewing LaTeX snippets (see *note Previewing LaTeX fragments::).
`

and the code in ox-latex.el:org-latex-make-preamble.

>
> Alan Schmitt  writes:
>
>> Hello,
>>
>> I would like to have a multi-line export header when exporting a
>> subtree. I tried this:
>>
>> :EXPORT_LATEX_HEADER: \makeatletter
>> :EXPORT_LATEX_HEADER+: \@setplength{refvpos}{\useplength{toaddrvpos}}
>> :EXPORT_LATEX_HEADER+: \makeatother
>>
>> The problem is that it's exported on a single line, and as such it does
>> not work. Is there a way to have the multiple properties exported as
>> multiple lines, or to specify in the property there is a line break?
>>
>> Thanks,
>>
>> Alan
>
>
>

-- 
Nick

"There are only two hard problems in computer science: cache
invalidation, naming things, and off-by-one errors." -Martin Fowler




Re: org-babel :colnames yes

2020-05-28 Thread Nick Dokos
Would this work for you?

--8<---cut here---start->8---
#+BEGIN_SRC elisp :colnames yes
 '((one two) hline (1 3) (1 6))
#+END_SRC

#+RESULTS:
| one | two |
|-+-|
|   1 |   3 |
|   1 |   6 |

--8<---cut here---end--->8---

-- 
Nick

"There are only two hard problems in computer science: cache
invalidation, naming things, and off-by-one errors." -Martin Fowler




Re: issue in orgmode manual

2020-05-21 Thread Nick Dokos
Bastien  writes:

> Hi Nick and John,
>
> this issue should be fixed now, thanks for reporting it.

It is fixed AFAICT - thanks!

-- 
Nick

"There are only two hard problems in computer science: cache
invalidation, naming things, and off-by-one errors." -Martin Fowler




Re: issue tracker?

2020-05-18 Thread Nick Dokos
Anthony Carrico  writes:

> Does org-mode have an issue tracker, to keep track of which issues are 
> active, or is it just this mailing list?

Just this mailing list.

-- 
Nick

"There are only two hard problems in computer science: cache
invalidation, naming things, and off-by-one errors." -Martin Fowler




Re: Bug: Asterisk inside example is incorrectly parsed [9.3 (release_9.3 @ /usr/share/emacs/27.0.91/lisp/org/)]

2020-05-18 Thread Nick Dokos
You need to quote the asterisk with a comma:

#+begin_example
,* I am not supposed to be a section
#+end_example

See

 (info "(Org) Literal Examples")


-- 
Nick

"There are only two hard problems in computer science: cache
invalidation, naming things, and off-by-one errors." -Martin Fowler




Re: issue in orgmode manual

2020-05-18 Thread Nick Dokos
John Hendy  writes:

> I ran into this as well and did not see a response back from the list
> yet. Emailed about just this issue last week.
>
> https://www.mail-archive.com/emacs-orgmode@gnu.org/msg127933.html
>
> John
>
>
> On Sat, May 16, 2020 at 10:21 AM Max Mustermann
>  wrote:
>>
>> Hey,
>> On https://orgmode.org/manual/LaTeX-Export.html#Tables-in-LaTeX-export,
>> 13.10.5 -13.10.11 refer back to its parent 13.10
>> same with 13.9.6-13.9.11 and probably others.
>>
>> Sorry if this is already known or intended.
>>
>> Have a nice weekend.
>
>

Yes, it has been reported a couple more times, but nothing has been
done about it. My hunch is that Bastien takes care of orgmode.org,
but with the current Covid-19 crisis, he is extremely busy and he
may not be reading the list at all.

-- 
Nick

"There are only two hard problems in computer science: cache
invalidation, naming things, and off-by-one errors." -Martin Fowler




Re: Bug - all org files open as if visibilty is set to "showeverything"

2020-05-13 Thread Nick Dokos
Charles Millar  writes:

> Hi,
>
> In the last two or three days, all my org files open as if I have set 
> the visibility in every file to
>
> #+STARTUP: showeverything
>
> Org mode version 9.3.6 (release_9.3.6-619-g434940 @ 
> /usr/local/share/org-mode/lisp/)
> GNU Emacs 28.0.50 (build 123, x86_64-pc-linux-gnu, GTK+ Version 3.24.20, 
> cairo version 1.16.0) of 2020-05-13
>
> As far as I recall, I have not changed any settings in my init or elsewhere.
>
> Charlie Millar
>
>

That is correct. It's been discussed in the list and Nicolas announced that it's
been merged into master on Tuesday. Look for the thread entitled

   [RFC] Change default value for `org-startup-folded'?

It can also be found at 


C-h v org-startup-folded RET

You can get the previous default by setting it to t in your init file.

-- 
Nick

"There are only two hard problems in computer science: cache
invalidation, naming things, and off-by-one errors." -Martin Fowler




Re: Section about latex export is broken in the html manual?

2020-04-28 Thread Nick Dokos
Niclas Borlin  writes:

> Hi,
>
> As far as I can tell, several links of section 10.13 LaTeX Export
> (https://orgmode.org/manual/LaTeX-Export.html) are broken (last
> checked 2020-04-28 19:15 UTC).
>
> The first four links on the page point to useful pages, i.e., clicking
> on "Quoting LaTeX code:" will get you to 
> https://orgmode.org/manual/Quoting-LaTeX-code.html#Quoting-LaTeX-code,
> that contains section 13.10.4 Quoting LaTeX code.
>
> However, from the link "Tables in LaTeX export" downwards, you are
> linked back to the same page. For instance, clicking on "Tables in
> LaTeX export" will get you to 
> https://orgmode.org/manual/LaTeX-Export.html#Tables-in-LaTeX-export. (I
> suspect the content of the page should be an updated version of 
> https://www.gnu.org/software/emacs/manual/html_node/org/Tables-in-LaTeX-export.html.)
>
> I suspect this is a link naming issue in the .org version of the
> manual. Can anyone fix this?
>
I can confirm your findings, but I don't see anything wrong in the
.org version of the manual: I exported it to .html locally and that
works fine. But I'm not sure what happens on the way from one's local
system to the site.

-- 
Nick

"There are only two hard problems in computer science: cache
invalidation, naming things, and off-by-one errors." -Martin Fowler




Re: org-rss feed title is concatenation of all post titles? (ECM included)

2020-04-13 Thread Nick Dokos
Stig Brautaset  writes:

> ...
> PS: Can we pretend this whole thread didn't happen? :-)
>

What thread?

-- 
Nick:-)

"There are only two hard problems in computer science: cache
invalidation, naming things, and off-by-one errors." -Martin Fowler




Re: Org-babel-lilypond always renders full pages

2020-04-06 Thread Nick Dokos
stardiviner  writes:

>
> Can report this bug to ob-lilypond.el maintainer. I have not found any contact
> info like email in source code file. Does anyone can get in touch with the
> maintainer?
>

Isn't ob-lilypond.el part of Org mode proper (i.e. not contrib)? If
so, this is the place to report bugs for it. The maintainer is the
usual suspects :-) (but I'm sure they would appreciate any help anybody
can offer).

-- 
Nick

"There are only two hard problems in computer science: cache
invalidation, naming things, and off-by-one errors." -Martin Fowler




Re: Org mode for meeting minutes

2020-03-23 Thread Nick Dokos
Pankaj Jangid  writes:


> I have an off-topic query though: How do you right align tags?
>
>
>

,
| org-tags-column is a variable defined in ‘org.el’.
| Its value is -120
| Original value was -77
| 
|   You can customize this variable.
| 
| Documentation:
| The column to which tags should be indented in a headline.
| If this number is positive, it specifies the column.  If it is negative,
| it means that the tags should be flushright to that column.  For example,
| -80 works well for a normal 80 character screen.
| When 0, place tags directly after headline text, with only one space in
| between.
`

-- 
Nick

"There are only two hard problems in computer science: cache
invalidation, naming things, and off-by-one errors." -Martin Fowler




Re: bi-monthly steps.

2020-03-12 Thread Nick Dokos
"Bi-monthly" is ambiguous: it can mean twice a month or it can mean
once every two months and there is no convincing anybody that their
use of it is wrong :-)

-- 
Nick

"There are only two hard problems in computer science: cache
invalidation, naming things, and off-by-one errors." -Martin Fowler




Re: results block doesn't get replaced when doing :results raw

2020-03-10 Thread Nick Dokos
George Mauer  writes:

> I've seen this happening a lot in a variety of modes. When I do `:results 
> raw`, on subsequent 
> evaluations, rather than replacing the results block, it gets appended to.
>
> This is almost never what I want. I remember seeing some use of `:results raw 
> replace` in some manual
> or another but that never really seems to work for me.
>
> Is there a property or something that can be set to always replace?
>

That's expected: with `:results raw', org-babel does not know where
the results end, since there is no marker, so it cannot clear them
before producing the new results  - it just puts them right after the
`#+RESULTS:' line.

Why are you using `raw'? Can you use some other format (e.g. `drawer'
or `example') instead?

-- 
Nick

"There are only two hard problems in computer science: cache
invalidation, naming things, and off-by-one errors." -Martin Fowler




Re: Typo in Org Manual

2020-03-06 Thread Nick Dokos
Sebastian Miele  writes:

> Sebastian Miele  writes:
>>
>> But how about instead changing the first sentence of the "Range
>> references" section from
>>
>>   You may reference a rectangular range of fields by specifying two
>>   field references connected by two dots ‘..’.
>>
>> to
>>
>>   You may reference a rectangular range of fields, including the ends,
>>   by specifying two field references connected by two dots ‘..’.
>>
>> ?
>
> I think even better would be to just add the following after the
> sentence mentioned above:
>
>   The ends are included in the range.
>
>

Yes, a general statement (outside of this particular example) seems
like a good idea. Then changing the "six" to "nine" does not need any
further elaboration.

-- 
Nick

"There are only two hard problems in computer science: cache
invalidation, naming things, and off-by-one errors." -Martin Fowler




  1   2   3   4   5   6   7   8   9   10   >