[O] Add preamble support to ob-plantuml.el

2016-12-01 Thread Thibault Marin

Hi list,

I am attaching a patch adding support for preamble commands to
ob-plantuml.el.  The string content of the `org-plantuml-preamble'
variable is added at the beginning of each source block before execution
(after the "@startuml" string).

Does this look like this could be merged?  Please let me know if the
patch needs changes.

Thanks,

thibault

>From 157181893c212fea29986c8b072d4f087e4ace24 Mon Sep 17 00:00:00 2001
From: thibault 
Date: Thu, 1 Dec 2016 22:50:32 -0600
Subject: [PATCH] ob-plantuml.el: Add preamble to PlantUML source block

* lisp/ob-plantuml.el (org-babel-execute:plantuml) Include preamble
  given by the new `org-plantuml-preamble' customization variable.

TINYCHANGE
---
 lisp/ob-plantuml.el | 9 -
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/lisp/ob-plantuml.el b/lisp/ob-plantuml.el
index 9ce65a9..6463585 100644
--- a/lisp/ob-plantuml.el
+++ b/lisp/ob-plantuml.el
@@ -46,6 +46,12 @@
   :version "24.1"
   :type 'string)
 
+(defcustom org-plantuml-preamble ""
+  "Preamble added at the top of every plantuml source block."
+  :group 'org-babel
+  :version "24.1"
+  :type 'string)
+
 (defun org-babel-execute:plantuml (body params)
   "Execute a block of plantuml code with org-babel.
 This function is called by `org-babel-execute-src-block'."
@@ -85,7 +91,8 @@ This function is called by `org-babel-execute-src-block'."
 			(org-babel-process-file-name out-file)
 (unless (file-exists-p org-plantuml-jar-path)
   (error "Could not find plantuml.jar at %s" org-plantuml-jar-path))
-(with-temp-file in-file (insert (concat "@startuml\n" body "\n@enduml")))
+(with-temp-file in-file (insert (concat "@startuml\n" org-plantuml-preamble
+	"\n" body "\n@enduml")))
 (message "%s" cmd) (org-babel-eval cmd "")
 nil)) ;; signal that output has already been written to file
 
-- 
2.9.3



Re: [O] fuzzy matching of parameters

2016-12-01 Thread Charles C. Berry

On Thu, 1 Dec 2016, Matt Price wrote:


I have just done something I'm very excited about.  Given a directory name
(the variable ~assignment~ in this case) and a list of student info, search
through the directory for files whose names contain the student names, and
attach those to newly created subtrees.

Before now, manually attaching those files has been a real pain, so it's
great to have this automated! However, sometimes the name I have on file
doesn't quite match the submitted name.


A Google Scholar search on 'personal name matching' will point you to the 
literature on this subject.


You might get lucky and find something in a scripting language that Babel 
supports that you can piggyback onto.


HTH,

Chuck



Re: [O] v9.0 ignores org-export-babel-evaluate

2016-12-01 Thread Charles C. Berry

On Thu, 1 Dec 2016, Alexander Vorobiev wrote:


I noticed this happening with R source code blocks after the upgrade.


This should be fixed in master.

But use `org-export-use-babel' instead as `org-export-babel-evaluate' is 
obsolete.


Chuck




[O] fuzzy matching of parameters

2016-12-01 Thread Matt Price
I have just done something I'm very excited about.  Given a directory name
(the variable ~assignment~ in this case) and a list of student info, search
through the directory for files whose names contain the student names, and
attach those to newly created subtrees.

Before now, manually attaching those files has been a real pain, so it's
great to have this automated! However, sometimes the name I have on file
doesn't quite match the submitted name. In particular, my Chinese students
usually have an English first name that we use in class, and a
transliterated Chinese personal name that is used in official documents
(like my class list).  I would like to first try to match the whole name,
and if that fails, attempt some kind of "fuzzy" match of the name. I'm not
sure the best way to go about it.

Any suggestions? Here is, I think, the relevant section of code (I can post
the wider context if that would be helpful). Thanks!

Matt

(mapcar (lambda (stu)
  (let ((name (car stu))
(email (cdr stu))
)
(insert (format "\n** %s" name))
(org-todo 'todo)
(org-set-property "MAIL_TO" email)
(org-set-property "MAIL_SUBJECT"
  (format "Comments on %s
Assignment (%s)"

(mwp-org-get-parent-headline) name ))
;; try to attach files, if possible
(condition-case nil
(let* (( afiles (directory-files
assignment  nil name)))
  (if afiles
  (dolist (f afiles)
(org-attach-attach (concat
(file-name-directory (buffer-file-name)) assignment "/" f) ))
(message "No files match name of %s"
name)))
  (error (message "Unable to attach file
belonging to student")))
(save-excursion
  (org-mark-subtree)
  (org-cycle nil))
)) students)


[O] v9.0 ignores org-export-babel-evaluate

2016-12-01 Thread Alexander Vorobiev
I noticed this happening with R source code blocks after the upgrade. The
simple example is below. The resulting html file has different time in the
"Time" section than the org file. Reverting to 8.3.6 fixes the issue.

Thanks,
Alex

* Environment
  #+begin_src emacs-lisp :exports both :results output
(prin1 org-export-babel-evaluate)
  #+end_src

  #+RESULTS:
  : nil

  #+begin_src emacs-lisp :exports both :results output
(prin1 (org-version))
  #+end_src

  #+RESULTS:
  : "9.0.1"

* Time
  #+begin_src R :session *R* :exports both :results value
Sys.time()
  #+end_src

  #+RESULTS:
  : 2016-12-01 16:52:43


Re: [O] Make wide tables more readable

2016-12-01 Thread David Talmage
On Thu, Dec 1, 2016 at 3:17 PM, David Talmage 
wrote:

> ...
>
(fill-paragraph).  I've already tried org-table-wrap-region and couldn't
> figure it out.
>

I figured out org-table-wrap-region.  Most of the time it works as
expected.  Sometimes it puts text cells below the one I want.  I ended up
manually justifying my cells in a few cases.

Thank you all for the suggestions.


Re: [O] Citation syntax: now supported in Pandoc

2016-12-01 Thread Richard Lawrence
Hi Nicolas,

Nicolas Goaziou  writes:

> I rebased wip-cite onto master. I didn't test the branch but "make test"
> reports no problem.

Great, thanks!

I guess this does not include the preliminary work on the org-cite
library (from Aaron Ecay's wip-cite-awe branch), or the work I was doing
on interfacing with a CSL processor via JSON.  Both of those pieces of
work are in the branch in [1].

> I'd rather have some testing on the Org side. This is not a Pandoc-devel
> mailing list. Besides, we really need to move forward on this branch.

Sure, of course.  In order for there to be testing on the Org side,
though, we need the support for citation syntax that the wip-cite branch
provides to get hooked up to the various exporters.  This is what we
made a start on in the org-cite library, before some sticky design and
dependency issues interrupted the momentum.  Will anyone have time to
work on those soon?

Best,
Richard

[1] https://github.com/wyleyr/org-mode/commits/wip-cite-rebase



Re: [O] Make wide tables more readable

2016-12-01 Thread Clément Pit--Claudel
On Thu, Dec 1, 2016 at 3:43 PM, Joost Kremers wrote:
> Why not use `text-scale-adjust`? 

On 2016-12-01 16:12, John Kitchin wrote:
> If I had to guess its because I was unaware of that command when I wrote 
> those functions ;)

Note that these two don't do the same thing.  Text-scale-adjust changes the 
face-remapping-alist, which breaks things like company-mode.  On the other 
hand, text-scale-adjust is very fast, while John's solution (which works fine 
with company-mode) is rather slow.

Additionally, John's solution applies to the current frame, whereas 
text-scale-adjust is usually restricted to a single buffer.

Clément.




signature.asc
Description: OpenPGP digital signature


Re: [O] Make wide tables more readable

2016-12-01 Thread John Kitchin
If I had to guess its because I was unaware of that command when I wrote
those functions ;)

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 Thu, Dec 1, 2016 at 3:43 PM, Joost Kremers 
wrote:

>
> On Thu, Dec 01 2016, John Kitchin wrote:
>
>> I use:
>>
>> ;;;###autoload
>> (defun tq-increase-text-size ()
>>   "Increase text size."
>>   (interactive)
>>   (set-face-attribute 'default nil :height
>>  (truncate (* 1.1 (face-attribute 'default :height)
>>
>> ;;;###autoload
>> (defun tq-decrease-text-size ()
>>   "Decrease text size."
>>   (interactive)
>>   (set-face-attribute 'default nil :height
>>  (truncate (* 0.9 (face-attribute 'default :height)
>>
>> which I bind to C-- and  C-= to shrink the font size down until it fits,
>> then when I am done increase it.
>>
>
> Why not use `text-scale-adjust`? This function has convenient bindings in
> the form `C-x C-+` to increase text size, `C-x C--` to decrease, and `C-x
> C-0` to reset to default size. Furthermore, once you press any of these,
> you can simply use `+`, `-` and `0` for increasing, decreasing and
> resetting until you've found your preferred text size.
>
> --
> Joost Kremers
> Life has its moments
>


Re: [O] Make wide tables more readable

2016-12-01 Thread Joost Kremers


On Thu, Dec 01 2016, John Kitchin wrote:

I use:

;;;###autoload
(defun tq-increase-text-size ()
  "Increase text size."
  (interactive)
  (set-face-attribute 'default nil :height
 (truncate (* 1.1 (face-attribute 'default :height)

;;;###autoload
(defun tq-decrease-text-size ()
  "Decrease text size."
  (interactive)
  (set-face-attribute 'default nil :height
 (truncate (* 0.9 (face-attribute 'default :height)

which I bind to C-- and  C-= to shrink the font size down until 
it fits,

then when I am done increase it.


Why not use `text-scale-adjust`? This function has convenient 
bindings in the form `C-x C-+` to increase text size, `C-x C--` to 
decrease, and `C-x C-0` to reset to default size. Furthermore, 
once you press any of these, you can simply use `+`, `-` and `0` 
for increasing, decreasing and resetting until you've found your 
preferred text size.


--
Joost Kremers
Life has its moments



Re: [O] Make wide tables more readable

2016-12-01 Thread John Kitchin
I use:

;;;###autoload
(defun tq-increase-text-size ()
  "Increase text size."
  (interactive)
  (set-face-attribute 'default nil :height
 (truncate (* 1.1 (face-attribute 'default :height)

;;;###autoload
(defun tq-decrease-text-size ()
  "Decrease text size."
  (interactive)
  (set-face-attribute 'default nil :height
 (truncate (* 0.9 (face-attribute 'default :height)

which I bind to C-- and  C-= to shrink the font size down until it fits,
then when I am done increase it.

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 Thu, Dec 1, 2016 at 3:17 PM, David Talmage 
wrote:

> I'm looking for ways to make a wide table more readable.  My motivation is
> from a table that is too wide to fit on my screen.  I need to be able to
> see all of the contents of a cell. If it were just text, I'd use M-q
> (fill-paragraph).  I've already tried org-table-wrap-region and couldn't
> figure it out.
>
>
>


[O] Make wide tables more readable

2016-12-01 Thread David Talmage
I'm looking for ways to make a wide table more readable.  My motivation is
from a table that is too wide to fit on my screen.  I need to be able to
see all of the contents of a cell. If it were just text, I'd use M-q
(fill-paragraph).  I've already tried org-table-wrap-region and couldn't
figure it out.


Re: [O] Citation syntax: now supported in Pandoc

2016-12-01 Thread Nicolas Goaziou
Hello,

Richard Lawrence  writes:

> Matt Price  writes:
>
>> Richard, is wip-cite up to date with recent git versions of org-mode?
>
> Nope.  At least, I have not done any work on this, and I don't know of
> anyone else who has either.  I suppose I should rebase it onto master
> again, but it's hard to justify the effort unless someone is going to
> actively work on it, because otherwise it will quickly get out of date.
> (Unfortunately, I can't put much time into this, at least not in the
> short term.)

I rebased wip-cite onto master. I didn't test the branch but "make test"
reports no problem.

>> I'd like ot try it out but would rather not go back to a pre-9.0
>> version or org, having done a certain amount of work to update to the
>> new framework...
>
> Well, I'd still recommend trying it with Pandoc (instead of trying to
> get wip-cite to work).  If there are issues with Pandoc's Org reader
> post-9.0, those should be filed as bugs against Pandoc.

I'd rather have some testing on the Org side. This is not a Pandoc-devel
mailing list. Besides, we really need to move forward on this branch.

Regards,

-- 
Nicolas Goaziou



Re: [O] Bug: Latex preview overlay scaling not consistent across PPI

2016-12-01 Thread Nicolas Goaziou
Hello,

Scott Otterson  writes:

> I'd like to test your fix but I'm a github newbie (*).

Org main repository is not in github.

> Where did you check it in?

In "maint" branch of our repository.

> I don't know if it's melpa or elpa, or if the fix is in a personal
> account or something official. Is there a standard way everybody
> contributes their fixes?

See above. See also .

The fix wannabe will hit Org ELPA on Monday.

Regards,

-- 
Nicolas Goaziou



Re: [O] Citation syntax: now supported in Pandoc

2016-12-01 Thread Richard Lawrence
Hi Matt,

Matt Price  writes:

> Richard, is wip-cite up to date with recent git versions of org-mode?

Nope.  At least, I have not done any work on this, and I don't know of
anyone else who has either.  I suppose I should rebase it onto master
again, but it's hard to justify the effort unless someone is going to
actively work on it, because otherwise it will quickly get out of date.
(Unfortunately, I can't put much time into this, at least not in the
short term.)

> I'd like ot try it out but would rather not go back to a pre-9.0
> version or org, having done a certain amount of work to update to the
> new framework...

Well, I'd still recommend trying it with Pandoc (instead of trying to
get wip-cite to work).  If there are issues with Pandoc's Org reader
post-9.0, those should be filed as bugs against Pandoc.

Best,
Richard



Re: [O] latex export: can I add an optional argument to an item?

2016-12-01 Thread Richard Lawrence
Hi Alan,

Alan Schmitt  writes:

> I would like to generate the following latex export:
>
> \begin{itemize}
> \item[\Checkmark] foo
> \end{itemize}

It's not exactly pretty, but you can use a description list while
resetting it to the itemize environment, like:

#+ATTR_LATEX: :environment itemize  
  - \Checkmark :: foo

That produces:

\begin{itemize}
\item[{\Checkmark}] foo
\end{itemize}

At least, that works for me (I have not yet upgraded to Org 9.0;
so I don't know if this will continue to work, though I don't know of
any reason why it shouldn't). 

Hope that helps!

Best,
Richard



Re: [O] dynamically set face [was: semi-visible stars?]

2016-12-01 Thread John Kitchin
Try:

`background light)) (:foreground ,(format (face-attribute 'default 
:background)) ))
(((background dark)) (:foreground ,(format (face-attribute 'default 
:background)

Note the backtick and the commas. The functions in your list are treated
like data and not evaluated. The backtick and commas will evaluate the
format sexps and might do what you want. 

I am pretty sure this won't be dynamic though, it will only define the
face when it is loaded in your init files.

For that, it seems like you might need to use set-face-attribute in a
hook function.

As for the persistence, I guess something is getting saved in your
custom.el file which gets reloaded after a restart.

Matt Price writes:

> On Thu, Dec 1, 2016 at 10:22 AM, Matt Price  wrote:
>
>>
>>
>> On Wed, Nov 30, 2016 at 3:41 PM, Matt Price  wrote:
>>
>>> I have been fooling around a little bit with color-themes and also the
>>> new emacs 24+ custom themes, and find that (perhaps because of using
>>> desktop-mode) there are certain traces of the theming that get left behind
>>> in the display even when I've restarted Emacs after trying hard to erase
>>> them.
>>>
>>> One of these is the frequent appearance of pale stars even when
>>> org-indent-mode is turned on.  See the attached screenshot for details.
>>> The initial stars in a lower-level headline are visible, as are leading
>>> stars in front of the indented text.  I find this quite distracting! Does
>>> anyone know what might be causing this, how I can get rid of them, and also
>>> how I would in general go about figuring out how to identify the cause of
>>> similar appearance-related issues in Emacs?
>>>
>>
>> I just navigated to org-faces.el and executed M-C-x on this defface:
>>
>> (defface org-hide
>>   'background light)) (:foreground "white"))
>> (((background dark)) (:foreground "black")))
>>   "Face used to hide leading stars in headlines.
>> The foreground color of this face should be equal to the background
>> color of the frame."
>>   :group 'org-faces)
>>
>> problem solved.  Sorry for the noise.
>>
>> OK, not solved, exactly. I have (setq color-theme-is-global t) in order to
> differentiate between different frames (one for mail, one for code, one for
> org).  When I switch between the mail frame (using the 'wheat' theme) and
> the org frame (which uses a default theme), the color of org-hide seems to
> get set to the light golden brown color that 'wheat' ueses as its
> background color.  Here's the extremely short definition of the wheat
> color-theme:
>
> (defun color-theme-wheat ()
>   "Default colors on a wheat background.
> Calls the standard color theme function `color-theme-standard' in order
> to reset all faces."
>   (interactive)
>   (color-theme-standard)
>   (let ((color-theme-is-cumulative t))
> (color-theme-install
>  '(color-theme-wheat
>((background-color . "Wheat"))
>
> I'm not sure why this messes up the other frames, but clearly it does.  I'm
> thinking that if I can dynamically set the :foreground color to *whatever
> the background color is in the frame*, that might fix the issue.  So I
> tried this:
>
>
> (defface org-hide
>   'background light)) (:foreground (format (face-attribute 'default
> :background)) ))
> (((background dark)) (:foreground (format (face-attribute 'default
> :background)
>   "Face used to hide leading stars in headlines.
> The foreground color of this face should be equal to the background
> color of the frame."
>   :group 'org-faces)
>
> but I get this error:
>
> set-face-attribute: Wrong type argument: stringp, (format (face-attribute
> (quote default) :background))
>
> Obviously my understanding of lisp types is a little weak, but (type-of
> (format (face-attribute 'default :background))) returns "string".  So
> what's wrong here? And am I going about this the right way?
>
> Thank you!
> m
>
>
>
>>
>>> Thank you!
>>>
>>> Matt
>>>
>>>
>>


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



[O] dynamically set face [was: semi-visible stars?]

2016-12-01 Thread Matt Price
On Thu, Dec 1, 2016 at 10:22 AM, Matt Price  wrote:

>
>
> On Wed, Nov 30, 2016 at 3:41 PM, Matt Price  wrote:
>
>> I have been fooling around a little bit with color-themes and also the
>> new emacs 24+ custom themes, and find that (perhaps because of using
>> desktop-mode) there are certain traces of the theming that get left behind
>> in the display even when I've restarted Emacs after trying hard to erase
>> them.
>>
>> One of these is the frequent appearance of pale stars even when
>> org-indent-mode is turned on.  See the attached screenshot for details.
>> The initial stars in a lower-level headline are visible, as are leading
>> stars in front of the indented text.  I find this quite distracting! Does
>> anyone know what might be causing this, how I can get rid of them, and also
>> how I would in general go about figuring out how to identify the cause of
>> similar appearance-related issues in Emacs?
>>
>
> I just navigated to org-faces.el and executed M-C-x on this defface:
>
> (defface org-hide
>   'background light)) (:foreground "white"))
> (((background dark)) (:foreground "black")))
>   "Face used to hide leading stars in headlines.
> The foreground color of this face should be equal to the background
> color of the frame."
>   :group 'org-faces)
>
> problem solved.  Sorry for the noise.
>
> OK, not solved, exactly. I have (setq color-theme-is-global t) in order to
differentiate between different frames (one for mail, one for code, one for
org).  When I switch between the mail frame (using the 'wheat' theme) and
the org frame (which uses a default theme), the color of org-hide seems to
get set to the light golden brown color that 'wheat' ueses as its
background color.  Here's the extremely short definition of the wheat
color-theme:

(defun color-theme-wheat ()
  "Default colors on a wheat background.
Calls the standard color theme function `color-theme-standard' in order
to reset all faces."
  (interactive)
  (color-theme-standard)
  (let ((color-theme-is-cumulative t))
(color-theme-install
 '(color-theme-wheat
   ((background-color . "Wheat"))

I'm not sure why this messes up the other frames, but clearly it does.  I'm
thinking that if I can dynamically set the :foreground color to *whatever
the background color is in the frame*, that might fix the issue.  So I
tried this:


(defface org-hide
  'background light)) (:foreground (format (face-attribute 'default
:background)) ))
(((background dark)) (:foreground (format (face-attribute 'default
:background)
  "Face used to hide leading stars in headlines.
The foreground color of this face should be equal to the background
color of the frame."
  :group 'org-faces)

but I get this error:

set-face-attribute: Wrong type argument: stringp, (format (face-attribute
(quote default) :background))

Obviously my understanding of lisp types is a little weak, but (type-of
(format (face-attribute 'default :background))) returns "string".  So
what's wrong here? And am I going about this the right way?

Thank you!
m



>
>> Thank you!
>>
>> Matt
>>
>>
>


Re: [O] Latex code blocks HTML export still broken

2016-12-01 Thread Nick Dokos
Éric Würbel  writes:

> When exporting a latex code block as a png image in an HTML page, Org
> complains that the pdf file was not produced.
>
> Minimal org document example :
>
> #+BEGIN_SRC org
> #+TITLE LaTeX export minimal test
>
> * Let's go
>
>   A really interresting algorithm :
>
>   #+header: :headers '( "\\renewcommand{\\familydefault}{\\sfdefault}" 
> "\\usepackage{lmodern}" "\\usepackage{algpseudocode}" )
>   #+header: :file algo.png
>   #+header: :imagemagick yes :fit yes
>   #+header: :results raw :iminoptions -density 600 :imoutoptions -geometry 
> 1200 
>   #+BEGIN_SRC latex
> \begin{algorithmic}[1]
>   \Function{triSauvegarde}{nom\_fichier : String}
>   \State tab $\gets$  \Call{copie}{leContenu}
>   \State \Call{trier}{tab}
>   \State \Call{sauvegarder}{nom\_fichier}
>   \EndFunction
> \end{algorithmic}
>   #+END_SRC
>
> #+END_SRC
>  
>
> When trying to export to html with C-c C-e h h, org complains :
>
> org-compile-file: File "/tmp/babel-2370po9/latex-237073Q.pdf" wasn't
> produced.  See "*Org PDF LaTeX Output*" for details
>

I tried this and (after installing the texlive-algorithmicx package on
my Fedora system) it works fine.

Once more: what does the "*Org PDF LaTeX Output*" say?


> In fact the file is produced, but directly in
> /tmp/latex-237073Q.pdf. (no babel-2370po9 subdir).
>
> So, compared to the previous version of the bug, we have progressed :
> temporary pdf are not produced in the current directory anymore, but org
> does not know yet where to find them ;o)
>
> Regards
>
> E.

-- 
Nick




Re: [O] Latex code blocks HTML export still broken

2016-12-01 Thread Nick Dokos
Éric Würbel  writes:

> When trying to export to html with C-c C-e h h, org complains :
>
> org-compile-file: File "/tmp/babel-2370po9/latex-237073Q.pdf" wasn't
> produced.  See "*Org PDF LaTeX Output*" for details
>

What does that buffer show?

> In fact the file is produced, but directly in
> /tmp/latex-237073Q.pdf. (no babel-2370po9 subdir).
>

Are you sure that's not left over from some previous experiments?

-- 
Nick




Re: [O] Citation syntax: now supported in Pandoc

2016-12-01 Thread Matt Price
Richard, is wip-cite up to date with recent git versions of org-mode? I'd
like ot try it out but would rather not go back to a pre-9.0 version or
org, having done a certain amount of work to update to the new framework...

Thanks!

On Thu, Dec 1, 2016 at 8:51 AM, Julian M. Burgos  wrote:

> This is very interesting! I will give it a try. Thanks for the heads up.
>
>
> Richard Lawrence writes:
>
> > Hi everyone,
> >
> > With Org 9.0 out, I thought it might be a good time to revisit the issue
> > of citation syntax.  Not much has happened with this recently, but I do
> > have one bit of progress to report:
> >
> > About six months ago, Albert Krewinkel, who maintains the support for Org
> > syntax in Pandoc [1], wrote to me about supporting the citation syntax
> > we discussed previously, and that is partially implemented in
> > the wip-cite branch.  You can see examples of the syntax at [2].
> >
> > Albert dove in, and was able to quickly add support for the syntax to
> > Pandoc's Org reader.  This support has been merged into released
> > versions of Pandoc.  Albert actually announced this a few months ago on
> > Reddit [3], but it looks like he did not email this list.
> >
> > I finally got a chance to check out his work yesterday.  I converted one
> > citation-heavy chapter of my dissertation to use the new syntax, and
> > tested out Pandoc's support, with a couple of different CSL stylesheets,
> > including a note-based style.  It works great.  Thanks, Albert, for your
> > hard work!
> >
> > There are some minor issues that probably need more discussion after
> > real-world use (like whether/when a conjunction should be inserted
> > automatically before the last reference in a multi-cite citation).  But
> > as far as I can tell, Albert has correctly implemented everything we
> > actually discussed and agreed on.
> >
> > In short, Pandoc now has support for Org citation syntax, and that
> > support is fully integrated with Pandoc's citation processing
> > capabilities.  So there is now at least one "real" (non-prototype)
> > solution for processing Org citations via CSL, with output to HTML,
> > LaTeX, ODT, .docx, and the other formats that Pandoc supports.
> >
> > This makes it a lot easier for people to test out the syntax in the real
> > world, so I encourage you to do so, and report back on what you find!
> >
> > Best,
> > Richard
> >
> > [1] http://pandoc.org/
> > [2] https://github.com/wyleyr/org-citeproc/blob/master/tests/testdoc.org
> > [3] https://www.reddit.com/r/orgmode/comments/4tes4x/ann_
> pandoc_v1172_has_been_released_it_now/
>
>
> --
> Julian Mariano Burgos, PhD
> Hafrannsóknastofnun, rannsókna- og ráðgjafarstofnun hafs og vatna/
> Marine and Freshwater Research Institute
> Skúlagata 4, 121 Reykjavík, Iceland
> Sími/Telephone : +354-5752037
> Bréfsími/Telefax:  +354-5752001
> Netfang/Email: julian.bur...@hafogvatn.is
>
>


Re: [O] semi-visible stars?

2016-12-01 Thread Matt Price
On Wed, Nov 30, 2016 at 3:41 PM, Matt Price  wrote:

> I have been fooling around a little bit with color-themes and also the new
> emacs 24+ custom themes, and find that (perhaps because of using
> desktop-mode) there are certain traces of the theming that get left behind
> in the display even when I've restarted Emacs after trying hard to erase
> them.
>
> One of these is the frequent appearance of pale stars even when
> org-indent-mode is turned on.  See the attached screenshot for details.
> The initial stars in a lower-level headline are visible, as are leading
> stars in front of the indented text.  I find this quite distracting! Does
> anyone know what might be causing this, how I can get rid of them, and also
> how I would in general go about figuring out how to identify the cause of
> similar appearance-related issues in Emacs?
>

I just navigated to org-faces.el and executed M-C-x on this defface:

(defface org-hide
  'background light)) (:foreground "white"))
(((background dark)) (:foreground "black")))
  "Face used to hide leading stars in headlines.
The foreground color of this face should be equal to the background
color of the frame."
  :group 'org-faces)

problem solved.  Sorry for the noise.


> Thank you!
>
> Matt
>
>


Re: [O] Citation syntax: now supported in Pandoc

2016-12-01 Thread Julian M. Burgos
This is very interesting! I will give it a try. Thanks for the heads up.


Richard Lawrence writes:

> Hi everyone,
>
> With Org 9.0 out, I thought it might be a good time to revisit the issue
> of citation syntax.  Not much has happened with this recently, but I do
> have one bit of progress to report:
>
> About six months ago, Albert Krewinkel, who maintains the support for Org
> syntax in Pandoc [1], wrote to me about supporting the citation syntax
> we discussed previously, and that is partially implemented in
> the wip-cite branch.  You can see examples of the syntax at [2].
>
> Albert dove in, and was able to quickly add support for the syntax to
> Pandoc's Org reader.  This support has been merged into released
> versions of Pandoc.  Albert actually announced this a few months ago on
> Reddit [3], but it looks like he did not email this list.
>
> I finally got a chance to check out his work yesterday.  I converted one
> citation-heavy chapter of my dissertation to use the new syntax, and
> tested out Pandoc's support, with a couple of different CSL stylesheets,
> including a note-based style.  It works great.  Thanks, Albert, for your
> hard work!
>
> There are some minor issues that probably need more discussion after
> real-world use (like whether/when a conjunction should be inserted
> automatically before the last reference in a multi-cite citation).  But
> as far as I can tell, Albert has correctly implemented everything we
> actually discussed and agreed on.
>
> In short, Pandoc now has support for Org citation syntax, and that
> support is fully integrated with Pandoc's citation processing
> capabilities.  So there is now at least one "real" (non-prototype)
> solution for processing Org citations via CSL, with output to HTML,
> LaTeX, ODT, .docx, and the other formats that Pandoc supports.
>
> This makes it a lot easier for people to test out the syntax in the real
> world, so I encourage you to do so, and report back on what you find!
>
> Best,
> Richard
>
> [1] http://pandoc.org/
> [2] https://github.com/wyleyr/org-citeproc/blob/master/tests/testdoc.org
> [3] 
> https://www.reddit.com/r/orgmode/comments/4tes4x/ann_pandoc_v1172_has_been_released_it_now/


--
Julian Mariano Burgos, PhD
Hafrannsóknastofnun, rannsókna- og ráðgjafarstofnun hafs og vatna/
Marine and Freshwater Research Institute
Skúlagata 4, 121 Reykjavík, Iceland
Sími/Telephone : +354-5752037
Bréfsími/Telefax:  +354-5752001
Netfang/Email: julian.bur...@hafogvatn.is



[O] Latex code blocks HTML export still broken

2016-12-01 Thread Éric Würbel

When exporting a latex code block as a png image in an HTML page, Org
complains that the pdf file was not produced.

Minimal org document example :

#+BEGIN_SRC org
#+TITLE LaTeX export minimal test

* Let's go

  A really interresting algorithm :

  #+header: :headers '( "\\renewcommand{\\familydefault}{\\sfdefault}" 
"\\usepackage{lmodern}" "\\usepackage{algpseudocode}" )
  #+header: :file algo.png
  #+header: :imagemagick yes :fit yes
  #+header: :results raw :iminoptions -density 600 :imoutoptions -geometry 1200 
  #+BEGIN_SRC latex
\begin{algorithmic}[1]
  \Function{triSauvegarde}{nom\_fichier : String}
  \State tab $\gets$  \Call{copie}{leContenu}
  \State \Call{trier}{tab}
  \State \Call{sauvegarder}{nom\_fichier}
  \EndFunction
\end{algorithmic}
  #+END_SRC
#+END_SRC
 

When trying to export to html with C-c C-e h h, org complains :

org-compile-file: File "/tmp/babel-2370po9/latex-237073Q.pdf" wasn't produced.  
See "*Org PDF LaTeX Output*" for details

In fact the file is produced, but directly in
/tmp/latex-237073Q.pdf. (no babel-2370po9 subdir).

So, compared to the previous version of the bug, we have progressed :
temporary pdf are not produced in the current directory anymore, but org
does not know yet where to find them ;o)

Regards

E.


-- 
Éric Würbel
http://eric.wurbel.perso.luminy.univ-amu.fr/
Enseignement: IUT R, directeur des études 1A
Recherche: LSIS, UMR7296 http://www.lsis.org/



[O] latex export: can I add an optional argument to an item?

2016-12-01 Thread Alan Schmitt
Hello,

I would like to generate the following latex export:

\begin{itemize}
\item[\Checkmark] foo
\end{itemize}

I tried both

-[\Checkmark]

and

- [\Checkmark]

but neither works.

Is this possible with org-mode?

Best,

Alan

-- 
OpenPGP Key ID : 040D0A3B4ED2E5C7
Monthly Athmospheric CO₂, Mauna Loa Obs. 2016-10: 401.57, 2015-10: 398.29


signature.asc
Description: PGP signature