Re: How to evaluate source code while in the edit buffer?

2020-12-04 Thread Mirko Vukovic
On Fri, Dec 4, 2020 at 12:41 PM Pankaj Jangid 
wrote:

> Mirko Vukovic  writes:
>
> > My current workflow is
> >
> >1. Enter edit buffer (C-c ')
> >2. Perform edits in the window
> >3. Exit edit mode (C-c ')
> >4. Evaluate code (C-c C-c)
> >5. Monitor changes to resulting png file
> >
> > I would prefer instead to skip step 3, and evaluate the code from within
> > the edit mode.
> >
> > Is it possible to execute code from the edit buffer?
>
> 1. When I enter the edit mode (C-c ') it connects to plantuml server
> (that I don't like), and produces the error that you have specified:
> "Wrong type argument: stringp, nil".
>
> 2. Pressing C-c C-c in the edit buffer opens up plantuml preview but it
> gives some error: "The plugin you are using seems to generate a bad
> URL".
>
> I am on Emacs 28.x and default org 9.3.
>

So I tried C-c C-c and got the same response as Pankaj.

I traced the code to understand better and saw that plant-uml-exec-mode can
have settings of server and jar

With the jar setting (and after pointing a few variables to the jar file),
I am getting a different error:

error in process sentinel: PLANTUML Preview failed: exited abnormally with
code 1

The plantuml.el code seems to

   1. start a process and then
   2. pass the plantuml string to the process.

It is at step 2 that the error is issued.

Mirko


How to evaluate source code while in the edit buffer?

2020-12-04 Thread Mirko Vukovic
Hello,

Creating/editing UML diagrams using plantuml mode is an iterative process.
My current workflow is

   1. Enter edit buffer (C-c ')
   2. Perform edits in the window
   3. Exit edit mode (C-c ')
   4. Evaluate code (C-c C-c)
   5. Monitor changes to resulting png file

I would prefer instead to skip step 3, and evaluate the code from within
the edit mode. I tried evaluating org-babel-execute-src-block from the edit
buffer, but that resulted in an error:
helm-M-x-execute-command: Wrong type argument: consp, nil

Is it possible to execute code from the edit buffer?

Thank you,

Mirko


Re: Babel->Latex export: how to set includegraphics scale?

2020-10-26 Thread Mirko Vukovic
On Fri, Oct 23, 2020 at 2:12 PM Mirko Vukovic 
wrote:

>
> On Thu, Oct 22, 2020 at 2:41 PM TEC  wrote:
>
>>
>> Hi Mirko
>>
>> Mirko Vukovic  writes:
>>
>> > Instead specifying the width, I'd like to use the parameter
>> > \scale.
>>
>> Have you tried #+attr_latex: :scale SCALE ?
>>
>>
> Your email triggered me to pay attention to settings of latex export, and
> not orb-babel.
> I found org-latex-default-image-scale customizable variable.
>
> I need to figure out how to set it in the file itself in the header.
>
> But at least for now, I set it in the Emacs' session and I get the desired
> result.
>

I solved my problem by placing #+attr_latex: scale scale just before the
#results like so:
#+begin_src ...
...
#+end_src
#+attr_latex: :width 1.0\linewidth
#+RESULTS:
...

Thanks,

Mirko

>


Re: Babel->Latex export: how to set includegraphics scale?

2020-10-23 Thread Mirko Vukovic
On Thu, Oct 22, 2020 at 2:41 PM TEC  wrote:

>
> Hi Mirko
>
> Mirko Vukovic  writes:
>
> > Instead specifying the width, I'd like to use the parameter
> > \scale.
>
> Have you tried #+attr_latex: :scale SCALE ?
>
>
Your email triggered me to pay attention to settings of latex export, and
not orb-babel.
I found org-latex-default-image-scale customizable variable.

I need to figure out how to set it in the file itself in the header.

But at least for now, I set it in the Emacs' session and I get the desired
result.



> Not sure how you'd put this in a header though I'm afraid - you'll
> likely want to change a variable or add an export filter.
>
> Hope something there may be of use,
> Timothy.
>

Thanks,

Mirko


Babel->Latex export: how to set includegraphics scale?

2020-10-22 Thread Mirko Vukovic
Hello,

I use Babel to create UML diagrams using plantUML. The codeblocks produce
png files.

When exported to LaTeX, the png files are imported using \includegraphics.
The width is set to 0.9\linewidth

Instead specifying the width, I'd like to use the parameter \scale.

Ideally, I would set \scale in the document header, possibly over-riding
the setting when necessary.

Is this possible, and if so, can you point me to the documentation? I could
not find any.

Thank you,

Mirko


How to occasionally store link as file.org+headline

2020-02-14 Thread Mirko Vukovic
Hello,

For most of my links, I want to use the ID generated by orgmode
i.e., (setq org-id-link-to-org-use-id t)

But occasionally, for targets that are not part of my agenda files, I want
to store a link of the type file:path.org::*headline

I wrote the following function to accomplish that:

(defun org-store-file+headline ()
  "Store link as file + headline"
  (interactive)
  (let ((org-id-link-to-org-use-id nil))
(org-store-link nil t)))

This function works (lightly tested).

But is there a built-in way, such as using prefixes or arguments to
org-store-link? I browsed the code for it, but that function is several
hundred lines long, and I gave up.

Thank you,

Mirko


[O] How to generate a list of ``who-links''?

2018-10-14 Thread Mirko Vukovic
Hello,

I am looking for a way to get a list of all remote references to the
current node?

Currently, I do:
- org-id-copy
- In org-agenda I search the copied id.

Is there
- a better built-in way?
- a contributed-package?
- a suggestion how to code it in my elisp?

Thanks,

Mirko


[O] How to log changes to orgmode files?

2017-11-29 Thread Mirko Vukovic
Hello,

I am writing a report in org-mode (with pdf export).  The file is under git
version control.  I would like to log changes I make to the document.

When I invoke ChangeLog, it is pre-populated with the file name only.
There is no finer information about the location of the modification.  For
instance, I would like to use the tree heading name or ID.

Is there a standard way of logging changes?

Thanks,

Mirko


[O] Bug: bug&fix for org-compile-file on Windows

2016-12-11 Thread Mirko Vukovic
To: emacs-orgmode@gnu.org
Subject: Bug: bug&fix for org-compile-file on Windows [9.0.1
(release_9.0.1-8-g25a97f.dirty @ c:/Users/977315/.emacs.d/elisp/org/)]
From: Mirko Vukovic 
--text follows this line--

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.


I was not able to preview latex fragments using
org-toggle-latex-fragment (C-c C-x C-l)

I traced the problem to the (shell-command ...) in org-compile-file
during the dvipng step.

The problem was in the formatting of the destination file (the -o switch).
It consists
of the directory and filename.  Both were enclosed in double quotes, so
that when concatenated the string looked like this:
\"path\"\"filename\".extension

By trial and error in the scratch buffer I was able to confirm that
removing the double \" fixed the problem.

A quick and dirty fix was to post-process the string to remove the
duplicate quoted double quote like so:

(shell-command (replace-regexp-in-string "\"\"" ""
(format-spec command spec)) log-buf)

An elisp wizard will undoubdetly be able to create a more robust solution.


Emacs  : GNU Emacs 24.5.1 (i686-pc-mingw32)
 of 2015-04-11 on LEG570
Package: Org mode version 9.0.1 (release_9.0.1-8-g25a97f.dirty @
c:/Users/977315/.emacs.d/elisp/org/)

current state:
==
(setq
 org-latex-format-headline-function
'org-latex-format-headline-default-function
 org-pretty-entities t
 org-html-format-inlinetask-function
'org-html-format-inlinetask-default-function
 org-agenda-skip-scheduled-if-done t
 org-tab-first-hook '(org-babel-hide-result-toggle-maybe
org-babel-header-arg-expand)
 org-link-parameters '(("rmail" :follow org-rmail-open :store
org-rmail-store-link)
  ("mhe" :follow org-mhe-open :store org-mhe-store-link)
  ("irc" :follow org-irc-visit :store org-irc-store-link)
  ("info" :follow org-info-open :export org-info-export :store
org-info-store-link)
  ("gnus" :follow org-gnus-open :store org-gnus-store-link)
  ("docview" :follow org-docview-open :export org-docview-export
:store org-docview-store-link)
  ("bibtex" :follow org-bibtex-open :store org-bibtex-store-link)
  ("bbdb" :follow org-bbdb-open :export org-bbdb-export :complete
org-bbdb-complete-link :store org-bbdb-store-link)
  ("w3m" :store org-w3m-store-link) ("id" :follow org-id-open) ...)
 org-archive-hook '(org-attach-archive-delete-maybe)
 org-id-method 'org
 org-refile-targets '(...)
 org-preview-latex-process-alist '((dvipng :programs ("latex" "dvipng")
:description
   "dvi > png" :message
   "you need to install the programs: latex and dvipng."
   :image-input-type "dvi" :image-output-type ...)
  (dvisvgm :programs ("latex" "dvisvgm") :description
   "dvi > svg" :post-clean (quote (\.tex \.aux))
   :message
   "you need to install the programs: latex and dvisvgm." :use-xcolor ...)
  (imagemagick :programs ("latex" "convert")
   :description "pdf > png" :message
   "you need to install the programs: latex and imagemagick." :use-xcolor t
:image-input-type ...)
  )
 org-modules '(org-habit org-w3m org-bbdb org-bibtex org-docview org-gnus
org-info
  org-irc org-mhe org-rmail)
 org-cycle-hook '(org-inlinetask-hide-tasks org-cycle-hide-archived-subtrees
 org-cycle-hide-drawers org-cycle-show-empty-lines
 org-optimize-window-after-visibility-change)
 org-agenda-custom-commands '(("1" "Q1" tags-todo "+important+urgent")
 ("2" "Q2" tags-todo "+important-urgent")
 ("3" "Q3" tags-todo "-important+urgent")
 ("4" "Q3" tags-todo "-important-urgent"))
 org-agenda-before-write-hook '(org-agenda-add-entry-text)
 org-speed-command-hook '(org-speed-command-default-hook
org-babel-speed-command-hook)
 org-ascii-format-inlinetask-function 'org-ascii-format-inlinetask-default
 org-blocker-hook '(org-block-todo-from-children-or-siblings-or-parent
   org-depend-block-todo)
 org-babel-pre-tangle-hook '(save-buffer)
 org-return-follows-link t
 org-occur-hook '(org-first-headline-recenter)
 org-font-lock-hook '(org-inlinetask-fontify)
 org-link-file-path-type 'relative
 org-trigger-hook '(org-depend-trigger-todo)
 org-html-format-headline-function
'org-html-format-headline-default-function
 org-structure-template-alist '(("b" &qu

Re: [O] org copied a few files to ~/.org-timestamps

2016-06-15 Thread Mirko Vukovic
Mirko Vukovic  gmail.com> writes:

> 
> Hello,
> 
> (org 8.3.4 on Emacs 24.4.1 on Windows 7)
> 
> Some of my org-files are ending up in ~/.org-timestamps.
> 
> For example, the file ~/org/general.org also has a copy on ~/.org-
> timestamps.  This copy was generated a few days ago.
> 
> Any thoughts on why that would happen?
> 
> Thanks,
> 
> Mirko
> 
> 
I did a bit of digging:

Only files that reside in ~/org and that are loaded via the agenda are 
then reassigned to the ~/.org-timestamps directory.  If I manually load 
the file, then it is not reassigned to that directory.

I used this code snippet to identify them:
  (save-excursion
(let (matches)
  (dolist (buffer (buffer-list))
(let ((file-name (buffer-file-name buffer)))
  (when (and file-name
 (string-match "org-timestamps" file-name))
(push file-name matches
  (reverse matches)))

Mirko






[O] org copied a few files to ~/.org-timestamps

2016-06-15 Thread Mirko Vukovic
Hello,

(org 8.3.4 on Emacs 24.4.1 on Windows 7)

Some of my org-files are ending up in ~/.org-timestamps.

For example, the file ~/org/general.org also has a copy on ~/.org-
timestamps.  This copy was generated a few days ago.

Any thoughts on why that would happen?

Thanks,

Mirko






[O] easy way to link to file in attachment directory?

2014-09-04 Thread Mirko Vukovic
Hello,

Is there a way to insert a link to a file in the attachment directory?

Currently, I open the attachment directory in emacs and copy the full path.
then in the document I create the link using org-insert-link (C-u C-c C-l).

Thanks,

Mirko




Re: [O] bug in org-store-link? (was bug in org-create-link)

2014-03-13 Thread Mirko Vukovic
Yep, I saw that when I updated git recently.

Thanks :-)


On Thu, Mar 13, 2014 at 11:28 AM, Bastien  wrote:

> mirko  writes:
>
> > I wrote the incorrect function name.  This is about org-store-link in
> > org.el, not org-create-link.
>
> This should be fixed now, thanks for reporting this.
>
> --
>  Bastien
>


Re: [O] how to customize date export

2014-02-03 Thread Mirko Vukovic
Eric S Fraga  ucl.ac.uk> writes:

> 
> Mirko Vukovic  gmail.com> writes:
> 
> > Hello,
> >
> > I could not figure out how to customize org's export of dates into latex.
> >
> > I found org-export-date-timestamp-format, but that works only for the DATE
> > keyword.  
> >
> > What can work on all date-stamps in the document?
> 
> Have a look at
> 
> ,[ C-h v org-latex-active-timestamp-format RET ]
> | org-latex-active-timestamp-format is a variable defined in `ox-latex.el'.
> | Its value is "\\textit{%s}"
snip
> 
> and 
> 
> ,[ C-h v org-latex-inactive-timestamp-format RET ]
> | org-latex-inactive-timestamp-format is a variable defined in `ox-latex.el'.
> | Its value is "\\textit{%s}"
snip
> but these are quite different in intent when compared with
> org-export-date-timestamp-format so they may not be what you want.
> 

Hi Eric,

Thanks for the note.  As it stands now, I cannot
customize these two variables to do what I want, as they accept the
whole time-steamp as argument.  I will enter the dates manually
in the org file for now.

Maybe they ought to be re-cast in manner similar to which
org-export-date-timestamp-format is handled?  A nice weekend project :-)

Mirko




[O] how to customize date export

2014-01-31 Thread Mirko Vukovic
Hello,

I could not figure out how to customize org's export of dates into latex.

I found org-export-date-timestamp-format, but that works only for the DATE
keyword.  

What can work on all date-stamps in the document?

Thanks,

Mirko




[O] bad link in FAQ

2014-01-30 Thread Mirko Vukovic
I found a bad link on http://orgmode.org/worg/org-faq.html

The link ``skeletons'' points to an article on Nokia's phones on slashgear.com

A better link would be: http://www.emacswiki.org/emacs/SkeletonMode

Mirko




Re: [O] Bug: documentation typo for org-format-latex-options [8.2.5 (release_8.2.5-417-g455fbc @ c:/users/977315/documents/.emacs.d/elisp/org/)]

2014-01-18 Thread Mirko Vukovic
On Sat, Jan 18, 2014 at 10:20 AM, Nicolas Goaziou wrote:

> Hello,
>
> Mirko Vukovic  writes:
>
> > In the documentation for org-format-latex-options,
> > for the key :matchers, the documentation lists valid members.  The last
> > valid member is shown as
> >  "\ ["find math expressions surrounded by \ [...\]
> >
> > (backslash space left-bracket).  The space is superfluous.  Note that
> > there are two places where this needs to be fixed.
>
> Thank you for the report. However, I don't think it is possible to fix
> it, because "\[" in a docstring is treated specially. See:
>
>   (info "(elisp) Keys in Documentation").
>
>
> Regards,
>
> --
> Nicolas Goaziou
>
Thanks Nicolas,

that certainly explains two identical and unusual typos on the same line.

Mirko


[O] Bug: documentation typo for org-format-latex-options [8.2.5 (release_8.2.5-417-g455fbc @ c:/users/977315/documents/.emacs.d/elisp/org/)]

2014-01-18 Thread Mirko Vukovic
In the documentation for org-format-latex-options,
for the key :matchers, the documentation lists valid members.  The last
valid member is shown as
 "\ ["find math expressions surrounded by \ [...\]

(backslash space left-bracket).  The space is superfluous.  Note that
there are two places where this needs to be fixed.

Emacs  : GNU Emacs 24.3.1 (i386-mingw-nt6.1.7601)
 of 2013-03-17 on MARVIN
Package: Org-mode version 8.2.5 (release_8.2.5-417-g455fbc @
c:/users/977315/documents/.emacs.d/elisp/org/)


[O] preview beamer frame in org/beamer

2013-12-14 Thread Mirko Vukovic
Is there a command to generate a pdf output of a single beamer frame?

The command would generate the latex file with the correct header, and a
single frame, and process it into a pdf file.

Thanks,

Mirko




[O] turn of org-pretty-entities in tables

2013-07-09 Thread Mirko Vukovic
Hello,

Is it possible to turn of org-pretty-entities in a table, but leaving it
enabled in the buffer?

Thank you,

Mirko




[O] Is it possible to see the blocking task?

2012-12-11 Thread Mirko Vukovic
Hello,

I am using TODO dependencies for a project.  I find some tasks are blocked
for no apparent reason  (this is after multiple editing of the file, and
setting and unsetting of the ORDERED property).  I know that I can
over-ride task blocking by a triple C-u.

I'd like to see the blocking task in order to "debug" my setup.  Is there a
way to see that?

Thanks,

Mirko


Re: [O] latex to org converter

2012-04-11 Thread Mirko Vukovic
Charles Philip Chan  bell.net> writes:

> 
> Marvin Doyley  gmail.com> writes:
> 
> > Does anybody has a script that convert latex files to org mode ?
> >
> > I wrote one in Matlab, but it is a little clunky - I wrote it in matlab
> > because I am still learning lisp
> 
> Not exactly a script, but I highly recommend Pandoc[1]. There is also
> pandoc-mode[2], which is an Emacs frontend to Pandoc.
> 
> Footnotes: 
> [1] http://johnmacfarlane.net/pandoc/ 
> 
> [2] http://wwwuser.gwdg.de/~jkremer/pandoc-mode.html 
> 


I always thought that TeX/LaTeX would be the perfect engine for that.  It
already understands the markup.  ``Only'' the output format would need to be
written.

Maybe with LuaTeX such a task can be made easier.   

Disclamer: I've never done any deep TeX/LaTeX/Lua coding.

Mirko




Re: [O] buffer-local org-agenda-files & embedded agenda-view

2012-04-06 Thread Mirko Vukovic
On Fri, Apr 6, 2012 at 3:44 AM, Bastien  wrote:

> Hi Mirko,
>
> Mirko Vukovic  writes:
>
> > Did you mean `org-agenda-list'?
>
> No, I meant `org-agenda-listing' -- which doesn't exist right now,
> and which purpose would be to store all agendas views interactively
> displayed in a session.  Maybe just science fiction right now but
> who knows?
>
> --
>  Bastien
>
Ah!

:-)


Re: [O] buffer-local org-agenda-files & embedded agenda-view

2012-04-05 Thread Mirko Vukovic
On Tue, Apr 3, 2012 at 1:55 AM, Bastien  wrote:

> Hi Mirko,
>
> Mirko Vukovic  writes:
>
> > I would like to have a buffer (and the associated file) that contain the
> agenda
> > view for a few select files.  Is that possible?
> >
> > They way it might work (in pseudo-code & using babel)
> >
> > < begin org file
> > #+org-agenda-files: file-1.org file-2.org file-3.org ;; these are full
> files
> >
> >
> > #+begin local-agenda-view
> > TODO: file-1
> > IN-PROGRESS: file-2
> > COMPLETE: file-3
> > #+end local-agenda-view
> >
> > < end org file
>
> Agenda views rely on two things: a list of selected items, a display
> mechanism for these items in a dedicated buffer (either one single
> buffer, or several buffers when using sticky agenda views.)
>
> What you're asking for would be possible if the list of items were
> stored somewhere else than in a dedicated buffer -- which is not the
> case right now (see also my recent reply to Manuel.)
>
> > So, when visiting the above file, or executing C-c C-c, the
> org-agenda-files
> > would be refreshed, as would be the local-agenda-view block.  In this
> example,
> > the agenda-view is non-standard.
> >
> > So, is the following possible
> > - buffer local agenda-files that are set in the declarations
> > - embedded agenda view
> > - view customized as shown above
> >
> > If that is not possible, what variables & functions would I need to
> > look at?
>
> You can try to digg the idea of `org-agenda-listing' further.
>
> Good luck!
>
> --
>  Bastien
>

Thanks Bastien,

Did you mean `org-agenda-list'?

Mirko


[O] buffer-local org-agenda-files & embedded agenda-view

2012-04-02 Thread Mirko Vukovic
Hello,

I would like to have a buffer (and the associated file) that contain the agenda
view for a few select files.  Is that possible?

They way it might work (in pseudo-code & using babel)

< begin org file
#+org-agenda-files: file-1.org file-2.org file-3.org ;; these are full files


#+begin local-agenda-view
TODO: file-1
IN-PROGRESS: file-2
COMPLETE: file-3
#+end local-agenda-view

< end org file

So, when visiting the above file, or executing C-c C-c, the org-agenda-files
would be refreshed, as would be the local-agenda-view block.  In this example,
the agenda-view is non-standard.

So, is the following possible
- buffer local agenda-files that are set in the declarations
- embedded agenda view
- view customized as shown above

If that is not possible, what variables & functions would I need to look at?

Thank you,

Mirko




Re: [O] suggestion for the manual: mention the "#+BEGIN_SRC org" trick when describing drawers and plainlists

2012-03-10 Thread Mirko Vukovic
On Sat, Mar 10, 2012 at 2:00 PM, suvayu ali  wrote:
> On Sat, Mar 10, 2012 at 16:01, Mirko Vukovic  wrote:
>> But using BEGIN/END_SRC is really a hack.  I wonder if instead of using SRC
>> blocks, we could define (with some amount of coding) a more suitable kind of
>> blocks.  In my case I would like to have a BEGIN/END_TODO block.  This would
>> permit a layout such as
>
> We have inline tasks for that.
>
> About supporting non-tree-like structures in org files, this has been
> discussed before. You can look up sometime towards the end of last
> year in the archives to see the arguments in favour and against the
> feature.
>
> --
> Suvayu

Thank you.  I was not aware of the inline tasks capability

Mirko



Re: [O] suggestion for the manual: mention the "#+BEGIN_SRC org" trick when describing drawers and plainlists

2012-03-10 Thread Mirko Vukovic
Ilya Shlyakhter  alum.mit.edu> writes:

> 
> In Org, entry text can't have substructure (other than drawers and plain
lists): you can't have an entry thathas some text, then a subtree, then more
text.I just (re-)discovered that you can get around that by using "#+BEGIN_SRC
org" to include arbitrary org
> subtrees in the middle of entry text.   That's useful not just when writing in
Org about Org, but anytime you wantto insert an extended sidenote in the middle
of an entry.  As with all source blocks, you edit it in its native (Org)
> mode and it exports correctly.  You can copy links from the main Org and past
them into the nested Org.Just wish I'd learned this sooner :)  So, maybe mention
this in the manual in the sections on drawers and plainlists.ilya

Thank you for the pointer.  I am sometimes also frustrated by that feature.

But using BEGIN/END_SRC is really a hack.  I wonder if instead of using SRC
blocks, we could define (with some amount of coding) a more suitable kind of
blocks.  In my case I would like to have a BEGIN/END_TODO block.  This would
permit a layout such as

* header 1
  text, more text, much more text under header

#+begin_todo
** TODO task

** TODO another task
#+end_todo

  still more text under header 1


Maybe the TODO block is to specific.  Maybe a SUBTREE block would be sufficient.
Though, I am not sure if this would conflict with some major undrlying structure
of orgmode.

Mirko




Re: [O] odt-export fails

2012-02-25 Thread Mirko Vukovic
The problem was fixed by changing temporary-file-directory from

"c:\Users\...\AppData\Local\Temp" to "~/temp/"

I am running windows 7.  The environment variables TEMP & TMP both
point to c:\Users\...\AppData\Local\Temp.

I guess that zip/unzip were running in the ~/temp directory, while the
files were stored in the
...\AppData\Local\Temp one.


Thanks for your help.

Mirko


On Sat, Feb 25, 2012 at 12:35 PM, Jambunathan K  wrote:
> Jambunathan K  writes:
>
>>         (setq temporary-file-directory "~/tmp/")
>
> You can see how it is set on my Windows XP machine. Basically it some
> directory under my "My Documents" path.
>
> I never had any problems with this setup.
>
> ,[ C-h v temporary-file-directory RET ]
> | temporary-file-directory is a variable defined in `C source code'.
> | Its value is "~/tmp/"
> | Original value was
> | "c:/DOCUME~1/KJAMBU~1/LOCALS~1/Temp/"
> |
> | Documentation:
> | The directory for writing temporary files.
> |
> | You can customize this variable.
> |
> | [back]
> `
>
> #+begin_src emacs-lisp
>  (expand-file-name "~/tmp")
> #+end_src
>
> #+RESULTS:
> : c:/Documents and Settings/kjambunathan/My Documents/My Data/tmp
> --



Re: [O] odt-export fails

2012-02-25 Thread Mirko Vukovic
Hello Jambunathan,

I do not have the odt document open.

>From the *Message* buffer, it seems that zip is looking for the odt file in
c:\Users\...\AppData\Temp\..., but the file is not present

In the org-odt-save-as-outfile let* block from which the error is thrown
(let* ((target-name)
        (target ...)
        ...)
zip-commands)

zip-commands are looking for the *.odt file to zip together with the
mimetype file.  But the *.odt file
is not there.

The only thing that is there is the content.xml, that contains the
the *.org file's text.  In fact, in the code, I don't see anything being
done with the xml files.  They are created, and then killed.

I am including the trace from the *Messages* buffer.
 Trace begin
Export buffer:
Exporting to ODT using org-lparse...
Using vacuous schema
LaTeX to MathML converter not available. Using dvipng instead.
Exporting...
Using vacuous schema
ODT export done, pushed to kill ring and clipboard
Wrote c:/Users/977315/AppData/Local/Temp/odt-7628lrW/meta.xml
Using vacuous schema
Saving file c:/Users/977315/AppData/Local/Temp/odt-7628lrW/styles.xml...
Wrote c:/Users/977315/AppData/Local/Temp/odt-7628lrW/styles.xml
Wrote c:/Users/977315/AppData/Local/Temp/odt-7628lrW/mimetype
Using vacuous schema
Switching to directory c:/Users/977315/AppData/Local/Temp/odt-7628lrW/
Saving file c:/Users/977315/AppData/Local/Temp/odt-7628lrW/styles.xml...
Wrote c:/Users/977315/AppData/Local/Temp/odt-7628lrW/styles.xml
(No changes need to be saved)
Saving file 
c:/Users/977315/AppData/Local/Temp/odt-7628lrW/META-INF/manifest.xml...
Wrote c:/Users/977315/AppData/Local/Temp/odt-7628lrW/META-INF/manifest.xml
Saving file c:/Users/977315/AppData/Local/Temp/odt-7628lrW/content.xml...
Wrote c:/Users/977315/AppData/Local/Temp/odt-7628lrW/content.xml
Using vacuous schema
(No changes need to be saved)
Creating odt file...
Running zip -mX0 org-odt-export.odt mimetype
zip warning: name not matched: mimetype

zip error: Nothing to do! (org-odt-export.odt)

Entering debugger...
Back to top level.
 Trace end

Mirko

On Sat, Feb 25, 2012 at 8:28 AM, Jambunathan K  wrote:
>
> The backtrace is along the expected lines. The zip command is failing
> for some reason.
>
> Did you look at the *Messages* buffer? It is likely to give some clue on
> why the zip command is failing.
>
> Btw, if you have "cvd-modeling-proposal.odt" already open in an external
> application like LibreOffice, you may want to close the file first,
> before exporting. Closing the file will ensure that the file is not
> locked and available for re-writing.
>
>> Hello:
>>
>> This is on Windows 7 Emacs 23.3.1, org-version 7.8.03.  (I installed
>> org-mode inside cygwin's shell).
>>
>> Here is the backtrace:
>>
>> Debugger entered--Lisp error: (error "Unable to create odt file (12)")
>>   signal(error ("Unable to create odt file (12)"))
>>   error("Unable to create odt file (%S)" 12)
>>   (or (zerop exitcode) (ignore (message "%s" err-string)) (error
>> "Unable to create odt file (%S)" exitcode))
>>   (lambda (cmd) ... stuff deleted
>>   
>> org-odt-save-as-outfile("c:/Users/977315/Documents/projects/low-pressure-flow/workbooks/shh+cvd-design-tool-proposal/cvd-modeling-proposal.odt"
>> ... more stuff deleted ...
>>   org-do-lparse(nil nil nil nil nil nil)
>>   org-lparse("odt" "odt" nil nil nil nil nil nil)
>>   org-export-as-odt(nil)
>>   call-interactively(org-export-as-odt)
>>   org-export(nil)
>>   call-interactively(org-export nil nil)
>>
>> The backtrace refers to a a non-existent odt file (see call to
>> org-odt-save-as-outfile).  Does the call stack look ok to you?
>>
>> Thanks,
>>
>> Mirko
>>
>>
>
> --



[O] odt-export fails

2012-02-24 Thread Mirko Vukovic
Hello:

This is on Windows 7 Emacs 23.3.1, org-version 7.8.03.  (I installed
org-mode inside cygwin's shell).

Here is the backtrace:

Debugger entered--Lisp error: (error "Unable to create odt file (12)")
  signal(error ("Unable to create odt file (12)"))
  error("Unable to create odt file (%S)" 12)
  (or (zerop exitcode) (ignore (message "%s" err-string)) (error
"Unable to create odt file (%S)" exitcode))
  (lambda (cmd) ... stuff deleted
  
org-odt-save-as-outfile("c:/Users/977315/Documents/projects/low-pressure-flow/workbooks/shh+cvd-design-tool-proposal/cvd-modeling-proposal.odt"
... more stuff deleted ...
  org-do-lparse(nil nil nil nil nil nil)
  org-lparse("odt" "odt" nil nil nil nil nil nil)
  org-export-as-odt(nil)
  call-interactively(org-export-as-odt)
  org-export(nil)
  call-interactively(org-export nil nil)

The backtrace refers to a a non-existent odt file (see call to
org-odt-save-as-outfile).  Does the call stack look ok to you?

Thanks,

Mirko