Re: [O] org-elements: list in drawer

2012-08-07 Thread Nicolas Goaziou
Hello,

Michael Brand michael.ch.br...@gmail.com writes:

 M-q on the list item in this example does not try to fill:

 #+BEGIN_SRC org
   ,#+DRAWERS: MYDRAWER
   ,:MYDRAWER:
   ,- a paragraph longer than one line, a paragraph longer than one
 line, a paragraph longer than one line
   ,:END:
 #+END_SRC

What do you want to fill here?  Theres a an item on a single line, then
a paragraph outside the list below.

 org-fill-paragraph recognizes a plain list but I think it should be a
 paragraph, like when without the drawer. org-element-parse-buffer
 looks to me as I would expect, org-element-at-point on the list item
 looks wrong to me.

I don't understand.  What should be a paragraph? Why does
`org-element-at-point' look wrong?

Also, remember,

  - text text text
  text outside item

is not the same as

  - text text text
text inside item


Regards,

-- 
Nicolas Goaziou



[O] [babel] ob-java error org-babel-execute-src-block: Wrong type argument: characterp, -cp .

2012-08-07 Thread Torsten Wagner
Hi all,

every year I want like to evaluate java snippets in org-mode to
evaluate courseworks.
This worked fine but recently I had a bigger data crash and re-setup
my office machine.
It worked ok for the crash (that is it worked ok for the set-up at that time).

I use now

GNU Emacs 24.1.1
Org-mode version 7.8.11

I can evaluate simpler blocks but for more complex once I run into trouble
I used

#+BABEL: :mkdirp t
#+BABEL: :cmpflag -cp .
#+BABEL: :cmdline -cp .

#+begin_src emacs-lisp
(setq org-babel-default-header-args:java '((:cmpflag -cp .)
(:cmdline -cp .)))
#+end_src


** CODE-TESTER
#+BEGIN_SRC java :classname enshu4/Shop4Tester
package enshu4;
public class Shop4Tester {
public static void main(String[] args) {
System.out.println(--Checking for list 1-);
Shop4 shop1 = new Shop4(item1.txt);
shop1.print(potato);
shop1.printAllNames();

System.out.println(\n--Checking for list 2--);
Shop4 shop2 = new Shop4(item2.txt);
shop2.print(potato);
shop2.printAllNames();
}
}
#+END_SRC


** studentID
#+BEGIN_SRC java :classname enshu4/Shop4
package enshu4;

import java.util.Hashtable;
import java.util.Iterator;
import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import java.io.FileNotFoundException;

public class Shop4 {
private HashtableString, Integer item;

public void printAllNames() {
String tes;
IteratorString it = item.keySet().iterator();
while (it.hasNext()) {
tes = it.next();
System.out.println(tes +  a   + item.get(tes) + Euro);
}
}

public Shop4(String fname) {
item = new HashtableString,Integer();
FileReader fr;
try {
fr = new FileReader(fname);
} catch (FileNotFoundException e) {
System.out.println(fname + not found);
return;
}

BufferedReader br = new BufferedReader(fr);
String line;

try {
while ((line = br.readLine()) != null) {
String target = line;
String[] splt = target.split(=);
String key = splt[0];
String val = splt[1];
 item.put(key,new Integer(val));
}
br.close();
} catch (IOException e) {
e.printStackTrace();
}
}

public static void main(String[] args) {
Shop4 shop = new Shop4(item.txt);
shop.printAllNames();
}
}
#+END_SRC

If I want to execute the given source code block I end up with an error message

org-babel-execute-src-block: Wrong type argument: characterp, -cp .


I believe this is rather common due to some changes within emacs, but
I can't find a way to get around this.

Any idea?


BTW. previous year it seems I created the lists by

#+BEGIN_SRC text :tangle ./item1.txt
potato=120
bread=160
milk=180
#+END_SRC

but this seems not to work anymore anyhow that would be a minor problem


Thanks for looking into this.

Torsten



Re: [O] Bug: File mode specification error: (invalid-function org-check-version) on startup

2012-08-07 Thread Steinar Bang
 Achim Gratz strom...@nexgo.de:

 My guess is that you have outdated autoloads... but please follow
 these steps to produce a meaningful bug report:

 http://orgmode.org/manual/Feedback.html#Feedback

I have used org-submit-bug-report once, back in July (I think).  And the
report with a minimal test case, just disappeared down a black hole.

Oh well!

 Perhaps also relevant:

[snip!]
 http://orgmode.org/worg/org-hacks.html#compiling-org-without-make

This was indeed relevant.  Recompiling with
 emacs -batch -Q -L lisp -l ../UTILITIES/org-fixup -f 
org-make-autoloads-compile-force
fixed my problem.




[O] org-notify Tutorial

2012-08-07 Thread SW
Is a tutorial/guide available for org-notify? Neither of the following were very
helpful:

http://orgmode.org/worg/org-api/org-notify-api.html

http://thread.gmane.org/gmane.emacs.orgmode/52634/focus=52693

Thanks.





[O] ditaa diagram not as expected

2012-08-07 Thread Richard Lewis
Hi there,

I'm preparing a document in which I discuss the CSS box model and
wanted to include a diagram, this diagram:

#+begin_ditaa boxmodel.png -S
+---=---+
|   margin  |
|  +-+  |
|  |border   |  |
|  |  +=--+  |  |
|  |  | padding   |  |  |
|  |  |  +=+  |  |  |
|  |  |  |  content|  |  |  |
|  |  |  | |  |  |  |
|  |  |  | |  |  |  |
|  |  |  +=+  |  |  |
|  |  |   |  |  |
|  |  +=--+  |  |
|  | |  |
|  +-+  |
|   |
+---=---+
#+end_ditaa

However, the diagram that org/ditaa creates is missing the third box
(counting from the outside inwards), the box between border and
padding. I tried removing the = (which would make the line solid),
but the box still did not appear. I've tried this snippet in an org
document by itself, and I've tried putting the diagram in a file by
itself and running ditaa directly. Still no middle box.

I realise this may be a ditaa rather than an org-mode problem, but can
anyone suggest anything? Particularly, does anyone else get the same
effect?

org-mode version: 7.8.11; ditaa version: 0.9; Emacs version: 24.1.1.

Thanks,
Richard



[O] The Quantified Shower (was: Introducing Octopress Exporter)

2012-08-07 Thread Bastien
I have long given up on reckoning how many I am (outside or inside), 
and I'm always amazed at those attempts to quantify one's own life.

I'm still trying to figure out if this post is a joke or not:

  http://jeapostrophe.github.com/blog/2012/08/06/shower/

Maybe the fun is precisely in wondering so :)

-- 
 Bastien



Re: [O] [PATCH] Fixes org-rmail-store-link

2012-08-07 Thread Bastien
Hi,

tftor...@tftorrey.com (T.F. Torrey) writes:

 Attempting to save a link in an Rmail buffer fails with the error
 Wrong type argument: arrayp, nil.

This is fixed now, thanks.

I used a slightly different fix, taking `rmail-header-style' into
account.  Thanks anyway for the patch!

Best,

-- 
 Bastien



Re: [O] are super-hidden technical blocks required?

2012-08-07 Thread Bastien
Torsten Wagner torsten.wag...@gmail.com writes:

 So how to satisfy both views, a clutter free view and the awareness of
 what is saved in your file?

I think we must untangle two issues here: one is about the visibility by
itself (what should be visible, invisible, how visible, how invisible?)
and the other one is about cycling (changing visibility interactively.)

For example, if a user wants to consider that a drawer doesn't make an
entry non-empty while cycling, this can be done, avoiding cluttering the
with stuff you don't want when cycling.

But that's a different problem than the one of visibility /by itself/.

I know I'm making the question even more complex, but that's hopefully
just a temporary step in this discussion.

-- 
 Bastien



Re: [O] Birthdays, org-contacts and agenda filters - a bug?

2012-08-07 Thread Simon Thum

Hi Bastien,

let me just try again. I do not think a minimal example helps much as 
org is working as it should - mostly. The default agenda (C-c a a) shows 
birthday lines, so the org-contacts anniversaries are working correctly.


I do not (plan to) use the default agenda however. I have FILETAGS and 
agendas for work vs. private so that things line up in the appropriate 
agenda by default, leaving the possibility to show some things in both 
agendas when desired.


But I do not get Birthdays from org-contacts in any but the default 
agenda, indicating there are no tags on their agenda-internal 
representation. Not even those of the triggering headline; I tried this:


** Geburtstag  :private:
%%(org-contacts-anniversaries BIRTHDAY %y. Geburtstag %h :private:)

One might expect to see the private tag on the agenda entry from one of 
the two occurrences, but it is not even part of the text! This indicates 
tags are being stripped for some reason. If that reason is tags 
processing, _then_ there is a bug, as it's not working.


Anyway, I use org-agenda-tag-filter-preset as described previously and I 
do not know how to get birthdays through this kind of filter. It seems 
impossible, in fact, without adding tags. Other ways of filtering have 
other shortcomings, which originally led me to tag-filter-preset.


The solution I would prefer is that the agenda item inherits the tags 
from the contacts headline (i.e. the person/event) in question - but I 
don't know if this is possible at all over the 
%%(org-contacts-anniversaries) anchor. That could make me see private 
(friend's) birthdays in private agenda and correspondingly for work.


I'm currently looking into fixing this myself, but chances are as dim as 
my elisp background.


Cheers,

Simon


On 08/04/2012 10:31 AM, Bastien wrote:

Hi Simon,

Simon Thumsimon.t...@gmx.de  writes:


I have a working setup for birthdays from org-contacts in my default agenda.

However I use split work/private agendas which are discerned using
org-agenda-tag-filter-preset. As it happens, my birthday heading does not
inherit its tags (from FILETAGS) as I intend; I even tried this:

* BDays :private:
%%(org-contacts-anniversaries BIRTHDAY %y %h :private:)

to give it its private tag so it shows in the private agenda. No success
so far - although the tag is _not_ displayed in the agenda, neither as tag
nor as headline, indicating there is some processing.

An alternate approach might be altering the agenda filters but given my
split agenda goal I don't know how. My target agenda is:

(p private agenda agenda 
 ((org-agenda-span 40)
  (org-agenda-tag-filter-preset '(+private))
  (org-agenda-hide-tags-regexp private)
  (org-agenda-compact-blocks t)
  ))

The only thing really happening is tags filtering - but that seems
incompatible with %%() agenda entries. Maybe this is a bug?


I don't understand.

Can you restate what the bug is and give a way to reproduce it?

Thanks,






Re: [O] The Quantified Shower

2012-08-07 Thread Christopher J. White
Oh man, what a great post... But the mp3 links are broken!  I really 
want to hear The Shower Song w/hair.


This makes me think of my obsession with finding the optimal order of 
tasks that I do in a given day.  (I can save 5 seconds if I overlap 
rinsing the espresso cup with one hand while I flush the espresso maker 
with the other...)


...cj


On 8/7/12 5:52 AM, Bastien wrote:

I have long given up on reckoning how many I am (outside or inside),
and I'm always amazed at those attempts to quantify one's own life.

I'm still trying to figure out if this post is a joke or not:

   http://jeapostrophe.github.com/blog/2012/08/06/shower/

Maybe the fun is precisely in wondering so :)





Re: [O] org-notify Tutorial

2012-08-07 Thread Nick Dokos
SW sabrewo...@gmail.com wrote:

 Is a tutorial/guide available for org-notify? Neither of the following were 
 very
 helpful:
 
 http://orgmode.org/worg/org-api/org-notify-api.html
 
 http://thread.gmane.org/gmane.emacs.orgmode/52634/focus=52693
 
 Thanks.
 

IIRC, at the time I just followed the steps in the embedded commentary
of org-notify.el itself. I don't know of any other documentation.

Nick



Re: [O] The Quantified Shower (was: Introducing Octopress Exporter)

2012-08-07 Thread Myles English

He doesn't say how long it takes to wash his wife.


Bastien writes:

 I have long given up on reckoning how many I am (outside or inside), 
 and I'm always amazed at those attempts to quantify one's own life.

 I'm still trying to figure out if this post is a joke or not:

   http://jeapostrophe.github.com/blog/2012/08/06/shower/

 Maybe the fun is precisely in wondering so :)




Re: [O] The Quantified Shower (was: Introducing Octopress Exporter)

2012-08-07 Thread Nick Dokos
Bastien b...@gnu.org wrote:

 I have long given up on reckoning how many I am (outside or inside), 
 and I'm always amazed at those attempts to quantify one's own life.
 

Here's something to either inspire you or turn you off completely:

http://www.technologyreview.com/featured-story/426968/the-patient-of-the-future/

Nick

 I'm still trying to figure out if this post is a joke or not:
 
   http://jeapostrophe.github.com/blog/2012/08/06/shower/
 
 Maybe the fun is precisely in wondering so :)
 
 -- 
  Bastien
 




Re: [O] The Quantified Shower (was: Introducing Octopress Exporter)

2012-08-07 Thread Nick Dokos
Nick Dokos nicholas.do...@hp.com wrote:

 Bastien b...@gnu.org wrote:
 
  I have long given up on reckoning how many I am (outside or inside), 
  and I'm always amazed at those attempts to quantify one's own life.
  
 
 Here's something to either inspire you or turn you off completely:
 
 http://www.technologyreview.com/featured-story/426968/the-patient-of-the-future/
 
 Nick

Actually, I meant this one:

http://www.theatlantic.com/magazine/archive/2012/07/the-measured-man/9018/

 
  I'm still trying to figure out if this post is a joke or not:
  
http://jeapostrophe.github.com/blog/2012/08/06/shower/
  
  Maybe the fun is precisely in wondering so :)
  
  -- 
   Bastien
  
 
 



[O] MobileOrg: Confusion about capturing?

2012-08-07 Thread 'Mash

Afternoon,

Just started using MobileOrg (Android) and I am a little confused as  
to capturing notes. I have a single 'agenda' file setup which I can  
see...


---
Agenda views
mashdot.org
---

I assumed that I could capture a note within 'mashdot.org' allowing me  
to create a new TODO etc in the list. But it appears that the default  
action is to send my capture to the org-mobile-inbox-for-pull file. I  
would have thought by default you could create new nodes within your  
agenda file?


Am I missing something here?

Also what is the difference between 'Capture' and 'Capture node as child'?

Thanks

'Mash




Re: [O] are super-hidden technical blocks required?

2012-08-07 Thread Torsten Wagner
Hey Bastien,

On 7 August 2012 19:23, Bastien b...@gnu.org wrote:
 that a drawer doesn't make an
 entry non-empty while cycling,

ohhh you challenge us... does not ... non-empty is in fact the
same like if there is only a drawer, the entry is still empty
right ?!

Yes, I agree that should be separated.

Maybe an idea would be a rule like
if all properties in a drawer are marked as hidden and there is
nothing else for the particular entry (no body), do not open the entry
for the next cycling rounds.
I just tested a bit and org-mode is clever enough already to avoid any
text-insertion before the property drawer if text get added to a
collapsed entry.
Thus, this rule just might work and hide technical properties
completely during cycling.
Combined with a #+HIDDEN_PROP: line each and everyone can adjust
individually how much and what he likes to hide.

#+HIDDEN_PROP: * - all properties are hidden
would be the extreme and all property drawers will be hidden in case
they are the only element of a entry. In case other elements are
included, they collapsed drawer line will be dimmed by a different
face to indicate that only hidden properties are included

#+HIDDEN_PROP: this means no properties are hidden
would be the other extreme and nothing would be hidden (that
essentially would represent the present state).

I created two mock-ups. One shows the present solution and the other
shows how certain properties can be marked hidden and which effect
does this have on different level and combinations. Hope that helps
within this discussion. I choose a arbitrary colour scheme to make it
rather good visible.

Torsten
attachment: org_hidden_drawer_mockup_proposed_method.pngattachment: org_hidden_drawer_mockup_orignal.png

Re: [O] MobileOrg: Confusion about capturing?

2012-08-07 Thread Richard Riley
'Mash mash...@toshine.net writes:

 Afternoon,

 Just started using MobileOrg (Android) and I am a little confused as  to
 capturing notes. I have a single 'agenda' file setup which I can  see...

 ---
 Agenda views
 mashdot.org
 ---

 I assumed that I could capture a note within 'mashdot.org' allowing me  to
 create a new TODO etc in the list. But it appears that the default  action is 
 to
 send my capture to the org-mobile-inbox-for-pull file. I  would have thought 
 by
 default you could create new nodes within your  agenda file?

 Am I missing something here?

It seems captures are only useable after syncing and subsequent
refiling.  You cant add a note to a capture for example, or change its
status I think.

Ive been playing with it for a while too and intend to submit more
userability info at a later date. Its nice but a few tweaks could make
it a lot nicer - unfortunately I dont know anything about the mobile
side of it.




Re: [O] are super-hidden technical blocks required?

2012-08-07 Thread Christopher J. White
Nice!  I like this approach.  The only slight change I would make is to 
the All entries are unfolded one level.  If there are only hidden 
properties but there is other content, show the other content but not 
the PROPERTIES drawer:


   * All entries are unfolded one level
   ** Only hidden properties with other content
  This is more content

The :PROPERTIES: is not shown.

Question -- are you proposing a new step in cycling that opens all 
property drawers, or is this already available via some command or 
setting?  I've never seen a way to open everything including PROPERTIES 
via Tab or S-Tab cycling.


...cj


On 8/7/12 9:20 AM, Torsten Wagner wrote:

Hey Bastien,

On 7 August 2012 19:23, Bastien b...@gnu.org wrote:

that a drawer doesn't make an
entry non-empty while cycling,


ohhh you challenge us... does not ... non-empty is in fact the
same like if there is only a drawer, the entry is still empty
right ?!

Yes, I agree that should be separated.

Maybe an idea would be a rule like
if all properties in a drawer are marked as hidden and there is
nothing else for the particular entry (no body), do not open the entry
for the next cycling rounds.
I just tested a bit and org-mode is clever enough already to avoid any
text-insertion before the property drawer if text get added to a
collapsed entry.
Thus, this rule just might work and hide technical properties
completely during cycling.
Combined with a #+HIDDEN_PROP: line each and everyone can adjust
individually how much and what he likes to hide.

#+HIDDEN_PROP: * - all properties are hidden
would be the extreme and all property drawers will be hidden in case
they are the only element of a entry. In case other elements are
included, they collapsed drawer line will be dimmed by a different
face to indicate that only hidden properties are included

#+HIDDEN_PROP: this means no properties are hidden
would be the other extreme and nothing would be hidden (that
essentially would represent the present state).

I created two mock-ups. One shows the present solution and the other
shows how certain properties can be marked hidden and which effect
does this have on different level and combinations. Hope that helps
within this discussion. I choose a arbitrary colour scheme to make it
rather good visible.

Torsten





[O] all org-buffers modified

2012-08-07 Thread Joost Helberg
Hi,

upon startup of emacs (and load of desktop), all my freshly opened
org-buffers end up being modified. There's no undo information
available and debugging the org-mode function doesn't give me any clue
as (buffer-modified-p) returns false the whole time.

Once in a while (twice a month) I have to stop and start emacs and the
nuisance of answering `y' to all questions about modified buffers.

In my .emacs org-mode is treated very much the same way as txt or tex
buffers, but these don't end up being modified right after initial
load. Also org-startup-align-all-tables and
org-insert-mode-line-in-empty-file are set to off.

Has anyone any clue where to look for a solution as I obviously like
freshly loaded buffers to be not modified.

regards,

Joost

-- 
Snow B.V.http://snow.nl



Re: [O] all org-buffers modified

2012-08-07 Thread Nick Dokos
Joost Helberg jo...@snow.nl wrote:

 Hi,
 
 upon startup of emacs (and load of desktop), all my freshly opened
 org-buffers end up being modified. There's no undo information
 available and debugging the org-mode function doesn't give me any clue
 as (buffer-modified-p) returns false the whole time.
 

That shouldn't happen (and it does *not* happen in my case): the files are
opened but the buffers are *not* modified. But I'm confused about what
you are saying: (buffer-modified-p) returns nil the whole time, so that meant
they are unmodified. When do they become modified?

 Once in a while (twice a month) I have to stop and start emacs and the
 nuisance of answering `y' to all questions about modified buffers.
 
 In my .emacs org-mode is treated very much the same way as txt or tex
 buffers, but these don't end up being modified right after initial
 load. Also org-startup-align-all-tables and
 org-insert-mode-line-in-empty-file are set to off.
 
 Has anyone any clue where to look for a solution as I obviously like
 freshly loaded buffers to be not modified.
 

That's what I see in any case, so it must be an artifact of your setup.
Have you tried starting with emacs -q and a minimal org init file?
If that works, then bisecting your way through your .emacs seems like
the next step. In particular, starting without loading desktop seems
like a worthwhile experiment.

Nick

 regards,
 
 Joost
 
 -- 
 Snow B.V.http://snow.nl
 



Re: [O] ditaa diagram not as expected

2012-08-07 Thread Eric Schulte
This is a ditaa issue and probably isn't affected by Org-mode.

I have had issues like this in the past with ditaa, I often find that
the solution is to leave more space between my shapes or lines.

Best,

Richard Lewis richardle...@fastmail.co.uk writes:

 Hi there,

 I'm preparing a document in which I discuss the CSS box model and
 wanted to include a diagram, this diagram:

 #+begin_ditaa boxmodel.png -S
 +---=---+
 |   margin  |
 |  +-+  |
 |  |border   |  |
 |  |  +=--+  |  |
 |  |  | padding   |  |  |
 |  |  |  +=+  |  |  |
 |  |  |  |  content|  |  |  |
 |  |  |  | |  |  |  |
 |  |  |  | |  |  |  |
 |  |  |  +=+  |  |  |
 |  |  |   |  |  |
 |  |  +=--+  |  |
 |  | |  |
 |  +-+  |
 |   |
 +---=---+
 #+end_ditaa

 However, the diagram that org/ditaa creates is missing the third box
 (counting from the outside inwards), the box between border and
 padding. I tried removing the = (which would make the line solid),
 but the box still did not appear. I've tried this snippet in an org
 document by itself, and I've tried putting the diagram in a file by
 itself and running ditaa directly. Still no middle box.

 I realise this may be a ditaa rather than an org-mode problem, but can
 anyone suggest anything? Particularly, does anyone else get the same
 effect?

 org-mode version: 7.8.11; ditaa version: 0.9; Emacs version: 24.1.1.

 Thanks,
 Richard


-- 
Eric Schulte
http://cs.unm.edu/~eschulte



Re: [O] are super-hidden technical blocks required?

2012-08-07 Thread Torsten Wagner
Hey Christopher,

* All entries are unfolded one level
** Only hidden properties with other content
   This is more content

 The :PROPERTIES: is not shown.

I left it there, because some people claimed the dislike to hide
property drawers to much. A different face colour might be a good
compromise.


 Question -- are you proposing a new step in cycling that opens all property
 drawers, or is this already available via some command or setting?  I've
 never seen a way to open everything including PROPERTIES via Tab or S-Tab
 cycling.

No, I do not know how to open drawers by tab-cycling and would not
propose it. This view is just to show the most verbose way by open
each property drawer in addition manually.

The nice part on this solution, change the properties in the
HIDDEN_PROP line and you can get a complete different view only focus
on what is important for a certain task. It would rather easy to adapt
it quickly to the different requirements. I believe this goes even
further rather then only hide technical properties. E.g. entries
with many properties could be limited to show only what you are
working on.
See for example the following entry which I stole from Thomas S. Dyes
post about org-bibtex.el

** {Cultural Resources of Naval Air Station, Barbers
:PROPERTIES:
:TYPE: book
:CUSTOM_ID: tuggle94:_cultur_resour_naval_air_station_barber_point
:MONTH:December}
:ADDRESS:  Honolulu
:SERIES:   Prepared for Belt Collins Hawaii
:YEAR: 1994
:PUBLISHER: iarii
:AUTHOR:   {H. David Tuggle and M. J. Tomonari-Tuggle}
:END:

This has many properties. If you have hundred of this entries you
might be interested to see only AUTHOR and YEAR line for some task. I
am aware of the column view but with the proposed method people could
get a plain text view only showing what they just need. If the
HIDDEN_PROP line could include regular expressions one could even
negate a list to get a hide all but behavior. To get

** {Cultural Resources of Naval Air Station, Barbers
:PROPERTIES:
:YEAR: 1994
:AUTHOR:   {H. David Tuggle and M. J. Tomonari-Tuggle
...
:END:

You simple would have to add #+HIDDEN_PROP: ^[YEAR AUHOR]

Torsten



Re: [O] [babel] ob-java error org-babel-execute-src-block: Wrong type argument: characterp, -cp .

2012-08-07 Thread Eric Schulte
Torsten Wagner torsten.wag...@gmail.com writes:

 Hi all,

 every year I want like to evaluate java snippets in org-mode to
 evaluate courseworks.
 This worked fine but recently I had a bigger data crash and re-setup
 my office machine.
 It worked ok for the crash (that is it worked ok for the set-up at that time).

 I use now

 GNU Emacs 24.1.1
 Org-mode version 7.8.11

 I can evaluate simpler blocks but for more complex once I run into trouble
 I used

 #+BABEL: :mkdirp t
 #+BABEL: :cmpflag -cp .
 #+BABEL: :cmdline -cp .


The above should use standard property lines, see (info (org)Buffer-wide 
header arguments)


 #+begin_src emacs-lisp
 (setq org-babel-default-header-args:java '((:cmpflag -cp .)
 (:cmdline -cp .)))
 #+end_src


This seems to me to be redundant with the above.  No need to set these
for the language and the buffer.

Best,



 ** CODE-TESTER
 #+BEGIN_SRC java :classname enshu4/Shop4Tester
 package enshu4;
 public class Shop4Tester {
   public static void main(String[] args) {
   System.out.println(--Checking for list 1-);
   Shop4 shop1 = new Shop4(item1.txt);
   shop1.print(potato);
   shop1.printAllNames();

   System.out.println(\n--Checking for list 2--);
   Shop4 shop2 = new Shop4(item2.txt);
   shop2.print(potato);
   shop2.printAllNames();
   }
 }
 #+END_SRC


 ** studentID
 #+BEGIN_SRC java :classname enshu4/Shop4
 package enshu4;

 import java.util.Hashtable;
 import java.util.Iterator;
 import java.io.BufferedReader;
 import java.io.FileReader;
 import java.io.IOException;
 import java.io.FileNotFoundException;

 public class Shop4 {
 private HashtableString, Integer item;

 public void printAllNames() {
   String tes;
 IteratorString it = item.keySet().iterator();
 while (it.hasNext()) {
   tes = it.next();
 System.out.println(tes +  a   + item.get(tes) + Euro);
 }
 }

 public Shop4(String fname) {
 item = new HashtableString,Integer();
   FileReader fr;
   try {
   fr = new FileReader(fname);
   } catch (FileNotFoundException e) {
   System.out.println(fname + not found);
   return;
   }
   
   BufferedReader br = new BufferedReader(fr);
   String line;
   
   try {
   while ((line = br.readLine()) != null) {
   String target = line;
   String[] splt = target.split(=);
   String key = splt[0];
   String val = splt[1];
item.put(key,new Integer(val));
   }
   br.close();
   } catch (IOException e) {
   e.printStackTrace();
   }
 }

 public static void main(String[] args) {
 Shop4 shop = new Shop4(item.txt);
 shop.printAllNames();
 }
 }
 #+END_SRC

 If I want to execute the given source code block I end up with an error 
 message

 org-babel-execute-src-block: Wrong type argument: characterp, -cp .


 I believe this is rather common due to some changes within emacs, but
 I can't find a way to get around this.

 Any idea?


 BTW. previous year it seems I created the lists by

 #+BEGIN_SRC text :tangle ./item1.txt
 potato=120
 bread=160
 milk=180
 #+END_SRC

 but this seems not to work anymore anyhow that would be a minor problem


 Thanks for looking into this.

 Torsten


-- 
Eric Schulte
http://cs.unm.edu/~eschulte



Re: [O] all org-buffers modified

2012-08-07 Thread Joost Helberg
Nick,

I did that, but didn't quite get to covering all customizations. It
now turns out that the following makes the symptoms happen:

(add-hook 'org-mode-hook
(lambda () (set-buffer-file-coding-system 'utf-8)))

The documentation of set-buffer-file-coding-system clearly states
that it leaves the buffer modified _on purpose_. A third parameter
controls this behaviour.

Hence, my .emacs should contain:

(add-hook 'org-mode-hook
(lambda () (set-buffer-file-coding-system 'utf-8 nil t)))

Solved.

regards,

Joost

 Nick == Nick Dokos nicholas.do...@hp.com writes:
  Subject: Re: [O] all org-buffers modified
  From: Nick Dokos nicholas.do...@hp.com
  To: Joost Helberg jo...@snow.nl
  cc: emacs-orgmode@gnu.org
  Date: Tue, 07 Aug 2012 10:07:19 -0400

  Joost Helberg jo...@snow.nl wrote:

  Hi,
  
  upon startup of emacs (and load of desktop), all my freshly opened
  org-buffers end up being modified. There's no undo information
  available and debugging the org-mode function doesn't give me any clue
  as (buffer-modified-p) returns false the whole time.
  

  That shouldn't happen (and it does *not* happen in my case): the files are
  opened but the buffers are *not* modified. But I'm confused about what
  you are saying: (buffer-modified-p) returns nil the whole time, so that meant
  they are unmodified. When do they become modified?

  Once in a while (twice a month) I have to stop and start emacs and the
  nuisance of answering `y' to all questions about modified buffers.
  
  In my .emacs org-mode is treated very much the same way as txt or tex
  buffers, but these don't end up being modified right after initial
  load. Also org-startup-align-all-tables and
  org-insert-mode-line-in-empty-file are set to off.
  
  Has anyone any clue where to look for a solution as I obviously like
  freshly loaded buffers to be not modified.
  

  That's what I see in any case, so it must be an artifact of your setup.
  Have you tried starting with emacs -q and a minimal org init file?
  If that works, then bisecting your way through your .emacs seems like
  the next step. In particular, starting without loading desktop seems
  like a worthwhile experiment.

  Nick

  regards,
  
  Joost
  
  -- 
  Snow B.V.http://snow.nl
  


-- 
Snow B.V.http://snow.nl



Re: [O] are super-hidden technical blocks required?

2012-08-07 Thread Robert Horn
Separating out the issue of how to hide and expose the content, why not
use s-expressions for the hidden content?  Org is built on a lisp engine
and these will fit nicely into automation.  It avoids a lot of parsing
and other headaches, and an s-expression can hold any of the discussed 
information.

It could be an a-list that is designed for the purpose, or it could be a
list structured like the custom configuration list used in emacs config.
I think of the latter when considering the potential to steal code for
using the contents, updating the contents, and providing a user
interface when that is needed.  It also provides a model for sharing the
list among independent groups of developers with overlapping interests.
It permits automatically generated comments, advice, and warnings for
those who look at it, much like you find when looking over the tail end
of a .emacs file.

The property construction could then be a simple 
:HIDDEN-ALIST-PROPERTIES: (( stuff ))

It would be very unreadable and unfriendly to the novice, but that is
already a characteristic of the data being discussed.

R Horn
rjh...@alum.mit.edu



Re: [O] ditaa diagram not as expected

2012-08-07 Thread Richard Lewis
At Tue, 07 Aug 2012 07:48:36 -0600,
Eric Schulte wrote:

 Richard Lewis richardle...@fastmail.co.uk writes:
 
  However, the diagram that org/ditaa creates is missing the third box
  (counting from the outside inwards), the box between border and
  padding. I tried removing the = (which would make the line solid),
  but the box still did not appear. I've tried this snippet in an org
  document by itself, and I've tried putting the diagram in a file by
  itself and running ditaa directly. Still no middle box.
 
  I realise this may be a ditaa rather than an org-mode problem, but can
  anyone suggest anything? Particularly, does anyone else get the same
  effect?
 
 This is a ditaa issue and probably isn't affected by Org-mode.
 
 I have had issues like this in the past with ditaa, I often find that
 the solution is to leave more space between my shapes or lines.

Oh. Well that's fixed it. I also tried various other spacing and found
all sorts of ways of breaking it. But at least one arrangement works!

Thanks,
Richard



Re: [O] Subscripts in URLs

2012-08-07 Thread Ken Williams


From: Bastien Guerry [mailto:bastiengue...@googlemail.com]

 Ken Williams ken.willi...@windlogics.com writes:

  and export to HTML, I get a link with anchor text
 
 http://www.mmm.ucar.edu/events/ISP/presentations/JNTforecastevaluati
 on
  concepts.pdf, where forecastevaluationconcepts is subscripted.  The
  link *target* is correct, though.

 Maybe you have (setq org-export-with-sub-superscripts t) or ^:t in your
 buffer?

Indeed, that seems to be the case.  I do want to be able to use subscripts and 
other markup in general though, but in a URL like this it seems misplaced.

Maybe we could patch the core code to only process link markup when the author 
has explicitly given the anchor text?  Otherwise, if I'm linking to an external 
resource, I don't have control over whatever crazy stuff appears in the URL, 
and underscores are quite common.

 -Ken


CONFIDENTIALITY NOTICE: This e-mail message is for the sole use of the intended 
recipient(s) and may contain confidential and privileged information. Any 
unauthorized review, use, disclosure or distribution of any kind is strictly 
prohibited. If you are not the intended recipient, please contact the sender 
via reply e-mail and destroy all copies of the original message. Thank you.



Re: [O] More flyspell-overlays removed

2012-08-07 Thread Jeffrey Spencer
Re-dl'ed and works fine. Sorry about that.

On Tue, Aug 7, 2012 at 7:18 PM, Bastien b...@gnu.org wrote:

 Hi Jeffrey,

 Jeffrey Spencer jeffspenc...@gmail.com writes:

  Just gave this a go and seems to work well but still forgot to add I
  believe:
 
  TYP_TODO
  and
  ATTR_LATEX

 The two words above are already skipped for me.

 --
  Bastien



Re: [O] More flyspell-overlays removed

2012-08-07 Thread Bastien


Hi Jeffrey,

Jeffrey Spencer jeffspenc...@gmail.com writes:

 Just gave this a go and seems to work well but still forgot to add I
 believe:

 TYP_TODO
 and
 ATTR_LATEX

The two words above are already skipped for me.

-- 
 Bastien




Re: [O] The Quantified Shower

2012-08-07 Thread Bastien
Nick Dokos nicholas.do...@hp.com writes:

 Actually, I meant this one:

 http://www.theatlantic.com/magazine/archive/2012/07/the-measured-man/9018/

Nice read!  Yes, I'm somehow scared :)

Mhh.. at least Claude Shannon had more funny stuff to play 
with than his body:

http://www.youtube.com/watch?v=sBHGzRxfeJY

-- 
 Bastien



[O] [OT] LWN article on Easybook

2012-08-07 Thread Nick Dokos
Linux Weekly News published an article on Easybook.  I know this is only
tangentially related to org, but I think there are many people here who
are interested in e-books and related topics, so I thought I'd post the
link: [fn:1][fn:2]

http://lwn.net/Articles/507653/

Nick

Footnotes:

[fn:1] LWN requires a subscription for the articles it publishes in its
   weekly issues the first week they are available, but this article
   was published two weeks ago and so it should be freely available
   by now.

[fn:2] BTW, this is all fyi: I have no connection to Easybook, nor have
   I ever used it.




Re: [O] org-elements: list in drawer

2012-08-07 Thread Michael Brand
Hi Nicolas

On Tue, Aug 7, 2012 at 9:40 AM, Nicolas Goaziou n.goaz...@gmail.com wrote:

   ,:MYDRAWER:
   ,- a paragraph longer than one line, a paragraph longer than one
 line, a paragraph longer than one line
   ,:END:
 #+END_SRC

 What do you want to fill here?  Theres a an item on a single line, then
 a paragraph outside the list below.

The Org source block was chosen here to show with the comma where a
line starts really in Org and where it has been wrapped by email. The
drawer contains one list with one item, on one single long line before
filling. I want to fill it into several lines, just like it happens
when “:MYDRAWER:” and “:END:” are removed before.

 org-fill-paragraph recognizes a plain list but I think it should be a
 paragraph, like when without the drawer. org-element-parse-buffer
 looks to me as I would expect, org-element-at-point on the list item
 looks wrong to me.

 I don't understand.  What should be a paragraph?

The “paragraph” from `org-element-parse-buffer', here the excerpt of
the drawer content:

#+BEGIN_SRC emacs-lisp
  (plain-list
   (:type unordered :begin 32 :end 135
  :contents-begin 32 :contents-end 134 :structure
  ((32 0 -  nil nil nil 134))
  :post-blank 1 :parent #2)
   (item
(:bullet -  :begin 32 :end 134 :contents-begin 34 :contents-end 135
 :checkbox nil :counter nil :hiddenp nil :structure
 ((32 0 -  nil nil nil 134))
 :post-blank 1 :tag nil :parent #3)
(paragraph
 (:begin 34 :end 135 :contents-begin 34 :contents-end 135
 :post-blank 0 :parent #4)
 a paragraph longer [...] longer than one line\n)))
#+END_SRC

 Why does `org-element-at-point' look wrong?

The “drawer” is inside the list and I miss “item” and its “paragraph”:

#+BEGIN_SRC emacs-lisp
  (plain-list
   (:type unordered :begin 32 :end 135
  :contents-begin 32 :contents-end 134 :structure
  ((32 0 -  nil nil nil 134))
  :post-blank 1 :parent
  (drawer
   (:begin 21 :end 141 :drawer-name MYDRAWER :hiddenp nil
   :contents-begin 32 :contents-end 135
   :post-blank 0 :parent nil
#+END_SRC

I thought that it should be exactly the same as the excerpt shown
above.

Michael



Re: [O] The Quantified Shower

2012-08-07 Thread brian powell
* Lets not forget  Claude Shannon's Ultimate Machine:

http://www.youtube.com/watch?v=G5rJJgt_5mg

On Tue, Aug 7, 2012 at 1:27 PM, Bastien b...@gnu.org wrote:

 Nick Dokos nicholas.do...@hp.com writes:

  Actually, I meant this one:
 
 
 http://www.theatlantic.com/magazine/archive/2012/07/the-measured-man/9018/

 Nice read!  Yes, I'm somehow scared :)

 Mhh.. at least Claude Shannon had more funny stuff to play
 with than his body:

 http://www.youtube.com/watch?v=sBHGzRxfeJY

 --
  Bastien




[O] Nice theorem display ?

2012-08-07 Thread Joon Kwon

Hi,

I'm a new orgmode user and I am really enjoying it, especially for writing 
LaTeX documents.

I'm wondering if there is a simple way to make the buffer display theorem 
environements (for instance) in a nice way...

For instance, if I have the following code :
#+begin_theorem
My theorem
Bla bla bla
#+end_theorem

I would like the buffer to display something like :

Theorem : 
 | My theorem
 | Bla bla bla
 +

I guess this must not be difficult for elisp programmers ...

Joon
  


Re: [O] [PATCH] Change to next/previous-line in org agenda

2012-08-07 Thread Bastien
Hi Eric,

Eric Abrahamsen e...@ericabrahamsen.net writes:

 I'm not sure people will actually want this change, but I like it, so
 I'm providing a patch. All this does is change org-agenda-next-line and
 org-agenda-previous-line so that they move by agenda items, and not by
 actual lines.

I like it too -- I implemented it differently, but this is the same
idea.  You can now use ̀N' and `P' to go to the next/previous agenda
item.  `2 N' will move by two agenda items down.

Thanks for this idea,

-- 
 Bastien



Re: [O] are super-hidden technical blocks required?

2012-08-07 Thread Ilya Shlyakhter

On 8/6/2012 2:16 PM, Allen S. Rout wrote:

One common use would be to store the creation  last-modification dates
of each entry.  I've tried various ways of doing it and they all were
too obtrusive to use on _every_ entry.   Time-stamping of all entries
would be extremely useful, just as time-stamping of files is.
But I don't want to see the timestamps during normal Org usage.


As a user, if your code is decorating my tree, I want to know it.  If
you hide it, I'd be mad.   Org is my life in plain text, not WordPerfect
with reveal-codes.


For decorations that change behavior, e.g. export options or inherited 
properties, sure.
But meta-information such as creation/modification times or unique node 
ids, which do not change behavior and are known to be associated with 
every node, displaying them is a distraction.  If you already know that
every node has a creation time, what is added by seeing a :PROPERTIES: 
line for that node?  If anything, it obscures nodes that do have unique

properties you want to know about.






Re: [O] are super-hidden technical blocks required?

2012-08-07 Thread Ilya Shlyakhter

On 8/2/2012 11:10 AM, Bastien wrote:

If the whole point is to make some properties less visible,
why not a solution based on fontification?

We could have a user-defined regexp to highlight (or dim)
certain properties.


That would still leave the :PROPERTIES: line visible, which is problem
for universal properties assigned to every entry.


I don't believe in a solution that would change the current
flow of cycling through drawers.  I feel that's too much.


I agree.  Showing hidden drawers is a rarely-used operation and should
be a separate command, not part of the commonly-used cycling.





Re: [O] Nice theorem display ?

2012-08-07 Thread Bastien
Hi Joon,

Joon Kwon condor...@hotmail.com writes:

 I'm wondering if there is a simple way to make the buffer display
 theorem environements (for instance) in a nice way...

 For instance, if I have the following code :
 #+begin_theorem
 My theorem
 Bla bla bla
 #+end_theorem

 I would like the buffer to display something like :

 Theorem : 
  | My theorem
  | Bla bla bla
  +

(defun my-format-theorem-blocks ()
  Format theorem blocks in org.
  (interactive)
  (save-excursion
(goto-char (point-min))
(while (re-search-forward #\\+begin_theorem nil t)
  (let ((beg0 (match-beginning 0))
(beg (1+ (match-end 0)))
(end0 (save-excursion
(re-search-forward #\\+end_theorem nil t)))
(end (match-beginning 0))
content c)
(setq content (split-string (buffer-substring beg end) \n t))
(delete-region beg0 end0)
(insert Theorem :\n)
(while (setq c (pop content))
  (insert (format  | %s\n c)))
(insert  +\n)

M-x my-format-theorem-blocks RET

But this in a one-way only... no return.

HTH,

-- 
 Bastien



Re: [O] [PATCH] Let org-agenda-time-grid control if the grid is displayed

2012-08-07 Thread Bastien
Hi Christophe,

Christophe Junke junke.christo...@gmail.com writes:

 * lisp/org-agenda.el (org-agenda-list): ensures that the
 list returned by org-agenda-add-time-grid-maybe is appended
 to rtnall before checking if the latter is emtpy.

I've now applied this patch.  

Thanks for the clear explanations and the changelog.

-- 
 Bastien



Re: [O] fast todo kw / - x

2012-08-07 Thread Samuel Wales
Hi Bastien,

On 8/2/12, Bastien b...@gnu.org wrote:
 Actually I was wrong.  All characters are supported for fast
 todo selection, except @ / and !.  I've fixed the manual and
 the docstring.

Excellent, thank you!

Samuel

-- 
The Kafka Pandemic: http://thekafkapandemic.blogspot.com



Re: [O] comment bug

2012-08-07 Thread Samuel Wales
On 7/31/12, Nicolas Goaziou n.goaz...@gmail.com wrote:
 I just committed a complete implementation of comments, compatible with
 `comment-dwim'.  Does it behave as expected?

comment-dwim works properly.  However, when you use it in the middle
of a list, it
splits the list into two lists.

Thanks.

Samuel

-- 
The Kafka Pandemic: http://thekafkapandemic.blogspot.com



Re: [O] Nice theorem display ?

2012-08-07 Thread Joon Kwon
Bastien bzg at gnu.org writes:

 But this in a one-way only... no return.
 
 HTH,
 

Hi Bastien,

Thank you for answering !

But what I want is to keep the real file as it is, in order to export it to
LaTeX later.
I just want the buffer to display it differently...
Do you know how to do that ?

Joon





Re: [O] Comments and control lines (# vs. #+)

2012-08-07 Thread Samuel Wales
This is excellent!

Samuel

On 8/2/12, Bastien b...@gnu.org wrote:
 Yes it has been.   If you pull from latest repo, the way comments
 are handled have been updated.  Specifically, there is no #+ 
 anymore.  Please check carefully and let us know.

-- 
The Kafka Pandemic: http://thekafkapandemic.blogspot.com



Re: [O] Add the capture feature %(sexp) to org-feed

2012-08-07 Thread Bastien
Hi Michael,

Michael Brand michael.ch.br...@gmail.com writes:

 Thank you for the help. I have chosen the solution with require org-capture.

 The patch is now finished and attached:

I've reworked some parts of your patch, specifically, I used
`org-at-regexp-p' instead of `org-capture-inside-embedded-elisp-p'.

Can you check this is working okay for you?

Thanks!

From 35e5c3d0b098dc65f321cc32626172e984cf2c2f Mon Sep 17 00:00:00 2001
From: Bastien Guerry b...@altern.org
Date: Wed, 8 Aug 2012 01:01:29 +0200
Subject: [PATCH] org-feed.el: Add the capture feature %(sexp).

* org-feed.el (org-feed-format-entry): Support %(sexp).
(org-feed-default-template): Update docstring to document the
support of %(sexp).

* org-capture.el (org-capture-template-embedded-elisp-re): New
constant.
(org-capture-eval-and-replace-embedded-elisp): New function.
(org-capture-fill-template): Use the new function.
---
 lisp/org-capture.el |   25 ++-
 lisp/org-feed.el|   56 ++-
 2 files changed, 53 insertions(+), 28 deletions(-)

diff --git a/lisp/org-capture.el b/lisp/org-capture.el
index 05e3a0c..352e655 100644
--- a/lisp/org-capture.el
+++ b/lisp/org-capture.el
@@ -74,6 +74,9 @@
 ;; to indicate that the link properties have already been stored
 (defvar org-capture-link-is-already-stored nil)
 
+(defconst org-capture-template-embedded-elisp-re
+  %\\((\\(.\\|\n\\)*)\\))
+
 (defgroup org-capture nil
   Options concerning capturing new entries.
   :tag Org Capture
@@ -1277,6 +1280,18 @@ Lisp programs can force the template by setting KEYS to a string.
 	   '((C Customize org-capture-templates)
 		 (q Abort))
 
+(defun org-capture-eval-and-replace-embedded-elisp ()
+  Evaluate embedded elisp %(sexp) and replace with the result.
+  (goto-char (point-min))
+  (while (re-search-forward org-capture-template-embedded-elisp-re nil t)
+(unless (org-capture-escaped-%)
+  (goto-char (match-beginning 0))
+  (let ((template-start (point)))
+	(forward-char 1)
+	(let ((result (org-eval (read (current-buffer)
+	  (delete-region template-start (point))
+	  (insert result))
+
 (defun org-capture-fill-template (optional template initial annotation)
   Fill a template and return the filled template as a string.
 The template may still contain \%?\ for cursor positioning.
@@ -1371,15 +1386,7 @@ The template may still contain \%?\ for cursor positioning.
 	  (error (insert (format %%![Couldn't insert %s: %s]
  filename error)))
   ;; %() embedded elisp
-  (goto-char (point-min))
-  (while (re-search-forward %\\((.+)\\) nil t)
-	(unless (org-capture-escaped-%)
-	  (goto-char (match-beginning 0))
-	  (let ((template-start (point)))
-	(forward-char 1)
-	(let ((result (org-eval (read (current-buffer)
-	  (delete-region template-start (point))
-	  (insert result)
+  (org-capture-eval-and-replace-embedded-elisp)
 
   ;; The current time
   (goto-char (point-min))
diff --git a/lisp/org-feed.el b/lisp/org-feed.el
index 6901ffa..912dd6e 100644
--- a/lisp/org-feed.el
+++ b/lisp/org-feed.el
@@ -225,12 +225,15 @@ Any fields from the feed item can be interpolated into the template with
 %name, for example %title, %description, %pubDate etc.  In addition, the
 following special escapes are valid as well:
 
-%h  the title, or the first line of the description
-%t  the date as a stamp, either from pubDate (if present), or
-the current date.
-%T  date and time
-%u,%U   like %t,%T, but inactive time stamps
-%a  A link, from guid if that is a permalink, else from link
+%h  The title, or the first line of the description
+%t  The date as a stamp, either from pubDate (if present), or
+The current date.
+%T  Date and time
+%u,%U   Like %t,%T, but inactive time stamps
+%a  A link, from guid if that is a permalink, else from link
+%(sexp) Evaluate the Elisp sexp `(sexp)' and replace with the result.
+The above simple %-escapes can be used as arguments,
+for example %(capitalize \\\%h\\\)
   :group 'org-feed
   :type '(string :tag Template))
 
@@ -506,9 +509,10 @@ This will find DRAWER and extract the alist.
 ENTRY is a property list.  This function adds a `:formatted-for-org' property
 and returns the full property list.
 If that property is already present, nothing changes.
+  (require 'org-capture)
   (if formatter
   (funcall formatter entry)
-(let (dlines fmt tmp indent time name
+(let (dlines time escape name tmp
 		 v-h v-t v-T v-u v-U v-a)
   (setq dlines (org-split-string (or (plist-get entry :description) ???)
  \n)
@@ -527,20 +531,34 @@ If that property is already present, nothing changes.
 		  ))
   (with-temp-buffer
 	(insert template)
+
+	;; Simple %-escapes before embedded elisp to support simple
+	;; %-escapes as arguments for embedded elisp
 	(goto-char (point-min))
 	(while (re-search-forward %\\([a-zA-Z]+\\) 

Re: [O] Nice theorem display ?

2012-08-07 Thread Bastien
Hi Joon,

Joon Kwon condor...@hotmail.com writes:

 But what I want is to keep the real file as it is, in order to export it to
 LaTeX later.
 I just want the buffer to display it differently...
 Do you know how to do that ?

Yes, I know how to do that but I'm not sure this will be useful to
someone else, so I won't spend time on this.  Sorry!  

-- 
 Bastien



Re: [O] Smart Quotes Exporting

2012-08-07 Thread Bastien
Hi Mark and Nicolas,

in the patchwork¹, I've marked patches² related to this discussion as
Not Applicable.

If there are progress made on this front, please send updated patches.
If there is a patch below that I should apply, please let me know.

Thanks!

¹ http://patchwork.newartisans.com/project/org-mode/list/
² Here are the patches:

http://patchwork.newartisans.com/patch/1330/
http://patchwork.newartisans.com/patch/1344/
http://patchwork.newartisans.com/patch/1346/
http://patchwork.newartisans.com/patch/1348/

-- 
 Bastien



Re: [O] Nice theorem display ?

2012-08-07 Thread Thomas S. Dye
Joon Kwon condor...@hotmail.com writes:

 Hi,

 I'm a new orgmode user and I am really enjoying it, especially for
 writing LaTeX documents.

 I'm wondering if there is a simple way to make the buffer display
 theorem environements (for instance) in a nice way...

 For instance, if I have the following code :
 #+begin_theorem
 My theorem
 Bla bla bla
 #+end_theorem

 I would like the buffer to display something like :

 Theorem : 
  | My theorem
  | Bla bla bla
  +

 I guess this must not be difficult for elisp programmers ...

 Joon
 

Aloha Joon,

Welcome to Org mode.

The #+begin_theorem ... #+end_theorem pair doesn't appear in the Org
mode manual.  Presumably, you are using org-special-blocks to generate
\begin{theorem} ... \end{theorem} environments in LaTeX?  IIUC, then
this means you have declared \newtheorem{theorem}{LabelText} somewhere,
so that a structure like \begin{theorem} ... \end{theorem} will actually
be compiled by LaTeX?  This is almost certainly an unusual use case and
it is not likely that it is one that could be anticipated by the Org
mode software.

A more typical use case is something like this:

#+BEGIN_LaTeX
\begin{equation}
\alpha \dots \omega
\end{equation}
#+END_LaTeX

Org mode recognizes this as a LaTeX fragment.  With point inside the
fragment, pressing C-c C-x C-l will generate a preview and display it in
your Org mode buffer.  The operation can be reversed with C-c C-c.

I'm glad to hear you enjoy writing LaTeX documents in Org mode.  This is
something I enjoy, too.  Org mode will soon become a much more powerful
environment for authoring LaTeX (and other) documents, when Nicolas
Goaziou's new exporter moves fully into the Org mode core.

hth,
Tom
-- 
Thomas S. Dye
http://www.tsdye.com



Re: [O] [babel] ob-java error org-babel-execute-src-block: Wrong type argument: characterp, -cp .

2012-08-07 Thread Torsten Wagner
Hi Eric,

AAGGG now I remember I participated in that discussion
to replace #+BABEL by #+PROPERTY.
that is the pitfall if you reuse stuff only once a year and heavy
development goes on in the mean time ;)

Thanks for the reminder and yeah now all works out ok.

Just as a note to myself and maybe others who read this...

#+PROPERTY: :mkdirp t
#+PROPERTY: :cmpflag -cp .
#+PROPERTY: :cmdline -cp .

This is what is needed to set the flags for the java environment

#+BEGIN_SRC text :tangle ./item1.txt
A
B
C
#+END_SRC

This blocks allow you to TANGLE files which you might need to test
your code (simulate input etc.)
The problem here... you need to TANGLE them... NOT execute them.

So now it works again. The problem was a PEBKAC...

Thanks Eric

Torsten



Re: [O] [PATCH] Change to next/previous-line in org agenda

2012-08-07 Thread Eric Abrahamsen
On Wed, Aug 08 2012, Bastien wrote:

 Hi Eric,

 Eric Abrahamsen e...@ericabrahamsen.net writes:

 I'm not sure people will actually want this change, but I like it, so
 I'm providing a patch. All this does is change org-agenda-next-line and
 org-agenda-previous-line so that they move by agenda items, and not by
 actual lines.

 I like it too -- I implemented it differently, but this is the same
 idea.  You can now use ̀N' and `P' to go to the next/previous agenda
 item.  `2 N' will move by two agenda items down.

 Thanks for this idea,

Great! Looks like I have more to learn about org internals…

-- 
GNU Emacs 24.1.50.1 (i686-pc-linux-gnu, GTK+ Version 2.24.11)
 of 2012-08-06 on pellet
7.8.11




Re: [O] Change: no longer automatically evaluate embedded elisp in code block output Was: babel awk with table input: Code block produced no output.

2012-08-07 Thread Greg Minshall
...
 For this reason I've just pushed up a change which does as you suggest
 and inhibits lisp evaluation in the `org-babel-import-elisp-from-file'
 function which is only used to import emacs-lisp results from code
 blocks.
...
 This will now report the error with a message, but will still return nil
 for the table cell's value.

thanks, and thanks!