Re: [O] Bug: Unable to nest headings within export blocks [9.0 (9.0-elpa @ c:/Data/Documents/emacs.d/elpa/org-20161102/)]

2016-11-08 Thread Lixin Chin
On Mon, 7 Nov 2016 08:44:47 -0800
"Charles C. Berry"  wrote:

> Run this:
> 
> #+BEGIN_SRC emacs-lisp :eval never-export :exports none
>(require 'ob-org)
>(defun eval-if-html ()
>  (if (not (eq org-export-current-backend 'html)) "never"))
> #+END_SRC
> 
> 
> Then export this with the html backend:
> 
> #+OPTIONS: toc:nil
> 
> #+BEGIN_SRC org :eval (eval-if-html) :exports results :results replace
>,* HTML only heading
>Text which should appear in HTML exports, but not \LaTeX{}.
> #+END_SRC
> 
> and you will get this:
> 
> 
> 1 HTML only 
> heading
> 
> 
> Text which should appear in HTML exports, but not \LaTeX{}.
> 
> 
> 
> 
> With other backends you get nothing.
> 
> HTH,
> 
> Chuck

Thank you very much, that works perfectly!

For future reference, I tweaked the source code block to allow
specifying multiple export backends, and to avoid generating results
when evaluating using C-c C-c:

#+BEGIN_SRC emacs-lisp :eval never-export :exports none :results silent
  (require 'cl-extra)
  (defun eval-if-export (backend)
"For use within org-mode source blocks :eval argument. Causes
  the block to be evaluated if the current export backend matches
  any of the backends in BACKEND. (e.g., (eval-if-export '(latex
  html)))."
(unless (cl-some (lambda (back) (eq org-export-current-backend
back))
  backend)
  "never"))
#+END_SRC

Then using:
#+BEGIN_SRC org :eval (eval-if-export '(html)) :exports
results :results replace
  ,* HTML only heading
  Text which should appear in HTML exports, but not \LaTeX{}.
#+END_SRC

The syntax isn't as elegant as #+BEGIN_EXPORT  ...
#+END_EXPORT, but it works nicely enough.

Thanks,
Lixin



Re: [O] [bug] timed repeater shows up in wrong place

2016-11-08 Thread Samuel Wales
thanks to both you and cesar.  it appears i have to investigate further.

On 11/8/16, Nicolas Goaziou  wrote:
> Well, it does here. Not sure what is wrong in your set-up. You may to
> try re-installing Org.



Re: [O] [bug] timed repeater shows up in wrong place

2016-11-08 Thread Nicolas Goaziou
> it's a tagged (scheduled) active timestamp with a time.  it belongs in
> the grid.  it showed up in the grid in org 8.  it does not now.

Well, it does here. Not sure what is wrong in your set-up. You may to
try re-installing Org.

Regards,



Re: [O] Bug: Repeated tasks not shown from org-timeline [9.0 (9.0-dist @ c:/wlin/.emacs-lisp/org/lisp/)]

2016-11-08 Thread Samuel Wales
i recommend searching for carsten's history of the timeline.  it was
detailed and possibly includes ideas for emulating it in agenda.  part
of the issue was that the timeline was invented before some new
features, possibly including repeaters, but did not get updated for
them.  there are also efficiency issues with looping.



Re: [O] [bug] timed repeater shows up in wrong place

2016-11-08 Thread Samuel Wales
hi nicolas,

On 11/8/16, Nicolas Goaziou  wrote:
> What is "the timed section" of agenda?

the time grid.

>> it shows in scheduled section
>> other tasks like it show in timed section
>> if the date is today, then it works correctly
>> *correctly to me is the traditional behavior of showing up every day*
>
> I don't get it.

it's a tagged (scheduled) active timestamp with a time.  it belongs in
the grid.  it showed up in the grid in org 8.  it does not now.

>> it does not seem to be documented in the release notes, so i hope that
>> it is just a bug, or that there is a variable for it.
>
> Are you talking about `org-agenda-repeating-timestamp-show-all'?

possibly you removed a reference to this variable for certain repeater
types, or something.  the variable does not have a setting to allow
org 8 behavior in any case.


samuel

-- 
The Kafka Pandemic: http://thekafkapandemic.blogspot.com

The disease DOES progress.  MANY people have died from it.  And
ANYBODY can get it.

Denmark: free Karina Hansen NOW.
  UPDATE 2016-10: home, but not fully free



Re: [O] Bug: Repeated tasks not shown from org-timeline [9.0 (9.0-dist @ c:/wlin/.emacs-lisp/org/lisp/)]

2016-11-08 Thread Nicolas Goaziou
Hello,

Warren Lynn  writes:

> Thanks. I have been using org mode for probably over 10 years, but did not
> keep checking the messages.

I'm not suggesting that you should have. I just happened to remember
Carsten writing about timeline being more or less obsolete.

I haven't investigated about it, tho.

> The feature is very useful to me. Do you have any suggestion how to
> replicate this with an agenda view (with skipped empty days,
> especially)?

No idea. However, custom agenda views are very versatile. Also,
`org-agenda-show-all-dates' may be used to ignore empty days.

In any case, it would be interesting to know what timeline features are
really missing so we can add them, if possible, and remove the timeline
functionality.

Regards,

-- 
Nicolas Goaziou



Re: [O] [bug] timed repeater shows up in wrong place

2016-11-08 Thread Nicolas Goaziou
Hello,

Samuel Wales  writes:

> *** NEXTREPEAT test :goto:
> SCHEDULED: <2016-07-15 Fri 21:00 .+1d>
>
> does not show up in the timed section of agenda

What is "the timed section" of agenda?

> it shows in scheduled section
> other tasks like it show in timed section
> if the date is today, then it works correctly
> *correctly to me is the traditional behavior of showing up every day*

I don't get it.

> it does not seem to be documented in the release notes, so i hope that
> it is just a bug, or that there is a variable for it.

Are you talking about `org-agenda-repeating-timestamp-show-all'?

Regards,

-- 
Nicolas Goaziou



Re: [O] newline element of org-emphasis-regexp-components no longer honored?

2016-11-08 Thread Eric Abrahamsen
Eric Abrahamsen  writes:

> So far as I can tell, the last element of this option is no longer
> honored -- I've had it set to 3 for ages, but highlighting and export
> only accept 1. I'm on Emacs git, and org-plus-contrib from Elpa.
>
> Does anyone else see this?
>
> E

To provide more information, I use this to set the final element (and
some other elements):

(setf (nth 4 org-emphasis-regexp-components) 3)

That's always done the trick in the past. I just checked `org-emph-re',
and indeed it is still at the default value.

Has anything changed about how this variable is set?

E




[O] newline element of org-emphasis-regexp-components no longer honored?

2016-11-08 Thread Eric Abrahamsen
So far as I can tell, the last element of this option is no longer
honored -- I've had it set to 3 for ages, but highlighting and export
only accept 1. I'm on Emacs git, and org-plus-contrib from Elpa.

Does anyone else see this?

E




[O] Tangling flow control

2016-11-08 Thread Philip Hudson
Thanks to Charles Berry and the "scraps" site curated by Eric Schulte
(is he on the list?), I now know how to do "branching" flow control
when tangling, by using a form that evals to either "no" or a filename
as the argument to the =:tangle= header.

How do you do "looping" flow control?

For context, what I'm trying to write is a single Org file from which
I can tangle out a number of =~/.ssh/config= files, one for each of
several hosts on a LAN. Within this file I need to repeatedly place a
template =BEGIN_SRC ssh-config= block, each time with a few words and
numbers changed. Do you do this anywhere? If so, how have you
implemented it?

I'm already at the point where I can do a dumb, brute-force version
with lots of near-identical blocks that I know will give me what I
need, so that's fine, but I like to keep things DRY.

It occurs to me that looping may simply not be what tangling is for,
and I need to look at levels of indirection. That is, tangle to a
bunch of intermediate Org files each of which tangles to a config
file: is that what you would recommend? Or transclude an Org file
containing my block template and perhaps somehow use tags and
=org-get-tags-at= to parameterize each inclusion? Anyone already doing
something like that?

-- 
Phil Hudson  http://hudson-it.ddns.net
Pretty Good Privacy (PGP) ID: 0x887DCA63



Re: [O] Bug: code block export [9.0 (9.0-elpaplus @ /home/mcg/.emacs.d/elpa/org-plus-contrib-20161102/)]

2016-11-08 Thread Nick Dokos
mcg  writes:

> I recently (max 3 weeks) noticed that latex code blocks are not exported
> correctly anymore:
>
> #+BEGIN_LaTeX
>
> #+END_LaTeX
>
> Export is:
>
> \begin{LaTeX}
>
> \end{LaTeX}
>
> I do not recall having changed any setup.
>
> Package: Org mode version 9.0 (9.0-elpaplus @ 
> /home/mcg/.emacs.d/elpa/org-plus-contrib-20161102/)



See the third section ("New syntax for export blocks") under
"Incompatible Changes" for Org 9.0 in .../org-mode/etc/ORG-NEWS.

Briefly, you need to change

#+BEGIN_LaTeX

#+END_LaTeX

to

#+BEGIN_EXPORT LaTeX

#+END_EXPORT

and similarly for other backends.

-- 
Nick




[O] Bug: code block export [9.0 (9.0-elpaplus @ /home/mcg/.emacs.d/elpa/org-plus-contrib-20161102/)]

2016-11-08 Thread mcg

Hello,

I recently (max 3 weeks) noticed that latex code blocks are not exported
correctly anymore:

#+BEGIN_LaTeX

#+END_LaTeX

Export is:

\begin{LaTeX}

\end{LaTeX}

I do not recall having changed any setup.



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

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

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





Emacs  : GNU Emacs 24.4.1 (x86_64-pc-linux-gnu, GTK+ Version 3.14.5)
 of 2015-03-07 on trouble, modified by Debian
Package: Org mode version 9.0 (9.0-elpaplus @ 
/home/mcg/.emacs.d/elpa/org-plus-contrib-20161102/)


current state:
==
(setq
 org-export-with-todo-keywords nil
 org-export-backends '(ascii html icalendar latex freemind koma-letter)
 org-latex-tables-booktabs t
 org-latex-default-figure-position "!htbp"
 org-ref-get-pdf-filename-function 'org-ref-get-pdf-filename
 org-footnote-auto-adjust t
 org-tab-first-hook '(org-babel-hide-result-toggle-maybe 
org-babel-header-arg-expand)

 org-adapt-indentation nil
 org-latex-classes '(("article"
"\\documentclass[11pt,twoside,pointlessnumbers,headsepline]{scrartcl}\n[DEFAULT-PACKAGES]\n[PACKAGES]\n\n\\hypersetup{%\ncolorlinks 
= false, %Colours links instead of ugly boxes\nlinkbordercolor=blue, 
%hyperlink borders will be blue\nurlcolor = blue, %Colour for 
external hyperlinks\nlinkcolor= red, %Colour of internal 
links\ncitecolor   = brown, %Colour of citations\ncitebordercolor = 
brown, %Colour of citations\npdfborderstyle={/S/U/W 0.5} %border style 
will be underline of width 0.5pt\n}\n\n\n[EXTRA]   \n"
  ("\\section{%s}" . "\\section*{%s}") ("\\subsection{%s}" 
. "\\subsection*{%s}")
  ("\\subsubsection{%s}" . "\\subsubsection*{%s}") 
("\\paragraph{%s}" . "\\paragraph*{%s}")

  ("\\subparagraph{%s}" . "\\subparagraph*{%s}"))
 ("default-koma-letter" "\\documentclass[11pt]{scrlttr2}")
 ("letter"
  "\\documentclass{scrlttr2}\n [DEFAULT-PACKAGES]\n
[NO-PACKAGES]")
 ("minimalRnw" 
"\\documentclass{scrartcl}\n[NO-DEFAULT-PACKAGES]\n\\usepackage{hyperref}"
  ("\\section{%s}" . "\\section*{%s}") ("\\subsection{%s}" 
. "\\subsection*{%s}")
  ("\\subsubsection{%s}" . "\\subsubsection*{%s}") 
("\\paragraph{%s}" . "\\paragraph*{%s}")

  ("\\subparagraph{%s}" . "\\subparagraph*{%s}"))
 ("beamer" "\\documentclass[presentation]{beamer}" 
("\\section{%s}" . "\\section*{%s}")
  ("\\subsection{%s}" . "\\subsection*{%s}") 
("\\subsubsection{%s}" . "\\subsubsection*{%s}"))
 ("report" "\\documentclass[11pt]{scrreprt}" ("\\part{%s}" 
. "\\part*{%s}")
  ("\\chapter{%s}" . "\\chapter*{%s}") ("\\section{%s}" . 
"\\section*{%s}")
  ("\\subsection{%s}" . "\\subsection*{%s}") 
("\\subsubsection{%s}" . "\\subsubsection*{%s}"))
 ("book" "\\documentclass[11pt]{scrbook}" ("\\part{%s}" . 
"\\part*{%s}")
  ("\\chapter{%s}" . "\\chapter*{%s}") ("\\section{%s}" . 
"\\section*{%s}")
  ("\\subsection{%s}" . "\\subsection*{%s}") 
("\\subsubsection{%s}" . "\\subsubsection*{%s}"))

 )
 org-footnote-section nil
 org-calc-default-modes '(calc-internal-prec 12 calc-float-format 
(float 5) calc-angle-mode deg calc-prefer-frac
  nil calc-symbolic-mode nil calc-date-format ( "-" MM 
"-" DD " " Www (" " hh ":" mm))

  calc-display-working-message t)
 org-speed-command-hook '(org-speed-command-default-hook 
org-babel-speed-command-hook)

 org-export-with-timestamps nil
 org-agenda-diary-file "~/org/diary.org"
 org-ref-pdf-directory "~/library/link/"
 org-occur-hook '(org-first-headline-recenter)
 org-src-tab-acts-natively t
 org-metaup-hook '(org-babel-load-in-session-maybe)
 org-agenda-start-on-weekday nil
 org-html-format-drawer-function #[514 "\207" [] 3 "\n\n(fn NAME 
CONTENTS)"]
 org-format-latex-options '(:foreground default :background "White" 
:scale 1.2 :html-foreground "Black"

:html-background "Transparent" :html-scale 1.0 :matchers
("begin" "$1" "$" "$$" "\\(" "\\["))
 org-src-window-setup 'current-window
 org-latex-format-inlinetask-function 
'org-latex-format-inlinetask-default-function

 org-confirm-shell-link-function 'yes-or-no-p
 org-ascii-format-inlinetask-function 'org-ascii-format-inlinetask-default
 org-ref-cite-types '("citep" "autocite" "citealp" "citet" "citet*" 
"cite" "citep*" "citeauthor" "citeauthor*"

  "citeyear" "nocite" "citetext")
 org-ref-open-pdf-function 'org-ref-open-pdf-at-point
 org-ref-cite-onclick-function 'org-ref-helm-cite-click
 org-time-stamp-custom-formats '("<%d.%m.%Y>" . "<%d.%m.%y %a %H:%M>")
 org-latex-pdf-process '("latexmk -f -pdf %f")
 org-latex-text-markup-alist '((bold . 

[O] use #+INDEX: for multiple indices latex export

2016-11-08 Thread Charles Millar

Hi,

Given as a very minimal example

#+latex_header: \usepackage{imakeidx}
#+latex_header: \makeindex[title=INDEX]
#+latex_header: \makeindex[name=foo, title=FOOINDEX]

is it possible to generate multiple indices using #+INDEX:

just as

* some heading on page 1
#+latex: \index[foo]{bar}

* some heading on page 2
#+latex: \index{baz}

#+latex: \printindex[foo]
#+latex: \printindex

will give

FOOINDEX

bar, 1

. . . .

INDEX

baz, 2

Charlie Millar





Re: [O] latex exporting to different directory with v9.0

2016-11-08 Thread Nicolas Goaziou
Hello,

Alex Fenton  writes:

> (defun thesis-publish-chapter-to-pdf (plist filename pub-dir)
>   "Export a chapter to a LaTeX file in output dir and compile"
>   (let ((outfile
>   (org-publish-org-to 'latex filename "-chapter.tex" plist
> pub-dir)))
> (org-latex-compile (file-relative-name outfile

See `org-latex-publish-to-pdf' for a possibly better way to handle this.

> With org-latex-pdf-process being a standard
> "latexmk -xelatex -interaction=nonstopmode -f -outdir=%o -pdf %f"
>

[...]

> That seems reasonable. All that I'd ideally like to continue to be
> able to do is keep a clean "working" (org) directory with correct
> relative links in the org files, and use a single other directory as
> "source" (tex) and "output" (pdf).

Per above, you could use latexmk "-C" option and move both ".tex" and
".pdf" file to appropriate directories.

>> but others clearly require the working directory to be the output
>> directory (note the absence of output directory in the command below)
>>
>>"texi2dvi -p -b -V %f"
>
> I'm conscious that org-mode has to work with a lot of different
> backends and compilers, but that example should still work without
> switching default-directory; only the pdf file would end up not in
> ./out but ./.

This breaks the export process, because `org-compile-file' can no longer
find, and return, the produced file. `org-compile-file' has to know
where the output is.

> I imagine the case for the vast majority of the time is that working,
> source and output directories are the same. I'm just wondering
> whether, for the cases where that's not true (calling a compiler from
> one directory to compile a file somewhere else), the responsibility
> for setting the correct default-directory, if necessary, could be left
> to the calling function, rather than having an enforced switch
> hard-coded in the core org-compile-file function.

One problem is that we already provide compilation commands that do not
set it (e.g., the "texi2dvi" command above). As I wrote, if we leave
default-directory alone, something else has to be fixed.

In any case, I removed default-directory setting and, hopefully, applied
the necessary changes to commands.

Feedback welcome.


Regards,

-- 
Nicolas Goaziou



[O] HTML export with ":export" parameter with Orgmode 9.0

2016-11-08 Thread Frederick Giasson

Hi,


I am not clear about the change in the Export blocks that occurred in 
Org-mode 9.0



Does this change impact the ":export [...]" code block header parameter? 
What I am often using is this:



http://orgmode.org/manual/Exporting-code-blocks.html


Which currently doesn't work but it is unclear from the release notes if 
it should or not and the code provided to fix the Export blocks doesn't 
appear to look for this syntax, so I guess it should still be working.



Anybody else experience this issue?


Thanks,


Fred




Re: [O] Bug: HTML exports issues: none not working, and issues with #+TITLE

2016-11-08 Thread Frederick Giasson

Hi Nicolas,

Thanks anyway, this answer led me to do some more research. What did 
work for me is this:


http://emacs.stackexchange.com/a/16616/13925

Only running C-u M-x org-reload was fixing the issue, but when I 
restarted Emacs, it was restarting. Doing org-reload, uninstall and 
re-install fixed the issue.



Thanks,

Fred

Hi Nicolas,

This seem to indicate you have a mixed installation. See, e.g.,
.


I am getting a 404 error for that page, would you have another link 
for that thread?


Thanks,

Fred






Re: [O] Bug: HTML exports issues: none not working, and issues with #+TITLE

2016-11-08 Thread Frederick Giasson

Hi Nicolas,

This seem to indicate you have a mixed installation. See, e.g.,
.


I am getting a 404 error for that page, would you have another link for 
that thread?


Thanks,

Fred



Re: [O] Obsolete org contrib package

2016-11-08 Thread Joost Kremers

Hi,

On Tue, Nov 08 2016, Nicolas Goaziou wrote:

So you mean there is no equivalent to both

  (ebib-cur-entry-key)


This one was what I was worried about, but on second thought, it 
should be possible to simply use:


   (ebib--get-key-at-point)


and

  (ebib-db-get-field-value 'title key ebib-cur-db)


That one's easier: 


  (ebib-db-get-field-value "title" key ebib--cur-db)


"org-ebib.el" is already compatible with Org 9.0.


Ah, good, I didn't realise that.

I'm Cc'ing the author. Ideally this library should be updated to 
new

Ebib and moved to some ELPA.

If Grégoire doesn't want to take care of it and no one 
volunteers to

maintain that file, we can remove it.


I was actually planning to add this functionality to Ebib itself. 
So if Grégoire isn't interested in it anymore, I could put it in 
the Ebib repo, or create a separate repo for it, either on Github 
or somewhere else, wherever you prefer.




--
Joost Kremers
Life has its moments



Re: [O] Obsolete org contrib package

2016-11-08 Thread Nicolas Goaziou
Hello,

Joost Kremers  writes:

> I just ran into org-ebib.el, a file that's part of org-contrib.
> I noticed that it uses functions from Ebib that were renamed pretty
> much exactly two years ago. (They're internal functions and thus got
> an extra dash.) This could in principle be fixed by changing the
> relevant function calls in org-ebib.el, but as it happens I'm about to
> push some changes to Ebib that will make it less straightorward to fix
> org-ebib.el.

OK.

So you mean there is no equivalent to both

  (ebib-cur-entry-key)

and

  (ebib-db-get-field-value 'title key ebib-cur-db)

?

> So perhaps it would be best to simply remove org-ebib.el from
> org-contrib? It doesn't seem to have been used by anyone the past two
> years and all it does is define a function to store an org link to an
> Ebib entry, which, IIUC, is done in a completely different way in Org
> 9.0.

"org-ebib.el" is already compatible with Org 9.0.

I'm Cc'ing the author. Ideally this library should be updated to new
Ebib and moved to some ELPA.

If Grégoire doesn't want to take care of it and no one volunteers to
maintain that file, we can remove it.

We should at least wait for a week in any case.

Regards,

-- 
Nicolas Goaziou



Re: [O] Bug: HTML exports issues: none not working, and issues with #+TITLE

2016-11-08 Thread Nicolas Goaziou
Hello,

Frederick Giasson  writes:

> I upgraded to Emacs 25.1 and Org-mode 9.0 (latest from Elpa) and I am 
> experiencing two issues with export:
>
>
>(1) The header parameter ":exports none" doesn't appear to be 
> working. With the following code, the code block is exported to HTML:
>
> =
>
> #+BEGIN_SRC elisp :results silent :exports none
> (setq org-html-htmlize-output-type 'inline-css)
> #+END_SRC
>
> =
>
>
>(2) As soon as I have a non-empty #+TITLE: defined in a org-mode 
> file, I am getting this kind of error with exporting in HTML (or any 
> other formats):
>
> =
>
> #+TITLE test
>
> =
>
> returns:
>
> =
>
> apply: Wrong type argument: listp, #("test" 0 4 (:parent (#0)))
>
> =

This seem to indicate you have a mixed installation. See, e.g.,
.

Regards,

-- 
Nicolas Goaziou



Re: [O] Elisp: help on string operations for fast file visiting

2016-11-08 Thread Karl Voit
* Alan Schmitt  wrote:
>
> On 2016-11-07 17:27, Karl Voit  writes:
>
>> I'd like to get a "Sorry" message for (1). Easy, if only I know how to
>> count lines in strings (as opposed to buffers).
>
> You could start by doing (split-string the_string "\n" t) (the last 't'
> says to omit the empty strings). So you get a list, possibly empty, of
> strings.
>
> Would this help for the rest?

Thanks for the tipp!

John Kitchin sent me some code I have to digest. From the first
look, it should help me to come up with the complete solution I
need. Thanks! I'll report back ;-)

-- 
mail|git|SVN|photos|postings|SMS|phonecalls|RSS|CSV|XML to Org-mode:
   > get Memacs from https://github.com/novoid/Memacs <

https://github.com/novoid/extract_pdf_annotations_to_orgmode + more on github




Re: [O] Elisp: help on string operations for fast file visiting

2016-11-08 Thread Alan Schmitt
On 2016-11-07 17:27, Karl Voit  writes:

> I'd like to get a "Sorry" message for (1). Easy, if only I know how to
> count lines in strings (as opposed to buffers).

You could start by doing (split-string the_string "\n" t) (the last 't'
says to omit the empty strings). So you get a list, possibly empty, of
strings.

Would this help for the rest?

Alan

-- 
OpenPGP Key ID : 040D0A3B4ED2E5C7
Monthly Athmospheric CO₂, Mauna Loa Obs. 2016-09: 401.03, 2015-09: 397.63


signature.asc
Description: PGP signature