Re: [O] Portable formatting of export?

2013-10-22 Thread Klaus-Dieter Bauer
There are several problems with this approach:

1. In order to force default behaviour, I'd have to set ALL customization
variables of org explicitly (can be avoided by using an emacs -q session
for compiling).
2. Even setting just a single setting can be very verbose (e.g. when
defining a new document class).
3. The variables are not flagged as safe for use as file-local variables,
requiring extra user-interaction whenever the file is visited.

Sure, those are all mere convenience issues, but they add up to enough
potential inconvenience for cooperative authoring (i.e. the file being
edited in different emacs configurations by different people) to make
direct latex editing rather attractive.

Is that scenario simply outside the scope of org-mode?

- Klaus-Dieter Bauer



2013/10/21 Eric Schulte schulte.e...@gmail.com

 This can be done with file local variables.  See the following page of
 the Emacs manual.

   (info (emacs)Specifying File Variables)

 Klaus-Dieter Bauer bauer.klaus.die...@gmail.com writes:

  Hello!
 
  I have customized org export to both html and latex extensively since I
  disliked many of the defaults (e.g. the use of article vs scrartcl, red
  borders around pdf hyperlinks).
 
  This left me wondering however, if it is possible to create org files
 that
  will produce the same output on every machine, regardless of the local
  emacs customizations (of course assuming that no hacks of the export
 engine
  are part of the configuration).
 
  In order to make the files more portable I have been trying to make
 changes
  affecting export with things like #+LATEX_HEADER: but e.g. changing the
  documentclass to scrartcl seems to be possible only by changing a
  customization variable (org-latex-classes).
 
  Is it possible to make the export engine assume defaults for all
  customization variables for a file (preferably through an in-file
 setting)
  and to specify those customization inside the file?
 
  - Klaus

 --
 Eric Schulte
 https://cs.unm.edu/~eschulte
 PGP: 0x614CA05D



[O] Portable formatting of export?

2013-10-21 Thread Klaus-Dieter Bauer
Hello!

I have customized org export to both html and latex extensively since I
disliked many of the defaults (e.g. the use of article vs scrartcl, red
borders around pdf hyperlinks).

This left me wondering however, if it is possible to create org files that
will produce the same output on every machine, regardless of the local
emacs customizations (of course assuming that no hacks of the export engine
are part of the configuration).

In order to make the files more portable I have been trying to make changes
affecting export with things like #+LATEX_HEADER: but e.g. changing the
documentclass to scrartcl seems to be possible only by changing a
customization variable (org-latex-classes).

Is it possible to make the export engine assume defaults for all
customization variables for a file (preferably through an in-file setting)
and to specify those customization inside the file?

- Klaus


[O] Extra list bullets / portable configuration?

2013-06-26 Thread Klaus-Dieter Bauer
Hello!

With the input-method TeX it is easy to insert more graphical Unicode
characters such as • (\bullet). Some questions about that:

1. Is it possible to make org-mode use • as a bullet character for lists?
2. Is it possible to make another persons org-mode installation aware of
this when viewing my document?

Question 1. is mostly a curiousity thing, but question 2. would be good to
know for pretty much any customization. Including viewing my own files a
year later when my configuration has largely changed.

kind regards, Klaus


[O] Setting entry title by a standard org function?

2013-06-20 Thread Klaus-Dieter Bauer
Hello!

Is there a standard way in the org-mode modules to change the text of a
heading conserving tags, todo type, priority etc?

I am writing a extension module for better multi-file handling (wiki-like)
and in that context I want to set the first heading of the wiki-node-files
based on the directory name. Currently my best-guess solution is to rebuild
the heading line from scratch -- while I found functions for setting tags,
priority, todo-keyword I didn't find one for setting the title. Downside:
Doing so is probably incompatible with whatever customization-capabilities
there may be in the syntax, so I want to avoid that.

kind regards, Klaus


Re: [O] Help, I need to paste raw image from clipboard into emacs/orgmode

2013-06-07 Thread Klaus-Dieter Bauer
(defun my-org-insert-clipboard ()
  (interactive)
  (let* ((image-file clipboard.png)
 (exit-status
  (call-process convert nil nil nil
clipboard: image-file)))
(org-insert-link nil (concat file: image-file) )
(org-display-inline-images)))

That works for me (Emacs 24.3, Windows 7) though for practical use some
more edge case handling (don't insert on failure, different name if file
exists) will be wanted.

kind regards, Klaus


2013/6/7 Vitalie Spinu spinu...@gmail.com


 Thanks for the tip. Do you have an elisp piece that handles the image
 insertion into org buffers?

 Thanks,

 Vitalie

   Klaus-Dieter Bauer bauer.klaus.die...@gmail.com
   on Thu, 6 Jun 2013 19:16:26 +0200 wrote:

   Dear All,
   Please Help,
   I need to paste raw image from clipboard into emacs/orgmode, I am a
   microsoft onenote user and I got used to take a lot of snapshots
 and embed
   it into my notes, I think if I could know how to embed images
 directly into
   emacs/orgmode from clipboard, I will switch to emacs very easily.

   I searched the internet but unfortunately I didn't find the answer,
   Thanks a lot.
   Dodo

   Hello!

   While the original poster probably long since has implemented one of the
   previously suggested solutions (or given up) I thought I'd share a more
 general
   solution I found [1].

   ImageMagick's `convert' can use clipboard: as input file (don't know if
 it works
   as output file).

   convert clipboard: FILENAME-WITH-EXTENSION

   I tested it with the cygwin and native windows versions and both worked.

   king regards, Klaus

   PS1: On Windows `convert.exe' might be shadowed by another executable,
   especially C:\Windows\System32\convert.exe. In that case the PATH
 variable
   should be adjusted such that ImageMagick comes before
 C:\Windows\system32. To
   check what shadows the executable, you can run where convert in the
   Windows-commandline.
   PS2: On Windows only basic image-displaying-support is included
 out-of-the-box.
   To get full support, the easiest way is to install the full GnuWin32
 tools
   (which include the necessary image libraries) with the web-installer.

   --

   [1] User magick in
  
 http://www.imagemagick.org/discourse-server/viewtopic.php?f=1t=7524p=22859
 .




[O] Help, I need to paste raw image from clipboard into emacs/orgmode

2013-06-06 Thread Klaus-Dieter Bauer

 Dear All,
 Please Help,
 I need to paste raw image from clipboard into emacs/orgmode, I am a
 microsoft onenote user and I got used to take a lot of snapshots and embed
 it into my notes, I think if I could know how to embed images directly into
 emacs/orgmode from clipboard, I will switch to emacs very easily.

 I searched the internet but unfortunately I didn't find the answer,
 Thanks a lot.
 Dodo


Hello!

While the original poster probably long since has implemented one of the
previously suggested solutions (or given up) I thought I'd share a more
general solution I found [1].

ImageMagick's `convert' can use clipboard: as input file (don't know if it
works as output file).

convert clipboard: FILENAME-WITH-EXTENSION

I tested it with the cygwin and native windows versions and both worked.

king regards, Klaus


PS1: On Windows `convert.exe' might be shadowed by another executable,
especially C:\Windows\System32\convert.exe. In that case the PATH variable
should be adjusted such that ImageMagick comes before C:\Windows\system32.
To check what shadows the executable, you can run where convert in the
Windows-commandline.
PS2: On Windows only basic image-displaying-support is included
out-of-the-box. To get full support, the easiest way is to install the full
GnuWin32 tools (which include the necessary image libraries) with the
web-installer.

--

[1] User magick in
http://www.imagemagick.org/discourse-server/viewtopic.php?f=1t=7524p=22859
.


[O] Customizing export globally

2013-06-06 Thread Klaus-Dieter Bauer
Hello!

Is it possible, short of hacking the exporters, to get indentation of
non-list paragraphs preserved?

E.g. I want some nice-looking formatting inside emacs:

==
And thus Einstein wrote:

E = mc^2
==

The same visual effect in export could be achieved by

==
And thus Einstein wrote:

#+begin_quote
E = mc^2
#+end_quote
==

but at the cost of visual clutter in the org-mode file which by my
emacs-centric export-as-an-afterthought usage would be worse than unwanted
export formatting (I have partially solved this by making the #+ lines
ALMOST white but still...).

I fear the answer will be no, as in the first example both paragraphs are
exported entirely equally as pTEXT/p.

My closest alternative is falling back to $$equations$$, but again --
visual clutter (though here a hack to fontify only the delimiters in a
bright shade of grey should not be so difficult).

kind regards, Klaus


Re: [O] Per file ID

2013-06-06 Thread Klaus-Dieter Bauer
Suvayu Ali fatkasuvayu+linux at gmail.com writes:

 
 On Fri, May 24, 2013 at 04:43:53PM +0200, Klaus-Dieter Bauer wrote:
  Hello!
  
  I intend to use org-mode for organizing my research notes; I prefer 
however
  a wiki style with many files rather than one big file.
  
  I found that the ID mechanism is quite robust for linking across files, 
but
  most of the time I'd like to link to a file, not a heading in that file, 
by
  ID. Is that possible in org-mode?
 
 The motivation behind id links is their guaranteed uniqueness.  For
 linking to files, doesn't simply using filenames do that?
 
   [[file:path/to/file.org][My notes]]
 
 Why reinvent the wheel?  ;)
 
 Hope this helps,
 

For me the purpose of using IDs is, amongst others, being able to reorganize 
my files without breaking links. 

Hence direct file links are unique but not robust. I even add UUIDs to every 
plot I generate by now for similiar reasons ;)

That said, with my wiki-style approach having one top-level heading per file 
turned out reasonable anyway. 

kind regards, Klaus




Re: [O] scale inline images in orgmode

2013-05-25 Thread Klaus-Dieter Bauer
Bastien bzg at altern.org writes:

 
 Hi Alexander,
 
 AW alexander.willand at t-online.de writes:
 
  If I include an image in an *.org file, let's say [[large-image.jpg]], I 
can 
  toggle the inline image with C-c C-x C-v .
 
 You can now (from git master) use `org-image-actual-width'.
 
 (setq org-image-actual-width 300)
   = always resize inline images to 300 pixels
 
 (setq org-image-actual-width '(400))
   = if there is a #+ATTR.*: width=200, resize to 200,
  otherwise resize to 400
 
 (setq org-image-actual-width nil)
   = if there is a #+ATTR.*: width=200, resize to 200,
  otherwise don't resize
 
 (setq org-image-actual-width t)
   = Never resize and use original width (the default)
 
 HTH,
 

Hello!

I am searching for a while now for a solution to get image scaling inside 
the org-mode buffer working /on Windows/. After installing GnuWin32 at least 
displaying the various image types works, but scaling does not. 

I assume the problem simply is missing ImageMagick-support in the Windows 
binaries. Any idea, how to get it? Or how to check whether emacs was 
compiled with ImageMagick support and just can't find DLLs on my system?

Note: I am also trying a while now to get emacs compiling from source, but 
there are so many problems popping up, that I barely see a chance to get 
this working.

I am using
  org-mode 8.0.3-15-g030e96-elpa 
  GNU Emacs 24.3.1 (i386-mingw-nt6.1.7601) of 2013-03-17 on MARVIN
  Windows 7 Home Premium, 64bit 

kind regards, Klaus




[O] Per file ID

2013-05-24 Thread Klaus-Dieter Bauer
Hello!

I intend to use org-mode for organizing my research notes; I prefer however
a wiki style with many files rather than one big file.

I found that the ID mechanism is quite robust for linking across files, but
most of the time I'd like to link to a file, not a heading in that file, by
ID. Is that possible in org-mode?

As a workaround I'll use toplevel headings instead of the title.

kind regards, Klaus


[O] Showing evaluation buffer while executing source blocks?

2012-02-03 Thread Klaus-Dieter Bauer
Hello!

I wondered if there is a way to show the evaluation buffer (if any)
during evaluation of commands -- in particular when the command takes
a long time (e.g. when trying to document a building process involving
`make' invocations) waiting for the command to finish is counter
productive. Even worse if the command used turns out to cause an
infinite loop.

If not possible yet: At least in the case of session based evaluation,
this would simply mean a construct of the form
  : (save-excursion
  : start the session if not yet started
  : (display-buffer session buffer)
  : send commands to session)

The idea came up because I'm currently trying to document the building
process of mathematical libraries (matplotlib, numpy, scipy) under
Cygwin -- building those is pretty tricky there. And waiting for a
`make' invocation to finish before seeing any result... well ^^'

On a side note, as mentioned in the [O] [bug] cannot execute shell
code blocks thread, for shell commands sadly this simple solution
won't work, as session based evaluation never returns from the
session.

simple because: I couldn't figure out where this would have to be done ^^'


king regards, Yu