Re: [O] automatically run code blocks when loading an org-mode document

2016-07-22 Thread grewil3 .
Sir, you are a great genius - many thanks!

On Sat, Jul 23, 2016 at 12:11 AM, Nick Dokos  wrote:

> "grewil3 ."  writes:
>
> > Hi! When I load the document below, I first need to manually evaluate
> the code block before I can use
> > the links. I would like the code block to be automatically evaluated
> when I load the document, making
> > the links usable at once.
> >
> > Is there some clever in-buffer-setting I can use, to specify that I want
> the block called on loading,
> > some kind of post-load hook?
> >
> > #+BEGIN_SRC emacs-lisp
> > (defun handy-stuff(arg)
> >   (message arg))
> > #+END_SRC
> >
> > [[elisp:(handy-stuff "foo")][foo]]
> > [[elisp:(handy-stuff "bar")][bar]]
> >
>
> --8<---cut here---start->8---
> #  -*- find-file-hook: org-babel-execute-buffer -*-
> #+BEGIN_SRC emacs-lisp
> (defun handy-stuff(arg)
>  (message arg))
> #+END_SRC
>
> [[elisp:(handy-stuff "foo")][foo]]
> [[elisp:(handy-stuff "bar")][bar]]
>
> --8<---cut here---end--->8---
>
> will do that (but you get a question re. "safe" local variables when
> you open the file). It also executes *every* code block in the buffer
> which you might not want to do (although it does not matter in this
> case).
>
> --
> Nick
>
>
>


Re: [O] #+BEGIN_html/#+END_html tags not exporting literally to html anymore?

2016-07-22 Thread Eric S Fraga
On Friday, 22 Jul 2016 at 13:46, Adam Aviv wrote:
> I just did an update to my org install, and when I recompiled my
> notes, I noticed that I was not getting literal exporting for things
> between a #+BEGIN_HTML and #+END_HTML tag, however #+HTML: prefix
> still exports properly.
>
> Am I to assume that
>
> #+BEGIN_HTML
> #+END_HTML
>
>
> will be completely replaced now with
>
> #+BEGIN_EXPORT html
> #+END_HTML

Yes with #+end_export of course.

> If so, is there a way to make compilation backwards compatible. I have
> a lot of old org files that would be a pain to update.  Further, all
> the documentation on the org site is also out of date.

a simple regex replace (or two I guess) will fix all in a file?

-- 
: Eric S Fraga (0xFFFCF67D), Emacs 25.0.94.1, Org release_8.3.4-1049-g481709



Re: [O] two basic elisp questions

2016-07-22 Thread Matt Price
On Fri, Jul 22, 2016 at 1:54 PM, Michael Welle  wrote:

> Hello,
>
> Matt Price  writes:
>
> > On Fri, Jul 22, 2016 at 11:38 AM, Matt Price  wrote:
> >
> >>
> >> (2) Is it possible to set the default value for interactive file
> selection
> >> to something OTHER than the currect directory of the current buffer?
> >> Something like:
> >>
> >> (let
> >>   ((base-dir "./Assignment1/"))
> >>   (org-attach--attach))
> >>
> >> I'd like to set different base directories when attaching files to
> >> subtrees of different first-level trees in a buffer. I guess I would set
> >> the value for the base directory with a property.
> >>
> >
> > OK, I made some progress on this:
> >
> > (let ((default-directory  (concat default-directory "Assignment1/") ))
> > (call-interactively 'org-attach-attach))
> >
> > However, I'd like to do something like:
> >
> > (let
> > ((parent-basedir nil))
> >   (save-excursion
> > (outline-up-heading)
> > (setq parent-basedir (org-get-entry "BASEDIR")))
> >   (let
> >   ((default-directory (concat default-directory parent-basedir) ))
> > (call-interactively 'org-attach-attach  )))
> >
> >
> >
> > But there are errors I don't understand in this code. Any hints? Thanks
> > again!
> well, I guess the errors are too secret to share them with us? The first
> I can see is that org-get-entry doesn't need parameters. And the overall
> structure looks strange, but that could be just me ;).
>
> :-( No, they're not too secret, I just have a terrible head cold and can
hardly think, so didn't think to include it!

The overall structure feels strange to me -- I just want a way of retaining
a temprary variable value in a let that also includes a temporary excursion
to the parent node. More on that shortly.


> The reason for the current behaviour is the interactive form of
> org-attach-attach. Ad hoc I have no idea how to change that. What I
> would try is to (cd your-wanted-dir) before calling org-attach-attach.
> Maybe a bit of cleanup if useful after calling the function.
>

So it turns out  that, like most interactive functions, org-attach-attach
uses the built-in read-file-name macro, which relies on the value of
"default-directory", which is buffer-local. By calling org-attach-attach
from inside a let statement, I can get the behaviour I want:
(let
  ((default-directory (concat default-directory "Galileo/")))
  (org-attach-attach))


 The problem now is that I need to access a property from the parent node
in order ot dynamically set the appropriate value for default-directory,
and I'm struggling to do that.

Here is a minimal test file:

* Galileo :ASSIGNMENT:
:PROPERTIES:
:BASEDIR:  Galileo
:END:


** testing
#+BEGIN_SRC emacs-lisp
  (let
  ((parent-basedir nil))
(save-excursion
  (outline-up-heading)
  (setq parent-basedir (org-entry-get (point) "BASEDIR"))
  (message parent-basedir))
(let
((default-directory (concat default-directory parent-basedir) ))
  (call-interactively 'org-attach-attach  )))
#+END_SRC

This seems to work but so far I'm having issues actually opening the
attachment.  This may be due to the way that org-attach constructs links to
attachments (I prefer not to copy, as my disk space is limited).
Anyway, thanks for your help; this seems to be getting closer, despite what
feels like substantial mental impairment due to increased cranial pressure
(ouch!)
Matt


> Regards
> hmw
>
>
>


[O] [PATCH] Fix to allow ob-babel-shell-names to be customised.

2016-07-22 Thread Bernard Hurley
Hi all,

At present customisation of the variable ob-babel-shell-names in
ob-shell.el doesn't work properly.  You can actually change its value
and save the customisation, but the org-babel-execute: functions
get created for the hard coded value of the variable not the customised
value.

The following patch should fix it:

---snip
*** ob-shell.el.old 2016-07-22 20:43:43.190100908 +0100
--- ob-shell.el 2016-07-22 22:55:28.730037538 +0100
***
*** 42,60 
  
  (defcustom org-babel-shell-names
'("sh" "bash" "csh" "ash" "dash" "ksh" "mksh" "posh")
!   "List of names of shell supported by babel shell code blocks."
:group 'org-babel
!   :type 'string
!   :initialize
(lambda (symbol value)
! (set-default symbol (second value))
  (mapc
   (lambda (name)
 (eval `(defun ,(intern (concat "org-babel-execute:" name)) (body 
params)
,(format "Execute a block of %s commands with Babel." name)
(let ((shell-file-name ,name))
  (org-babel-execute:shell body params)
!  (second value
  
  (defun org-babel-execute:shell (body params)
"Execute a block of Shell commands with Babel.
--- 42,61 
  
  (defcustom org-babel-shell-names
'("sh" "bash" "csh" "ash" "dash" "ksh" "mksh" "posh")
!   "List of names of shell supported by babel shell code blocks.
! Changing this variable outside the Customize interface has no effect."
:group 'org-babel
!   :type '(repeat string)
!   :set
(lambda (symbol value)
! (set-default symbol value)
  (mapc
   (lambda (name)
 (eval `(defun ,(intern (concat "org-babel-execute:" name)) (body 
params)
,(format "Execute a block of %s commands with Babel." name)
(let ((shell-file-name ,name))
  (org-babel-execute:shell body params)
!  value)))
  
  (defun org-babel-execute:shell (body params)
"Execute a block of Shell commands with Babel.
---snip--

I am using Org version 8.3.5 in Emacs  25.1.50.1.

Cheers,

Bernard

-- 

Your fortune cookie for today:

Marriage is low down, but you spend the rest of your life paying for it.
-- Baskins

** Fortune cookies are brought to you by GNU/Linux "fortunes" **



Re: [O] Unable to resolve link: nil

2016-07-22 Thread Vikas Rawal
> 
>> Working on long, complex documents, I sometimes have a wrongly pointed
>> link. And when I try to export it, I get the error: "Unable to resolve
>> link: nil”. Is there a straightforward way to find out which link is
>> not resolving?
> good question ;). I spent half an hour this week in a similar situation ;).
> I used bisecting to find the problem. In my case it was a space before
> the protocol: [[ http://foo.bar][foo]].


I am unable to export individual headlines because of many cross-references. An 
individual headline refuses to export because of them. So, exporting parts of 
the document to narrow down to the part where the problem is does not work for 
me.

Vikas 


Re: [O] Unable to resolve link: nil

2016-07-22 Thread Vikas Rawal
> 
>> 
>> (untested)
>> 
>> Does org-lint help? 
> 
> Oh wow!
> 

org-lint helped identify several errors but this problem remains.

Vikas




[O] bug#23917: Re: bug#23917: 25.0.95; commit 3a9d6296b35e5317c497674d5725eb52699bd3b8 causing org-capture to error out

2016-07-22 Thread N. Jackson
At 21:08 -0400 on Thursday 2016-07-21, npost...@users.sourceforge.net wrote:

> I made the same adjustments to the saved sub_start and sub_end
> variables, but I had a mistake in that adjustment which caused the false
> positives.  Fixed in the attached v2 patch.  We could just drop the
> check, though I've already found it useful to catch bugs
> (https://github.com/joaotavora/yasnippet/issues/720).
>
> If I drop the checks (see attached v3 patch), then after following the
> bug#23869 recipe, I get:
>
> ## -*- Octave -*-
> -module(bug).
> -export([identity/1, is_even/1, size/1, reverse/1]).

Thanks Noam,

Both the v2 and the v3 patch work for me with all my Org captures under
my full config, and with the simple recipe under `emacs -Q".

I'm not familiar with the details of the bug or the patches, but turning
off checks doesn't sound right, so I've stayed with the v2 patch.

I am now running the v2 patch as my every day Emacs.

FWIW, my versions of Emacs and Org are:

GNU Emacs 25.0.95.15 (x86_64-unknown-linux-gnu, GTK+ Version 3.18.9)
 of 2016-07-22 built on moondust
Repository revision: 4157159a37b43712440da91a45a6d5f71eb96e8a

and 

Org-mode version 8.3.5 (8.3.5-elpa @ /home/nlj/.emacs.d/elpa/org-20160719/)

.





Re: [O] Unable to resolve link: nil

2016-07-22 Thread Vikas Rawal
> 
> (untested)
> 
> Does org-lint help? 

Oh wow!

Thanks.

Vikas




Re: [O] automatically run code blocks when loading an org-mode document

2016-07-22 Thread Nick Dokos
"grewil3 ."  writes:

> Hi! When I load the document below, I first need to manually evaluate the 
> code block before I can use
> the links. I would like the code block to be automatically evaluated when I 
> load the document, making
> the links usable at once.
>
> Is there some clever in-buffer-setting I can use, to specify that I want the 
> block called on loading,
> some kind of post-load hook?
>
> #+BEGIN_SRC emacs-lisp
> (defun handy-stuff(arg)
>   (message arg))
> #+END_SRC
>
> [[elisp:(handy-stuff "foo")][foo]]
> [[elisp:(handy-stuff "bar")][bar]]
>

--8<---cut here---start->8---
#  -*- find-file-hook: org-babel-execute-buffer -*-
#+BEGIN_SRC emacs-lisp
(defun handy-stuff(arg)
 (message arg))
#+END_SRC

[[elisp:(handy-stuff "foo")][foo]]
[[elisp:(handy-stuff "bar")][bar]]

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

will do that (but you get a question re. "safe" local variables when
you open the file). It also executes *every* code block in the buffer
which you might not want to do (although it does not matter in this
case).

-- 
Nick




Re: [O] #+BEGIN_html/#+END_html tags not exporting literally to html anymore?

2016-07-22 Thread Nick Dokos
Adam Aviv  writes:

> On Fri, Jul 22, 2016 at 12:38 PM, Charles C. Berry  wrote:
>
> It is updated. For example, see
>
>         (info "(org) Special blocks")
> and
>         (info "(org) results")
>
> and in ORG-NEWS.
>
> I see that now, but the online documentation is still out dated:
>
> http://orgmode.org/manual/Quoting-HTML-tags.html
>
> Is there a push cycle to keep the online documents up to date with the source 
> documentation? Or is that
> controlled differently?
>

That's because the online docs are for the stable version (the version
you get from the maint branch of the git repo).

If you are using latest (i.e. the master branch of the git repo), then
you have to build and use the docs that come with it:

  make info

I do

--8<---cut here---start->8---
INFOPATH=$HOME/src/emacs/org/org-mode/doc:/usr/local/share/info:/usr/share/info
export INFOPATH
--8<---cut here---end--->8---

in my login shell initialization file to make sure that I pick the
version I built over any other versions installed on my system.
There are other ways to do that - and even for this one, you will
have to modify the paths appropriately.

-- 
Nick




[O] automatically run code blocks when loading an org-mode document

2016-07-22 Thread grewil3 .
Hi! When I load the document below, I first need to manually evaluate the
code block before I can use the links. I would like the code block to be
automatically evaluated when I load the document, making the links usable
at once.

Is there some clever in-buffer-setting I can use, to specify that I want
the block called on loading, some kind of post-load hook?

#+BEGIN_SRC emacs-lisp
(defun handy-stuff(arg)
  (message arg))
#+END_SRC

[[elisp:(handy-stuff "foo")][foo]]
[[elisp:(handy-stuff "bar")][bar]]


Re: [O] #+BEGIN_html/#+END_html tags not exporting literally to html anymore?

2016-07-22 Thread Robert Klein
Hi,
On Fri, 22 Jul 2016 15:33:53 -0400
Adam Aviv  wrote:

> On Fri, Jul 22, 2016 at 12:38 PM, Charles C. Berry 
> wrote:
> 
> > It is updated. For example, see
> >
> > (info "(org) Special blocks")
> > and
> > (info "(org) results")
> >
> > and in ORG-NEWS.
> >  
> 
> I see that now, but the online documentation is still out dated:
> 
> http://orgmode.org/manual/Quoting-HTML-tags.html
> 
> Is there a push cycle to keep the online documents up to date with the
> source documentation? Or is that controlled differently?

The online documentation is for the released version and its
maintenance (i.e. git release `8.3.5' and git branch `maint').

Your org version is from the development branch `master'.  It is
documented in the doc/ directory.  To create the HTML manual run `gmake
html' in the top directory of the source; for a printable PDF run
`gmake pdf'.  The final manual will also be in the doc/ directory.

Best regards
Robert



Re: [O] #+BEGIN_html/#+END_html tags not exporting literally to html anymore?

2016-07-22 Thread Adam Aviv
On Fri, Jul 22, 2016 at 12:38 PM, Charles C. Berry  wrote:

> It is updated. For example, see
>
> (info "(org) Special blocks")
> and
> (info "(org) results")
>
> and in ORG-NEWS.
>

I see that now, but the online documentation is still out dated:

http://orgmode.org/manual/Quoting-HTML-tags.html

Is there a push cycle to keep the online documents up to date with the
source documentation? Or is that controlled differently?


-- 
Adam J. Aviv, PhD
*Asst. Professor*
*Computer Science*
*U.S. Naval Academy*
*(410) 293- 6655*


Re: [O] Unable to resolve link: nil

2016-07-22 Thread Nick Dokos
Michael Welle  writes:

> Hello,
>
> Vikas Rawal  writes:
>
>> Working on long, complex documents, I sometimes have a wrongly pointed
>> link. And when I try to export it, I get the error: "Unable to resolve
>> link: nil”. Is there a straightforward way to find out which link is
>> not resolving?
> good question ;). I spent half an hour this week in a similar situation ;).
> I used bisecting to find the problem. In my case it was a space before
> the protocol: [[ http://foo.bar][foo]].
>

(untested)

Does org-lint help? 

-- 
Nick




Re: [O] issues with duplicate ID's

2016-07-22 Thread Xebar Saram
thx
it seems many of them are in the corresponding archive files. isnt that
normal when you archive?

best

Z

On Fri, Jul 22, 2016 at 6:20 PM, Philip Hudson 
wrote:

> On 22 July 2016 at 12:58, Xebar Saram  wrote:
> > Hi all
> >
> > i have been having many warnings on Duplicate ID's past month and finally
> > have time/energy to ask about this ;-)
> >
> > so each time i start emacs or switch org buffers i get a ton of warnings
> on
> > Duplicate ID's:
> >
> ...
> >
> > 2 questions
> >
> > a) does this have any affect on orgmode performance or other effects i
> cant
> > think of?
>
> Breaks MobileOrg, for one.
>
> > b) any intelligent way of resolving this?
>
> Assuming they are all programmatically assigned and not explicitly
> referenced by you anywhere: delete all the IDs. New ones will be
> assigned.
>
>
> --
> Phil Hudson   http://hudson-it.ddns.net
> @UWascalWabbit PGP/GnuPG ID: 0x887DCA63
>


Re: [O] #+BEGIN_html/#+END_html tags not exporting literally to html anymore?

2016-07-22 Thread Charles C. Berry

On Fri, 22 Jul 2016, Adam Aviv wrote:


On Fri, Jul 22, 2016 at 10:17 AM, Eric S Fraga  wrote:




If so, is there a way to make compilation backwards compatible. I have
a lot of old org files that would be a pain to update.  Further, all
the documentation on the org site is also out of date.


a simple regex replace (or two I guess) will fix all in a file?




Better still `org-repair-export-blocks' will fix them.

It can be found in the

: *** New syntax for export blocks

section of ORG-NEWS.



Yes, I agree --- but that's a burden on long time users even if it is a
simple sed script.

I just wonder why the #+BEGIN_HTML was removed in the first place? What
harm was it doing?


As the ORG-NEWS section above notes, it fixes some parsing issues.

And, why was this change made without updating the documentation to 
reflect it?




It is updated. For example, see

(info "(org) Special blocks")
and
(info "(org) results")

and in ORG-NEWS.

Chuck



Re: [O] two basic elisp questions

2016-07-22 Thread Matt Price
On Fri, Jul 22, 2016 at 11:38 AM, Matt Price  wrote:

>
> (2) Is it possible to set the default value for interactive file selection
> to something OTHER than the currect directory of the current buffer?
> Something like:
>
> (let
>   ((base-dir "./Assignment1/"))
>   (org-attach--attach))
>
> I'd like to set different base directories when attaching files to
> subtrees of different first-level trees in a buffer. I guess I would set
> the value for the base directory with a property.
>

OK, I made some progress on this:

(let ((default-directory  (concat default-directory "Assignment1/") ))
(call-interactively 'org-attach-attach))

However, I'd like to do something like:

(let
((parent-basedir nil))
  (save-excursion
(outline-up-heading)
(setq parent-basedir (org-get-entry "BASEDIR")))
  (let
  ((default-directory (concat default-directory parent-basedir) ))
(call-interactively 'org-attach-attach  )))



But there are errors I don't understand in this code. Any hints? Thanks
again!


[O] two basic elisp questions

2016-07-22 Thread Matt Price
(1) can I interactively call an e lisp function like "org-set-property" and
provide a single argument to it even if it expects 2, e.g.:
(call-interactively 'org-set-protertyt (vector "GRADE" ))? (I don't seem to
be able to pass ANY arguments via call-interactively so maybe I
misunderstand something fundamental).

(2) Is it possible to set the default value for interactive file selection
to something OTHER than the currect directory of the current buffer?
Something like:

(let
  ((base-dir "./Assignment1/"))
  (org-attach--attach))

I'd like to set different base directories when attaching files to subtrees
of different first-level trees in a buffer. I guess I would set the value
for the base directory with a property.

thanks!
Matt


Re: [O] issues with duplicate ID's

2016-07-22 Thread Philip Hudson
On 22 July 2016 at 12:58, Xebar Saram  wrote:
> Hi all
>
> i have been having many warnings on Duplicate ID's past month and finally
> have time/energy to ask about this ;-)
>
> so each time i start emacs or switch org buffers i get a ton of warnings on
> Duplicate ID's:
>
...
>
> 2 questions
>
> a) does this have any affect on orgmode performance or other effects i cant
> think of?

Breaks MobileOrg, for one.

> b) any intelligent way of resolving this?

Assuming they are all programmatically assigned and not explicitly
referenced by you anywhere: delete all the IDs. New ones will be
assigned.


-- 
Phil Hudson   http://hudson-it.ddns.net
@UWascalWabbit PGP/GnuPG ID: 0x887DCA63



[O] Unable to resolve link: nil

2016-07-22 Thread Vikas Rawal
Working on long, complex documents, I sometimes have a wrongly pointed link. 
And when I try to export it, I get the error: "Unable to resolve link: nil”. Is 
there a straightforward way to find out which link is not resolving?

Vikas


Re: [O] #+BEGIN_html/#+END_html tags not exporting literally to html anymore?

2016-07-22 Thread Adam Aviv
On Fri, Jul 22, 2016 at 10:17 AM, Eric S Fraga  wrote:

>
> > If so, is there a way to make compilation backwards compatible. I have
> > a lot of old org files that would be a pain to update.  Further, all
> > the documentation on the org site is also out of date.
>
> a simple regex replace (or two I guess) will fix all in a file?


Yes, I agree --- but that's a burden on long time users even if it is a
simple sed script.

I just wonder why the #+BEGIN_HTML was removed in the first place? What
harm was it doing? And, why was this change made without updating the
documentation to reflect it?




-- 
Adam J. Aviv, PhD
*Asst. Professor*
*Computer Science*
*U.S. Naval Academy*
*(410) 293- 6655*


[O] bug#23917: Please consider making Bug #23917 a blocker for 25.1 (was Re: org-capture: Capture template ‘g’: Match data clobbered by buffer modification hooks)

2016-07-22 Thread Robert Pluim
Eli Zaretskii  writes:

>> From: npost...@users.sourceforge.net
>> Cc: 23...@debbugs.gnu.org,  nljlistb...@gmail.com,  jwieg...@gmail.com,  
>> rpl...@gmail.com,  monn...@iro.umontreal.ca,  alex.ben...@linaro.org
>> Date: Thu, 21 Jul 2016 21:08:43 -0400
>> 
>> I made the same adjustments to the saved sub_start and sub_end
>> variables, but I had a mistake in that adjustment which caused the false
>> positives.  Fixed in the attached v2 patch.  We could just drop the
>> check, though I've already found it useful to catch bugs
>> (https://github.com/joaotavora/yasnippet/issues/720).
>> 
>> If I drop the checks (see attached v3 patch), then after following the
>> bug#23869 recipe, I get:
>> 
>> ## -*- Octave -*-
>> -module(bug).
>> -export([identity/1, is_even/1, size/1, reverse/1]).
>
> OK, let's wait for a few days to give time to the people who were
> affected by the issue to test the patch, and if no new issues come up,
> please push the version with the error code to emacs-25.
>

Patch v2 fixes 'emacs -Q' and my normal capture templates, and I'm
using the patched emacs for this email. I'll keep running with it for
the next few days.

Regards

Robert





[O] #+BEGIN_html/#+END_html tags not exporting literally to html anymore?

2016-07-22 Thread Adam Aviv
I just did an update to my org install, and when I recompiled my notes, I
noticed that I was not getting literal exporting for things between a
#+BEGIN_HTML and #+END_HTML tag, however #+HTML: prefix still exports
properly.

Am I to assume that

#+BEGIN_HTML
#+END_HTML

will be completely replaced now with

#+BEGIN_EXPORT html
#+END_HTML

If so, is there a way to make compilation backwards compatible. I have a
lot of old org files that would be a pain to update.  Further, all the
documentation on the org site is also out of date.



-- 
Adam J. Aviv, PhD
*Asst. Professor*
*Computer Science*
*U.S. Naval Academy*
*(410) 293- 6655*


[O] Best practice for canceled/moved recurring events

2016-07-22 Thread SabreWolfy
I have a meeting at 09:00 every Monday:

--8<---cut here---start->8---
* Diary
** TODO Weekly Meeting
   DEADLINE: <2016-07-18 Mon 09:00 +1w>
--8<---cut here---end--->8---

What is the best way of dealing with scenarios where (1) the meeting "next
week" is on the Wednesday and (2) the meeting "two weeks" after that (or
whatever) is canceled?

Should I create a large set of time-shift entries for each week individually
and edit accordingly?




[O] Scaling HTML-exported SVG

2016-07-22 Thread Jarmo Hurri

Greetings.

Does anyone have any idea of how to scale an SVG figure produced by Org
(Asymptote)? The exported HTML is



Sorry, your browser does not support SVG.



and the SVG file begins with





I have tried various approaches in my CSS, but nothing has worked so
far. I have searched online, and scaling SVG files seems to be a mess.

I basically want to scale the SVG file to be, say 80% of viewed
width. My first try was

.figure
{
width: 80vw;
}


After that I have tried maybe 120 other versions, and nothing has worked.

Jarmo




Re: [O] Tuning the layout of published html

2016-07-22 Thread Eric Abrahamsen
Jarmo Hurri  writes:

> Eric Abrahamsen  writes:
>
>> Robert Klein  writes:
>>
>>> Jarmo Hurri  wrote:
>>>
 More specifically, I would like to add, on all pages, a navigation bar
 on the left-hand side and a title bar with no functionality on the top
 of each page.
>>>
>>> You can use the preamble and postamble features for this.
>>
>> [...]
>>
>>> A lot depends on the CSS.  I'm dumping one here, not a very good one...
>>
>> FWIW, this seems like a perfect place to use flexboxes, where the actual
>> location of the elements in the document matters a bit less...
>
> A quick search on flexboxes looks promising indeed. I guess it would be
> possible to open a flexbox div in preamble and close it in
> postamble. Or maybe I can make the body of the page a flexbox in the
> CSS?

Yep, it's all doable from CSS alone. So long as the elements you want to
align are siblings (and can be uniquely selected) that's all you need.




[O] issues with duplicate ID's

2016-07-22 Thread Xebar Saram
Hi all

i have been having many warnings on Duplicate ID's past month and finally
have time/energy to ask about this ;-)

so each time i start emacs or switch org buffers i get a ton of warnings on
Duplicate ID's:

WARNING: 20 duplicate IDs found, check *Messages* buffer

Duplicate ID "9276e354-d04c-43e4-a11e-27d90359b0a4", also in file
/home/zeltak/org/files/archive/TODO.org_archive
Duplicate ID "08e2584a-dc9f-49f9-b0b2-555d407a499b", also in file
/home/zeltak/org/files/archive/TODO.org_archive
Duplicate ID "da41e5f7-b9cf-4cd7-99e2-fad1f7844ab3", also in file
/home/zeltak/org/files/archive/TODO.org_archive
Made readonly! [2 times]
Duplicate ID "62b49339-cd19-4a3c-a6fd-70dd45be4670", also in file
~/org/files/agenda/dl.org
Made readonly! [2 times]
Duplicate ID "ecc84901-e33e-45c2-8da5-fc6876bccc2a", also in file
~/org/files/archive/TODO.org_archive
Made readonly! [2 times]
Duplicate ID "42c7ae56-5843-403a-84d2-8c12e8c4c03f", also in file
/home/zeltak/org/files/agenda/travel.org
Made readonly!
Duplicate ID "52148936-a9d5-4556-b688-e580676b05a7", also in file
/home/zeltak/.emacs.d/settings.org
Duplicate ID "b8969b3e-17d5-4913-95d1-1e68ec8550a8", also in file
/home/zeltak/.emacs.d/settings.org
Duplicate ID "b0e5fed7-b3c2-4c48-9029-be0a56b02b0f", also in file
/home/zeltak/.emacs.d/settings.org
Duplicate ID "b1bd78ae-83b5-4cb4-a4b5-6db5287f3956", also in file
/home/zeltak/.emacs.d/settings.org
Duplicate ID "5d5567f8-9f16-4b76-adb6-8600ce16e2ec", also in file
/home/zeltak/.emacs.d/settings.org
. this goes on and on ;-)

2 questions

a) does this have any affect on orgmode performance or other effects i cant
think of?

b) any intelligent way of resolving this?

best

Z


Re: [O] citations not incoprporated from bib file when exporting from .org to pdflatex

2016-07-22 Thread timor
Hi,

I am actually using the #+BIBLIOGRAPHY: functionality.  I know that
the functionality lies in ox-bibtex.el. I think a (require 'ox-bibtex)
after loading org-mode did the trick.

cheers,
timor

2016-07-01 14:21 GMT+02:00 David Abernethy :
> I eventually stumbled on the solution to my problem:
>
> I restructured my document removing the #+BIBLIOGRAPHY: bib-file style
> statement which no longer seems to work, placing the LateX commands to
> specify the bibliography at the end of the file:
>
> #+LATEX_CLASS: article
> #+LATEX_HEADER: \usepackage[margin=0.5in]{geometry}
> #+LaTeX_CLASS_OPTIONS: [12pt]
>
> * Objectives
> * Stroke care guidelines
>
> #+LATEX: \bibliographystyle{vancouver}
> #+LATEX: \bibliography{stroke}
>
> I have this in .emacs to ensure the triple compilation required:
> (setq org-latex-pdf-process '("latexmk -pdflatex='pdflatex -interaction
> nonstopmode' -pdf -bibtex -f %f”))
>
> I have not been able to find any guidance on how to deal with this change in
> behaviour by org-mode so post this for others to save them the many hours I
> wasted when I have a deadline to meet
>
>
> On 27/06/2016, at 23:20, David Abernethy  wrote:
>
>
> I am exporting a file stroke.org using the bibliography file stroke.bib in
> the same directory
> The citations are not being incorporated into the pdf file
>
> An example from stroke.log: LaTeX Warning: Citation `Drummond:2014aa' on
> page 2 undefined on input line 71.
>
> The header for stroke.org is:
> #+LATEX_CLASS: article
> #+BIBLIOGRAPHY: stroke vancouver option:-d
>
>



Re: [O] Tuning the layout of published html

2016-07-22 Thread Jarmo Hurri
Christian Moe  writes:

> Jarmo Hurri writes:
>
>>> and position the different parts as needed with CSS.
>>
>> This is where I don't know what exactly is going to happen. Org writes
>> quite a bit of CSS in each exported HTML file. If I add in, say, a
>> vertical navigation bar, how am I going to control its placement with
>> respect to everything else that is already in the CSS?
>
> Say you put the navbar at the end of the HTML preamble and give it a
> #navbar id (). Org already gives the main content a
> #content id. Then this should be all the CSS you need to get started:
>
> #navbar { float: left;
>   ...loads more CSS here...
>   }
> #content { float: left;
>...and more CSS here...
>}

Yes indeed, something like this seems to work.

For anyone embarking on a similar trip, a tight placement of the
horizontal title bar on top of the page requires, among other things,
something along the following lines in your CSS:

body
{
margin: 0;
}

All the best,

Jarmo




Re: [O] Tuning the layout of published html

2016-07-22 Thread Jarmo Hurri

Eric Abrahamsen  writes:

> Robert Klein  writes:
>
>> Jarmo Hurri  wrote:
>>
>>> More specifically, I would like to add, on all pages, a navigation bar
>>> on the left-hand side and a title bar with no functionality on the top
>>> of each page.
>>
>> You can use the preamble and postamble features for this.
>
> [...]
>
>> A lot depends on the CSS.  I'm dumping one here, not a very good one...
>
> FWIW, this seems like a perfect place to use flexboxes, where the actual
> location of the elements in the document matters a bit less...

A quick search on flexboxes looks promising indeed. I guess it would be
possible to open a flexbox div in preamble and close it in
postamble. Or maybe I can make the body of the page a flexbox in the
CSS?

Jarmo




[O] bug#23917: Please consider making Bug #23917 a blocker for 25.1 (was Re: org-capture: Capture template ‘g’: Match data clobbered by buffer modification hooks)

2016-07-22 Thread Eli Zaretskii
> From: npost...@users.sourceforge.net
> Cc: 23...@debbugs.gnu.org,  nljlistb...@gmail.com,  jwieg...@gmail.com,  
> rpl...@gmail.com,  monn...@iro.umontreal.ca,  alex.ben...@linaro.org
> Date: Thu, 21 Jul 2016 21:08:43 -0400
> 
> I made the same adjustments to the saved sub_start and sub_end
> variables, but I had a mistake in that adjustment which caused the false
> positives.  Fixed in the attached v2 patch.  We could just drop the
> check, though I've already found it useful to catch bugs
> (https://github.com/joaotavora/yasnippet/issues/720).
> 
> If I drop the checks (see attached v3 patch), then after following the
> bug#23869 recipe, I get:
> 
> ## -*- Octave -*-
> -module(bug).
> -export([identity/1, is_even/1, size/1, reverse/1]).

OK, let's wait for a few days to give time to the people who were
affected by the issue to test the patch, and if no new issues come up,
please push the version with the error code to emacs-25.

Thanks.