debugging why a latex preview fails

2020-01-28 Thread Alan Schmitt
Hello,

I'm trying to add some diagrams in a note, and I want to use latex
preview for that. Unfortunately the result is not what I expect: I do
see an image, but there seem to be errors in the latex processing. How
can I see what latex is produced to find where the issue is?

To be precise, my note has this:

\begin{tikzcd}
A \arrow[r, "u"] \arrow[d, "i"] & B \arrow[d, "f"] \\
C \arrow[r, "v"] & D
\end{tikzcd}

and I have put this in my configuration files:

  (add-to-list 'org-latex-packages-alist '("" "tikz-cd" t nil))

The following latex file compiles correctly:

\documentclass{article}

\usepackage{tikz-cd}

\begin{document}
\begin{tikzcd}
A \arrow[r, "u"] \arrow[d, "i"] & B \arrow[d, "f"] \\
C \arrow[r, "v"] & D
\end{tikzcd}
\end{document}

So I expect I misconfigured something. Is my org-latex-packages-alist
setting wrong?

Thanks,

Alan



Re: can't sign in to code.orgmode.org

2020-01-28 Thread Adam Porter
"Tyler Smith"  writes:

> I am trying to set up an account with code.orgmode.org. I have already
> done this, but when I try to sign in, I get an error about incorrect
> username or password. I have clicked the link to send a password reset
> several times this morning, but no email has shown up in my account,
> or in my spam folder.

I also tried to create an account the other day (I thought I already had
one, but apparently not), and I never received the confirmation email.




Re: New page https://orgmode.org/worg/donate.html

2020-01-28 Thread Adam Porter
FYI, Jonas Bernoulli also maintains a similar page for Emacs in general:

https://github.com/tarsius/elisp-maintainers




Re: [RFC] C-c C-c in agenda

2020-01-28 Thread Adam Porter
Marco Wahl  writes:

> For some days now C-c C-c disables column view in Org files.  This helps
> me a bit and never got in my way.  And I thought it would be quite
> natural and consistent to use this binding for the agenda too.
>
> What do you think about all that?

Hi Marco,

I've always had the impression that the "C-c C-c" binding was intended
to do the most obviously useful or natural action in the current
context.  For example, in a capture or log buffer, it completes the
capture.  With point on a #+ line, it resets buffer properties
accordingly.

I don't use column view very often, so I may be biased, but anyway: in
the general context of an Agenda buffer, I don't feel like enabling or
disabling column view is the most obviously useful or natural thing to
do, so "C-c C-c" doesn't seem like an appropriate binding to me.




Re: [RFC PATCH] specify a time, not number of minutes to keep, with org-resolve-clock

2020-01-28 Thread Dan Drake
Thank you, Nicolas, for the review of my first patch. I've updated my code
and have the new patch attached.

I didn't inline the "time to minutes to keep function"; yes, that function
is very short, but the function name makes the intent/purpose of the code
obvious, and the org-clock-resolve a bit more readable. If it's important
to inline that -- performance concerns about the function call overhead,
accepting org-mode/emacs coding style, etc. -- I'm willing to do that.

I added an entry to ORG-NEWS for version 9.4.

I didn't write any tests, as the change seems so simple, and UI-focused.
But again, if that's a dealbreaker, I can work on doing that.

Further comments welcome.

On Fri, Jan 24, 2020 at 5:31 PM Nicolas Goaziou 
wrote:

> Hello,
>
> Dan Drake  writes:
>
> > I asked about a way to specify a time when using org-resolve-clock
> instead
> > of a number of minutes:
> >
> > https://lists.gnu.org/archive/html/emacs-orgmode/2020-01/msg00010.html
> >
> > I've implemented this myself and a patch is attached. Comments welcome --
> > my change works, but I'm not sure about coding style, and right now
> there's
> > no error checking.
>
> Thank you. Some comments follow.
>
> > I marked the patch as a tiny change, but it does add a new menu option
> and
> > behavior to org-resolve-clock, so there may be an argument that it's not,
> > from a user perspective, a "tiny change", but code-wise it's quite
> simple:
> > the core logic really isn't more than "ask the user for a time and
> > subtract".
>
> TINYCHANGE is only about the number of non-trivial lines of code in your
> patch (15 or so).
>
> > +(defun time-to-mins-to-keep (start-time)
> > +  "Asks the user for a time and returns the number of minutes
> > +from START-TIME to that time."
> > +  (floor (/ (float-time
> > +  (time-subtract (org-read-date t t) start-time)) 60)))
>
> The name of the function is wrong, it should start with "org-clock".
> Also, docstring's first line must contain a full sentence.
>
> Anyway, this is used only once in your patch, I suggest to inline in
> instead.
> > +   (or (and (memq ch '(?k ?K))
> > +(read-number "Keep how many minutes? " default))
> > +   (and (memq ch '(?t ?T))
> > +(time-to-mins-to-keep last-valid
>
> See above about inlining.
>
> Would you mind adding an ORG-NEWS entry, and, if possible, writing
> a test?
>
> Regards,
>
> --
> Nicolas Goaziou
>


-- 
Ceci n'est pas une .signature.
From 52d53de5f67e9ba16b6efe91ac79b370d89c9fea Mon Sep 17 00:00:00 2001
From: Dan Drake 
Date: Sun, 19 Jan 2020 08:24:12 -0600
Subject: [PATCH] org-clock.el: add `t' option to org-clock-resolve

* org-clock.el (org-clock-resolve): add `t' option. This works just like
`k', but asks the user to specify a time, instead of a number of
minutes.

Often when you are interrupted at a task and get back to it, you know
what time the interruption happened. This option makes it easy to tell
org-resolve-clocks about that. For example, say you clocked into task A
at, say, 9:37:

* original task A
  :LOGBOOK:
  CLOCK: [2020-01-21 Mon 09:37]
  :END:

While working on task A, you get a phone call. When the call is done,
you'd like to update your time logging to reflect the phone call. Your
phone says the call was at 11:09.

With C-c C-x C-z, you can use the `K' option, but you need to figure out
the number of minutes to keep. It's easier to look at the phone, or to
mentally note the time when an interruption starts. With the new option,
you can select `T', and just specify a time of 11:09. The state is now:

* original task A
  :LOGBOOK:
  CLOCK: [2020-01-21 Mon 09:37]--[2020-01-21 Mon 11:09] => 1:32
  :END:

You add the phone call to your org buffer and do C-c C-x C-i to clock
in. Org asks you to start the time from when the previous task ended,
you say yes, and the state is now:

* original task A
  :LOGBOOK:
  CLOCK: [2020-01-21 Mon 09:37]--[2020-01-21 Mon 11:09] => 1:32
  :END:
* task B, phone call
  :LOGBOOK:
  CLOCK: [2020-01-21 Mon 11:09]
  :END:

At this point, you can clock back into task A, or any other task.

The key feature here is to be able to just type in a time -- in any
format accepted by org-read-date -- instead of specifying a number of
minutes.

TINYCHANGE
---
 etc/ORG-NEWS  |  5 +
 lisp/org-clock.el | 22 --
 2 files changed, 21 insertions(+), 6 deletions(-)

diff --git a/etc/ORG-NEWS b/etc/ORG-NEWS
index 67c3ca2ed..00c1f453a 100644
--- a/etc/ORG-NEWS
+++ b/etc/ORG-NEWS
@@ -35,6 +35,11 @@ value in call to =java=.
 After editing a source block, Org will restore the window layout when
 ~org-src-window-setup~ is set to a value that modifies the layout.
 
+*** New option to resolve open clock at a provided time
+~org-resolve-clocks~ now has a `t' option, which works just like the
+`k' option, but the user specifies a time of day, not a number of
+minutes.
+
 ** New functions
 *** 

special treatment of one org-file in org-publish

2020-01-28 Thread John Kitchin
Hi everyone,

I have one org file I have to publish in a special way in an org-publish
project. I have this sub-component setup as:

  ("references"
 :base-directory "/Users/jkitchin/2020/01/26/org-files/"
 :exclude "org"
 :include ("c.org")
 :publishing-directory "docs"
 :publishing-function ox-manuscript-publish-references)

This seems to ignore all org files, except the one I included, and on that
one it runs the special publishing-function.

Is the version above preferable to:

  ("references"
 :base-directory "/Users/jkitchin/2020/01/26/org-files/"
 :base-extension "[^.*]"
 :include ("c.org")
 :publishing-directory "docs"
 :publishing-function ox-manuscript-publish-references)

They both seem to work.

John

---
Professor John Kitchin
Doherty Hall A207F
Department of Chemical Engineering
Carnegie Mellon University
Pittsburgh, PA 15213
412-268-7803
@johnkitchin
http://kitchingroup.cheme.cmu.edu


Re: [RFC] C-c C-c in agenda

2020-01-28 Thread Samuel Wales
i think it can be confusing to new users to have column mode
accidentally activated.  what are the things they will try to get out
of it?  maybe worth considering all the panic commands they'd try, and
either deactivate or message what to do to deactivate?

if c-c c-c is being weighed, maybe consider it as one of those things
to possibly tip the balance?  i do not use column mode (drawers are
slow, too disorrganized to make a contact list with it), so cannot
say.

some things they might try are: q, c-c c-c, c-c c-k, esc esc esc, c-g,
undo, whatever they tried last, c-u on whatever they tried last,
revert, kill buffer, ? as a speed command, look at mode line, skim the
manual [for what?], c-z, whatever vim does, spacemacs?.

similar for things like outline search view and org agenda restriction
lock, but in my experience, those are less commonly accidentally
activated.



Re: Testimony on how to publish a book using Org-mode

2020-01-28 Thread Devin Prater
I write my Fanfiction in Org-mode, I’d love to publish it using that, but 
ArchiveOfOurOwn doesn’t support Markdown, let alone Org. I love the fact that I 
can export subtrees (chapters,) giving them specific titles, like “Chapter 1” 
as output file names and page titles, and can, no matter what, have my notes 
heading to not be exported.

> On Jan 28, 2020, at 9:43 AM, Diego Zamboni  wrote:
> 
> Hi everyone,
> 
> I have self-published 3 books so far written with org-mode, using Leanpub. I 
> have been meaning to write a proper post about my setup, which allows me a 
> fully-automated export from org-mode to the Leanpub format and structure. In 
> the meantime, if anyone is interested, you can see my config here: 
> https://zzamboni.org/post/my-emacs-configuration-with-commentary/#publishing-to-leanpub
>  
> 
> 
> (one of the reasons I haven't written the post is that my modules are not yet 
> in MELPA, I hope to get some time to do it soon)
> 
> Cheers,
> --Diego
> 
> 
> On Tue, Jan 28, 2020 at 2:09 AM Bob Newell  > wrote:
> At first glance this is indeed interesting and I must study it
> carefully. Thank you for pointing this out.
> 
> I have published quite a number of books (both fiction and
> non-fiction) starting with org-mode. Inevitably, though, there
> is lots of hand work with LaTeX, and anything to reduce that
> will be very welcome.
> 
> -- 
> Bob Newell
> Honolulu, Hawai`i
> - Via Gnus/BBDB/Org/Emacs/Linux
> 



Re: Testimony on how to publish a book using Org-mode

2020-01-28 Thread Diego Zamboni
Hi everyone,

I have self-published 3 books so far written with org-mode, using Leanpub.
I have been meaning to write a proper post about my setup, which allows me
a fully-automated export from org-mode to the Leanpub format and structure.
In the meantime, if anyone is interested, you can see my config here:
https://zzamboni.org/post/my-emacs-configuration-with-commentary/#publishing-to-leanpub

(one of the reasons I haven't written the post is that my modules are not
yet in MELPA, I hope to get some time to do it soon)

Cheers,
--Diego


On Tue, Jan 28, 2020 at 2:09 AM Bob Newell  wrote:

> At first glance this is indeed interesting and I must study it
> carefully. Thank you for pointing this out.
>
> I have published quite a number of books (both fiction and
> non-fiction) starting with org-mode. Inevitably, though, there
> is lots of hand work with LaTeX, and anything to reduce that
> will be very welcome.
>
> --
> Bob Newell
> Honolulu, Hawai`i
> - Via Gnus/BBDB/Org/Emacs/Linux
>
>


can't sign in to code.orgmode.org

2020-01-28 Thread Tyler Smith
Hello,

I am trying to set up an account with code.orgmode.org. I have already done 
this, but when I try to sign in, I get an error about incorrect username or 
password. I have clicked the link to send a password reset several times this 
morning, but no email has shown up in my account, or in my spam folder.

Is code.orgmode.org functioning properly, and if so, how do I log in?

Best,

Tyler

-- 
plantarum.ca



Re: [RFC] C-c C-c in agenda

2020-01-28 Thread Marco Wahl
Bastien  writes:

>> Thanks - I still don't see any real usecase.
>
> Ok, I constructed one:
>
> #+COLUMNS:  %30ITEM %MYPROP
> #+PROPERTY: MYPROP_ALL "[x]" "[ ]"
>
> * NEXT Rien
>   :PROPERTIES:
>   :MYPROP:  [ ]
>   :END:
>
> In this case, when the cursor is on the MYPROP column in column
> (agenda or not) view, C-c C-c will toggle the value.

Yes!  Seeing your example I remember!  Find this example more or less in
section (info "(org) Column attributes").  Just FYI.







New page https://orgmode.org/worg/donate.html

2020-01-28 Thread Bastien
Hi all,

I've started a page on Worg to list contributors who accept donations:

https://orgmode.org/worg/donate.html

I see many great Org contributions, on this list and elsewhere, and I
think it would be both nice and more efficient to have a central place
to promote to let anyone know how Org contributors accept donations.

Don't be shy: any kind of contribution should be valued, even if the
contribution is invisible - I am thinking of people helping replying
on this list, reporting bugs, etc.  There is no small contribution.

Please send me a private email if you want to be listed here.

Thanks!

-- 
 Bastien



Re: [RFC] C-c C-c in agenda

2020-01-28 Thread Bastien
Bastien  writes:

> Thanks - I still don't see any real usecase.

Ok, I constructed one:

#+COLUMNS:  %30ITEM %MYPROP
#+PROPERTY: MYPROP_ALL "[x]" "[ ]"

* NEXT Rien
  :PROPERTIES:
  :MYPROP:  [ ]
  :END:

In this case, when the cursor is on the MYPROP column in column
(agenda or not) view, C-c C-c will toggle the value.

I guess it makes sense and it does not really interfere with the
majority of the other C-c C-c usecases.

-- 
 Bastien



Re: [RFC] C-c C-c in agenda

2020-01-28 Thread Bastien
Hi Marco,

Marco Wahl  writes:

>>> You miss the lines which have not been transformed into columns by
>>> column view, and I think that's all.
>>
>> When I turn on `org-agenda-columns', all the lines of my agenda are
>> transformed into columns.  Can you give me an example where some lines
>> are not transformed into columns?  My experience is certainly peculiar.
>
> Examples of non-transformed lines are
>
> - The first line, which here is "Day-agenda (W05):".
> - `org-agenda-block-separator' lines which I have set to ^L.
> - Grid lines (key G)

I think it is okay for C-c C-c to not do anything on these lines.

 (I'm not sure what org-columns--toggle does, but that's another
 story.)
>>>
>>> Yes, but maybe this fits in here as a sub story.  The function does the
>>> toggling part described in the manual
>>>
>>> #v+
>>> ‘C-c C-c’ (‘org-columns-toggle-or-columns-quit’)
>>>  When there is a checkbox at point, toggle it.  Else exit column
>>>  view.
>>> #v-
>>
>> I will investigate and possible remove this, if it is not useful.
>
> Possibly it's difficult to realize checkbox toggle otherwise in column
> view mode.  (Just my spontaneous 2ct thought.)

Thanks - I still don't see any real usecase.

-- 
 Bastien



Re: [RFC] C-c C-c in agenda

2020-01-28 Thread Marco Wahl


>> You miss the lines which have not been transformed into columns by
>> column view, and I think that's all.
>
> When I turn on `org-agenda-columns', all the lines of my agenda are
> transformed into columns.  Can you give me an example where some lines
> are not transformed into columns?  My experience is certainly peculiar.

Examples of non-transformed lines are

- The first line, which here is "Day-agenda (W05):".

- `org-agenda-block-separator' lines which I have set to ^L.

- Grid lines (key G)

>>> (I'm not sure what org-columns--toggle does, but that's another
>>> story.)
>>
>> Yes, but maybe this fits in here as a sub story.  The function does the
>> toggling part described in the manual
>>
>> #v+
>> ‘C-c C-c’ (‘org-columns-toggle-or-columns-quit’)
>>  When there is a checkbox at point, toggle it.  Else exit column
>>  view.
>> #v-
>
> I will investigate and possible remove this, if it is not useful.

Possibly it's difficult to realize checkbox toggle otherwise in column
view mode.  (Just my spontaneous 2ct thought.)


Bye!



Re: [RFC] C-c C-c in agenda

2020-01-28 Thread Bastien
Hi Marco,

Marco Wahl  writes:

> You miss the lines which have not been transformed into columns by
> column view, and I think that's all.

When I turn on `org-agenda-columns', all the lines of my agenda are
transformed into columns.  Can you give me an example where some lines
are not transformed into columns?  My experience is certainly peculiar.

>> (I'm not sure what org-columns--toggle does, but that's another
>> story.)
>
> Yes, but maybe this fits in here as a sub story.  The function does the
> toggling part described in the manual
>
> #v+
> ‘C-c C-c’ (‘org-columns-toggle-or-columns-quit’)
>  When there is a checkbox at point, toggle it.  Else exit column
>  view.
> #v-

I will investigate and possible remove this, if it is not useful.

Thanks,

-- 
 Bastien



Re: [RFC] C-c C-c in agenda

2020-01-28 Thread Marco Wahl
Bastien  writes:

>> I've now tested this and see how it can be useful, but having C-c C-c
>> perform this unique deactivation in agenda view seems unfinished.
>
> Also, when columns are activated in an agenda view, org-columns-map
> already bind C-c C-c to org-columns-toggle-or-columns-quit, so C-c C-c
> already deactivate the column view in agenda buffer.
>
> Or do I miss something?

You miss the lines which have not been transformed into columns by
column view, and I think that's all.

> (I'm not sure what org-columns--toggle does, but that's another
> story.)

Yes, but maybe this fits in here as a sub story.  The function does the
toggling part described in the manual

#v+
‘C-c C-c’ (‘org-columns-toggle-or-columns-quit’)
 When there is a checkbox at point, toggle it.  Else exit column
 view.
#v-

This functionality looks very special to me but possibly someone enjoys
this behavior daily.

>> I suggest C-c C-c can also call `org-agenda-set-tags' when the column
>> view is not activated.
>
> I just added this.

Okay, thanks.



Re: [RFC] C-c C-c in agenda

2020-01-28 Thread Bastien
Hi Marco,

Bastien  writes:

> I've now tested this and see how it can be useful, but having C-c C-c
> perform this unique deactivation in agenda view seems unfinished.

Also, when columns are activated in an agenda view, org-columns-map
already bind C-c C-c to org-columns-toggle-or-columns-quit, so C-c C-c
already deactivate the column view in agenda buffer.

Or do I miss something?

(I'm not sure what org-columns--toggle does, but that's another story.)

> I suggest C-c C-c can also call `org-agenda-set-tags' when the column
> view is not activated.

I just added this.

Thanks,

-- 
 Bastien



Re: [RFC] C-c C-c in agenda

2020-01-28 Thread Bastien
Hi Marco and all,

Marco Wahl  writes:

> Off list I have politely been pointed to possibly have gone too far with
> a recent commit to master.  Thanks for that.

Yes - someone I overlooked this addition, my bad.

> To the issue:  With the current master branch C-c C-c disables column
> view in the agenda.
>
> For some days now C-c C-c disables column view in Org files.  This helps
> me a bit and never got in my way.  And I thought it would be quite
> natural and consistent to use this binding for the agenda too.

I've now tested this and see how it can be useful, but having C-c C-c
perform this unique deactivation in agenda view seems unfinished.

I suggest C-c C-c can also call `org-agenda-set-tags' when the column
view is not activated.

Let's add this and test the new behavior of C-c C-c in agenda buffer
for a while to see how it fits to everyone's habits.

> What do you think about all that?

Thanks for bringing this issue back on the list,

-- 
 Bastien



[RFC] C-c C-c in agenda

2020-01-28 Thread Marco Wahl
Hello community,

Off list I have politely been pointed to possibly have gone too far with
a recent commit to master.  Thanks for that.

To the issue:  With the current master branch C-c C-c disables column
view in the agenda.

For some days now C-c C-c disables column view in Org files.  This helps
me a bit and never got in my way.  And I thought it would be quite
natural and consistent to use this binding for the agenda too.

What do you think about all that?


Best regards,
-- 
Marco