Re: [O] generate PDF with matching new-lines in quotation C-u C-c C-e

2018-08-01 Thread Van L


Hello Leslie,

> Well, you must choose what do you want. 

I have it :-) No amount of searching through the Internet forums was going to 
find this. But, you can piece it together from Leslie Lamport’s LaTeX book 
which I finally did.

The \linebreak leaves the full justification default unchanged.

#+LATEX_CLASS: article
#+LATEX_HEADER: 
\pdfmapfile{/opt/local/share/texmf-texlive/fonts/map/dvips/libertine/libertine.map}
#+LATEX_HEADER: \usepackage{libertine}
#+LATEX_COMPILER: xelatex
#+EXPORT_SELECT_TAGS: export
#+EXPORT_EXCLUDE_TAGS: noexport
#+OPTIONS: H:2 num:nil toc:nil \n:t @:t ::t |:t ^:{} _:{} *:t TeX:t LaTeX:t 
title:nil author:nil date:nil email:nil

#+NAME: page-56-57
#+BEGIN_SRC latex
  \begin{minipage}[b]{28em}
  war. The longer a war lasts, the more things tend to depend on 
acci-\linebreak
  dents. Neither you nor we can see into them: we have to abide 
their\linebreak
  outcome in the dark. And when people are entering upon a war 
they\linebreak
  do things the wrong way round. Action comes first, and it is 
only\linebreak
  when they have already suffered that they begin to think. We, 
how-\linebreak
  ever, are still far removed from such a mistaken attitude; so, to 
the\linebreak
  best of our belief, are you. And so we urge you, now, while we 
are\linebreak
  both still free to make sensible decisions, do not break the 
peace,\linebreak
  do not go back upon your oaths; instead let us settle our 
differences\linebreak
  by arbitration, as is laid down in the treaty. If you will not do so, 
we\linebreak
  shall have as our witnesses the gods who heard our oaths. You 
will\linebreak
  have begun the war, and we shall attempt to meet you in any and\linebreak
  every field of action that you may choose.
  \end{minipage}
#+END_SRC




Re: [O] Agenda search: setting sort-order

2018-08-01 Thread Nathan Neff
On Tue, Jun 19, 2018 at 3:20 PM, Nicolas Goaziou 
wrote:

> Hello,
>
> Nathan Neff  writes:
>
> > I had a look at org-agenda.el, and took a first stab at "coding" :)
> > I fixed the sorting problem when using agenda-search-view, and
> > I have a DIFF/patch at the bottom of this e-mail [1] that provided the
> fix.
> >
> > Would this be of interest to the org-mode project?
>
> IMO, the Org mode project is interested in having its bugs fixed ;)
>
> > This code fixes the
> > problem,
> > but it is duplicated in the function org-agenda-get-todos, and seems
> > redundant,
> > therefore a more "long term" fix would probably not resemble the minor
> patch
> > below.  Also, I have no experience with lisp, nor the org-mode
> > codebase :-O
>
> A more "long term" fix would be to rewrite the agenda (asynchronous,
> more scalable, better API for external use).
>
> > Here's steps I used to find the problem.  Feel free to skip to [1]
> > for the DIFF/patch.
>
> Would you mind sending it using `git format-patch'?
>

Hi Nicolas,

I'm a bit leery of submitting these lines of code - one reason is that
the sort feature still really doesn't work very well.  IIRC, the results
are globally sorted by timestamp, but there's results with NULL or
no timestamps mixed in.

In other words, results are something like:

* foo 12/1/2001
* bar 12/2/2002
* baz 
* blech 12/2/2003
* another 

So, it's not really a fix, and I'm not sure this is even good code :)
If someone wants to grab the fix and jump from here, that's fine, it's only
a few lines.

Thanks,
--Nate


>
> Thank you.
>
> Regards,
>
> --
> Nicolas Goaziou
>


Re: [O] Warning (bytecomp): ‘((symbol-function (quote message)) (symbol-function (quote ignore)))’ is a malformed function

2018-08-01 Thread J. David Boyd
dbo...@mmm.com (J. David Boyd) writes:

> Sorry, wrong location.  Tried to cancel it, don't seem to be able to.

And look like the message I tried to cancel really was cancelled.   :-)




Re: [O] Warning (bytecomp): ‘((symbol-function (quote message)) (symbol-function (quote ignore)))’ is a malformed function

2018-08-01 Thread J. David Boyd
Sorry, wrong location.  Tried to cancel it, don't seem to be able to.





[O] Simplifying multiple "var" parameters for a code block

2018-08-01 Thread William Denton
Is there a way to pull data from multiple clocktables (with names matching a 
regular expression) all at the same time into variables passed into a code 
block?


I use clocktables to keep track of how I spend my time at work, with things 
falling into one of three major categories (see [1]).  I use a different 
clocktable for every month, and they have names like c_201805, c_201806 and

c_201807.  For example:

#+BEGIN: clocktable :maxlevel 3 :scope tree :compact nil :header "#+NAME: 
c_201808\n"
#+NAME: c_201808
[ ... clocktable stuff here ... ]
#+END

This all works very well but it leads to some messiness when I want to gather up 
data from all of those clocktables at the same time.  I use R to munge the data, 
and I have a source block that starts:


#+BEGIN_SRC R :session R:clocktable :results none :var c_201709=c_201709 
c_201710=c_201710 c_201711=c_201711 c_201712=c_201712 c_201801=c_201801 
c_201802=c_201802 c_201803=c_201803 c_201804=c_201804 c_201805=c_201805 
c_201806=c_201806 c_201807=c_201807 c_201808=c_201808 :colnames yes


When I just had three or four monthly clocktables to handle, that was OK, but as 
you can see it's getting kind of crazy.


Is there a way that I can get all of the c_MM tables passed into a code 
block, as done above, but without having to specify them individually?  I have a 
feeling there's a bit of Lisp that would do it somehow, but I don't know what it 
would be.  I'm happy to use an intermediary table if that's easiest.


Any suggestions would be most welcome.

Bill

[1] https://www.miskatonic.org/2017/11/16/clocktableii/

--
William Denton :: Toronto, Canada   ---   Listening to Art: 
https://listeningtoart.org/
https://www.miskatonic.org/ ---   GHG.EARTH: http://ghg.earth/
Caveat lector.  ---   STAPLR: http://staplr.org/



[O] Warning (bytecomp): ‘((symbol-function (quote message)) (symbol-function (quote ignore)))’ is a malformed function

2018-08-01 Thread J. David Boyd


Starting yesterday, I see this warning in my Emacs when I start.   I've
started with 'emacs --debug-init', but get no errors.

It looks like it is happening when byte compiling something on the fly.  I
have made no changes to any of my configs, but I have updated from melpa.

How do I track this down and get rid of it?  I don't see any flag for Emacs
like --debug-warning or anything.  Ideas please?

Dave in Hudson, FL




[O] Newbie question

2018-08-01 Thread Henrik Frisk
Hi,

I'm new with Scheme and new with org babel so excuse me if I am missing
something obvious.
I have this bit of (simplified) Scheme code to generate a list of lists:

#+name: chromatic
#+begin_src scheme :noweb yes
  (map (lambda (x)
 (cond ((< x 4) (list 0 1))
   ((equal? x 4) (list 2 0))
   ((> x 4) (list 1 1
   (list 0 1 2 3 4 5 6 7 8 9 10 11))
#+end_src

It appears to be working fine outputting a table such as

#+RESULTS:
| 0 | 1 |
| 0 | 1 |
| 0 | 1 |
 ...

For another function in Lilypond, also in scheme I need it to be a (list
(list 0 1) (list 0 1)...) as in the variable seq below:

 #+begin_src scheme :noweb yes
 $(let ((random-state (seed->random-state (current-time)))
   (seq (list (list 0 0) (list 0 1/2) (list 1 0) (list 1 1/2) (list 2
0) (list 3 0) (list 3 1/2) (list 4 0) (list 4 1/2) (list 5 0) (list 5 1/2)
(list 6 0
   (make-sequential-music
(map (lambda (x p)
   (let ((idx (random 12 random-state)))
 (make-music 'NoteEvent
'duration (ly:make-duration 2 0 1/1)
'pitch (ly:make-pitch 0 (car p) (car (cdr p))
   (make-list (length seq)) seq)))
 #+end_src

I can do:

(seq <>)

if alist is:

#+name: alist
#+begin_src scheme
  (list (list 0 0) (list 0 1/2) (list 1 0) (list 1 1/2) (list 2 0)
(list 3 0) (list 3 1/2) (list 4 0) (list 4 1/2) (list 5 0) (list 5 1/2)
(list 6 0))
#+end_src

but what I would like to be able to do is to have have the noweb reference
be to the 'chromatic' function above as in:

(seq <>)

but that doesn't work. Maybe what I am trying to do is not possible, maybe
there is a limitation on ob-lilypond, but it seems to me that the result of
my function chromatic above spits out ((0 1) (0 1)... ) and that this is
the cause it doesn't work.

Again, I am really new to this...

The workaround I am doing is to format the output of chromatic into a
proper list och lists and then add it by noweb reference.

Any hints welcome.
/Henrik


Re: [O] target file of capture template does not save

2018-08-01 Thread tom
Me again. Let me try to provide a bit more info. I'm using xdotool to call
"emacsclient -c -e '(org-capture)'". In my init.el, I have both

(add-hook 'org-capture-mode-hook 'make-frame)
and
(add-hook 'org-capture-mode-hook 'delete-frame)

my capture template writes to, say, "beans.org."

I swoop in with the mouse, choose the template, finish, and the capture
frame goes away. perfect. I don't open or ever see beans.org. But when I do
visit the file, it is sitting there unsaved. How can I have it
automatically save for me? Modify the org-capture-mode hook? If that's the
case, may I have some help with the modification? Or am I missing something
else?

Thanks.

On Fri, Jul 27, 2018 at 7:42 PM tom  wrote:

> Hey guys, I have a capture template set up pretty much the way I want it,
> but the file it writes to does not save afterwards. It's a table line
> template with some prompts, :prepend, :table-line-position, and
> :kill-buffer.
>
> Why doesn't the file save? Is it supposed to?
> thanks
>


Re: [O] org-ref, html-export, citation links

2018-08-01 Thread Johannes Brauer
I didn’t see this before, too. Now, I tried to create a minimal example showing 
the described behaviour, but I cannot reproduce it anymore. Now all is correct.

Sorry!

Johannes

Am 01.08.2018 um 13:06 schrieb John Kitchin 
mailto:jkitc...@andrew.cmu.edu>>:

I don't think I have ever seen this, and can't think of a reason why it might 
be occurring.

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


On Sun, Jul 29, 2018 at 12:23 PM, Johannes Brauer 
mailto:bra...@nordakademie.de>> wrote:
Hi!

I have an older Html-file exported from an org-mode file with org-ref 
citations. All citation links are internal links into the reference section, 
fine! But if I anew export the org-mode file, now, the generated citation links 
are external file links to (not existing) files. For example, cite:Hales2008 is 
exported to "file:///.../Hales2008“.

Any hints?

Johannes






Re: [O] generate PDF with matching new-lines in quotation C-u C-c C-e

2018-08-01 Thread Leslie Watter
Hallo Van,

On Wed, Aug 1, 2018 at 7:51 AM Van L  wrote:

> Thank you,
>
> > You can force a newline in LaTeX putting '\\' at the end of the line(as
> the last chars on the line).
>
> Yes. The file sample2e.tex demonstrates the use of '\\' in the 'verse'
> environment.
>
> I now have the following wanting to fully justify the lines but it doesn’t.
>

Well, you must choose what do you want. If you let LaTeX fully justify your
text, you don't control line endings, otherwise you can put \\ to say 'Hey
I want a line ending here'.

If you want a shorter quoting you could use a different size to \parbox.

As an example you can use  * \parbox{0.7\linewidth}*
to limit the parbox to 70% of your linewidth.

Cheers,

LEslie


> #+BEGIN_SRC latex :noexport:
>   \parbox{\linewidth}{\small
>   war. The longer a war lasts, the more things tend to depend on
> acci-\\
>   dents. Neither you nor we can see into them: we have to abide their\\
>   outcome in the dark. And when people are entering upon a war they\\
>   do things the wrong way round. Action comes first, and it is only\\
>   when they have already suffered that they begin to think. We, how-\\
>   ever, are still far removed from such a mistaken attitude; so, to
> the\\
>   best of our belief, are you. And so we urge you, now, while we are\\
>   both still free to make sensible decisions, do not break the peace,\\
>   do not go back upon your oaths; instead let us settle our
> differences\\
>   by arbitration, as is laid down in the treaty. If you will not do
> so, we\\
>   shall have as our witnesses the gods who heard our oaths. You will\\
>   have begun the war, and we shall attempt to meet you in any and\\
>   every field of action that you may choose.}
> #+END_SRC



-- 
Leslie H. Watter


[O] Bug: tags-emoji-alignment [9.1.9 (release_9.1.9-65-g5e4542 @ /usr/local/Cellar/emacs/26.1_1/share/emacs/26.1/lisp/org/)]

2018-08-01 Thread Will Pierce
This might be out of scope for the org list, but the excellent emojify-mode
(https://github.com/iqbalansari/emacs-emojify) breaks the alignment of org
tags when emojies are included in the headings.

So:

```
** TODO write something short :writing:
```

but

```
** TODO :waving_black_flag: write something short  :writing:
```

Emacs  : GNU Emacs 26.1 (build 1, x86_64-apple-darwin17.5.0, NS
appkit-1561.40 Version 10.13.4 (Build 17E199))
 of 2018-06-13
Package: Org mode version 9.1.9 (release_9.1.9-65-g5e4542 @
/usr/local/Cellar/emacs/26.1_1/share/emacs/26.1/lisp/org/)


Re: [O] org-ref, html-export, citation links

2018-08-01 Thread John Kitchin
I don't think I have ever seen this, and can't think of a reason why it
might be occurring.

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


On Sun, Jul 29, 2018 at 12:23 PM, Johannes Brauer 
wrote:

> Hi!
>
> I have an older Html-file exported from an org-mode file with org-ref
> citations. All citation links are internal links into the reference
> section, fine! But if I anew export the org-mode file, now, the generated
> citation links are external file links to (not existing) files. For
> example, cite:Hales2008 is exported to "file:///.../Hales2008“.
>
> Any hints?
>
> Johannes
>
>
>


Re: [O] generate PDF with matching new-lines in quotation C-u C-c C-e

2018-08-01 Thread Van L
Thank you,

> You can force a newline in LaTeX putting '\\' at the end of the line(as the 
> last chars on the line).

Yes. The file sample2e.tex demonstrates the use of '\\' in the 'verse' 
environment.

I now have the following wanting to fully justify the lines but it doesn’t.

#+BEGIN_SRC latex :noexport:
  \parbox{\linewidth}{\small
  war. The longer a war lasts, the more things tend to depend on acci-\\
  dents. Neither you nor we can see into them: we have to abide their\\
  outcome in the dark. And when people are entering upon a war they\\
  do things the wrong way round. Action comes first, and it is only\\
  when they have already suffered that they begin to think. We, how-\\
  ever, are still far removed from such a mistaken attitude; so, to the\\
  best of our belief, are you. And so we urge you, now, while we are\\
  both still free to make sensible decisions, do not break the peace,\\
  do not go back upon your oaths; instead let us settle our differences\\
  by arbitration, as is laid down in the treaty. If you will not do so, we\\
  shall have as our witnesses the gods who heard our oaths. You will\\
  have begun the war, and we shall attempt to meet you in any and\\
  every field of action that you may choose.}
#+END_SRC


Re: [O] repeating timestamps with an end date

2018-08-01 Thread Robert Pluim
Eric S Fraga  writes:

> On Monday, 30 Jul 2018 at 15:25, Robert Pluim wrote:
>> Hi,
>>
>> is there a generic way to specify an end date for a repeating event? 
>
> The short answer is no.
>
> The longer answer is to consider using
> org-clone-subtree-with-time-shift.  Make the entry you want and then make
> the repeating entries.  I use this for lectures, for instance, and then
> delete particular entries that might correspond to cancelled lectures.

That will work, but it feels inelegant. I guess Iʼll stick to using
'diary-block' and similar.

Thanks

Robert



[O] org-file-apps problem

2018-08-01 Thread Bostjan Vilfan
Hello,
Prior to org-mode version 9.0 I was able to use the default program for
a file type on Windows 10 with the following setting:

(setq org-file-apps (list (cons t (list 'w32-shell-execute "open" 'file

However, now (currently my version of org mode is 9.1.9) nothing I try
works, including the instructions provided in the release notes of version
9.0.

Can someone, please, provide me with the correct value of org-file-apps
to use if I want a click on a file link to result in a call of the Windows
10 default app.

Much obliged.

bostjanv


Re: [O] Latex preview foreground color problem

2018-08-01 Thread Jarmo Hurri
Eric S Fraga  writes:

> On Monday, 30 Jul 2018 at 12:43, Jarmo Hurri wrote:
>> In my emacs config file I now have:
>>
>> (plist-put org-format-latex-options :foreground "white")
>> (plist-put org-format-latex-options :scale 2)
>
> This works for me but in the context that I also change the background
> to black (which does not necessarily match my Emacs background...).  Try
> that just to see?  It may be a LaTeX issue.

This seems to be a compatibility issue with the forest package in
Latex. The problem is demonstrated and explained in the org file
below. I don't know yet what the solution is.

Jarmo

# -

#+LATEX_HEADER: \usepackage{forest}

* \LaTeX{} fragments: package ~forest~ confuses foreground color setting 
  Interestingly enough, the foreground color set by
  #+BEGIN_SRC elisp
  (plist-put org-format-latex-options :foreground "White")
  #+END_SRC
  does /not/ change the foreground color in this simple invariant
  equation \[ ab^n = ab\cdot b^{n-1} \] if ~usepackage{forest}~ is
  included in \LaTeX{} header. When package ~forest~ is not used,
  setting the color works just fine.

  To make things a bit more complicated, after commenting or
  uncommenting the ~LATEX_HEADER~ line, you need to remove the
  contents of directory ~ltximg~ in the working directory to see the
  difference, because the system caches the generated images of the
  equations there.