Jarmo Hurri | 23 Jul 14:53 2016
Picon
Picon

Request: change SVG embedding in exported HTML


Greetings.

Request: An SVG file embedded in exported HTML should be embedded using
the <img> tag instead of <object>.

Short reasoning: The displayed size of the SVG image can not be
controlled from outside the SVG file when embedded using <object>, but
size can be controlled when embedded using <img>.

Here is the longer explanation.

The HTML exporter currently embeds SVG as an object. Here is an example
of the HTML produced by the exporter:

<div class="figure">
<p><object type="image/svg+xml" data="kolmio-nelio.svg" >
Sorry, your browser does not support SVG.</object>
</p>
</div>

I have in the past couple of days found out that there is a serious
disadvantage to this: the displayed size of the resulting web page image
can not be controlled in any reasonable manner; see, for example

https://css-tricks.com/scale-svg/

However, the size _can_ be controlled if embedding is done with an
<img>. For example, the exported code above could be

(Continue reading)

Jarmo Hurri | 23 Jul 14:14 2016
Picon
Picon

Babel CALL no longer produces HTML output


Greetings.

The Org example below used to work correctly when exported as HTML until
I pulled a newer version of Org from git. I am first going to include
the example here, and then explain the reasoning behind its structure.

=======================================================================
* Example

  This call here produced HTML output when exported as HTML until the
  newer versions of Org. Now it produces no HTML output whatsoever.

  #+CALL: rekursio-pystyviivat[:noweb yes]() :results html

  The following code blocks still work as expected.

  #+NAME: rekursio-pystyviivat-runko
  #+BEGIN_SRC processing :exports none
    if (viivoja == 0)
    return;

    line (x, 0, x, korkeus);
    piirraPystyviivat (viivoja - 1, x + 10, 0.9 * korkeus);
  #+END_SRC

  #+NAME: rekursio-pystyviivat
  #+BEGIN_SRC processing :exports code :noweb no
    void piirraPystyviivat (int viivoja, float x, float korkeus)
    {
(Continue reading)

Eric S Fraga | 22 Jul 16:17 2016
Picon
Picon
Gravatar

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

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

Bernard Hurley | 23 Jul 02:55 2016
Gravatar

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

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:<name> 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)))))
(Continue reading)

grewil3 . | 22 Jul 23:11 2016
Picon

automatically run code blocks when loading an org-mode document

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

Matt Price | 22 Jul 17:38 2016
Picon

two basic elisp questions

(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
Vikas Rawal | 22 Jul 17:19 2016

Unable to resolve link: nil

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

Adam Aviv | 22 Jul 15:46 2016

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

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
SabreWolfy | 22 Jul 15:29 2016
Picon
Gravatar

Best practice for canceled/moved recurring events

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?

Jarmo Hurri | 22 Jul 15:10 2016
Picon
Picon

Scaling HTML-exported SVG


Greetings.

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

<div class="figure">
<p><object type="image/svg+xml" data="pisteita-koordinaatistossa.svg" >
Sorry, your browser does not support SVG.</object>
</p>
</div>

and the SVG file begins with

<?xml version='1.0'?>
<!-- This file was generated by dvisvgm 1.9.2 -->
<svg height='363.616pt' version='1.1' viewBox='56.6209 54.0603 602.25 363.616' width='602.25pt'
xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink'>

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

Xebar Saram | 22 Jul 13:58 2016
Picon

issues with duplicate ID's

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


Gmane