Re: [O] Agenda restrict to buffer

2012-07-12 Thread andrea crotti
2012/7/12 Bastien :
>
> (defun my-org-agenda-command ()
>   (interactive)
>   (org-agenda-set-restriction-lock 'file)
>   (org-agenda nil "%"))
>
> Note that you need to be in your .org file for this to work, so this
> isn't really suited for a global keybinding, only for org-mode-map.
>
> HTH,
>
> --
>  Bastien


Nice thanks I'll give it a try..
I can maybe switch to the buffer automatically and run that, as I was
trying to do before.
Just for curiosity, why the lispy arguments are deprecated?



[O] Agenda restrict to buffer

2012-07-11 Thread andrea crotti
I never quite understood how to pass arguments to org-agenda without
using it interactively..
I want a simple thing, a command that shows the agenda with the TODO
entries from a given file

So supposing the buffer "projects.org" is open I tried this:

(defun my-org-agenda ()
  (interactive)
   (switch-to-buffer (get-buffer "projects.org"))
   (org-agenda :arg 'agenda :restriction '<))

which complains for
Wrong number of arguments: (lambda (&optional arg keys restriction)
"Dispatch agenda commands to collect entries to the agenda buffer.

Any suggestions?



Re: [O] [PATCH] org-goto before headline

2012-02-12 Thread Andrea Crotti

On 02/10/2012 02:42 PM, Toby Cubitt wrote:

On Fri, Feb 10, 2012 at 02:19:27PM +, Andrea Crotti wrote:

What is exactly the reason for org-goto to need to be at least in the
first headline to work?

I always get this error when I just try to jump in the first line:
byte-code: Before first headline at position 1 in buffer ..

Do you by any chance have `org-goto-interface' set to
outline-path-completion (or are you using org-goto with a prefix
argument)?

If so, I've also come across this problem. I think it's a bug in
org-goto, which should pass NO-EXCLUDE to org-refile-get-location (but
doesn't). The attached patch fixes this for me (or you can pull the
"org-goto" branch from http://www.dr-qubit.org/git/org-mode.git).

HTH,

Toby

Is the patch already pushed to master then?
Just to check, it would be sad if it gets lost in the way..



Re: [O] [PATCH] org-goto before headline

2012-02-10 Thread Andrea Crotti

On 02/10/2012 02:42 PM, Toby Cubitt wrote:

On Fri, Feb 10, 2012 at 02:19:27PM +, Andrea Crotti wrote:

What is exactly the reason for org-goto to need to be at least in the
first headline to work?

I always get this error when I just try to jump in the first line:
byte-code: Before first headline at position 1 in buffer ..

Do you by any chance have `org-goto-interface' set to
outline-path-completion (or are you using org-goto with a prefix
argument)?

If so, I've also come across this problem. I think it's a bug in
org-goto, which should pass NO-EXCLUDE to org-refile-get-location (but
doesn't). The attached patch fixes this for me (or you can pull the
"org-goto" branch from http://www.dr-qubit.org/git/org-mode.git).

HTH,

Toby


Yes it was set to that..
I've tried the patch and it works perfectly here!
3 minutes to get a bug-fix is quite amazing ;)



[O] org-goto before headline

2012-02-10 Thread Andrea Crotti
What is exactly the reason for org-goto to need to be at least in the 
first headline to work?


I always get this error when I just try to jump in the first line:
byte-code: Before first headline at position 1 in buffer ..

Couldn't it jump anyway or maybe go to first headline if the not there yet?

I've updated from git just now to try again:
Org-mode version 7.7 (release_7.8.03.330.gc804)



Re: [O] just made orgmode-7.8.02

2011-12-29 Thread Andrea Crotti

On 12/29/2011 07:02 PM, Jude DaShiell wrote:

Then perhaps something more is wrong.  I downloaded orgmode-7.8.02 and
installed that after having run the standard gitclone command to clone
org-mode on this system.  I did that because the gitclone process pulled
version 5.23 for me and also created my git repository for me in that
process.  I don't know how or why that happened but it was a satellite
connection yesterday and not my usual cable connection.


Maybe you're cloning the right repository but ending up using the shipped
version in Emacs anyway?

What is your configuration to use git org-mode from the git repository?



Re: [O] back to a multiple-file configuration

2011-12-17 Thread Andrea Crotti
On 12/12/2011 07:43 AM, Gustav Wikström wrote:
> I've also had this problem, but this related to the use of multiple
> computers and more than one OS that all needed some specific tweaks to
> be able to run. I'm also using org-babel for my init. A section from
> my init.org  follows below (warning for wall of
> text). Maybe this relates to your thoughts and if so lets hope it adds
> some value.
>
>

Thanks for sharing..
Well my conclusion is that is just a bad idea.
Literate programming is great but for other things, as for example
scientific work very dense
of hard to grasp concepts.

If I need many lines to explain some elisp function it normally means
that it's really badly written,
and I just need to rewrite it better.
One thing which is much harder with the single org file is to have
different kind of profiles.

The only way would be to actually tangle to some files and load them on
demand when needed,
but then there is no point in using org-babel in the first place..
And then it's really hard to debug, because since they are not separate
modules is was
almost impossible to understand what was going on, now that I switched
to many smaller
files I solved all my latent problems..


Re: [O] back to a multiple-file configuration

2011-12-10 Thread Andrea Crotti
On 12/10/2011 06:31 PM, Andrea Crotti wrote:
> For quite a long time I had my emacs configuration in a big org-mode
> file (https://github.com/AndreaCrotti/Emacs-configuration).
>
> The file has is more than 3500 lines now, and I think the experiment has
> failed in a sense.  The problem is that this even if this style is great
> to produce nice documents and add a lot of useful text, is quite bad to
> actually write modular code.
>
> I rely quite heavily on the order in which things are declared for
> example, instead of having different libraries to load.
>
> So I guess I will switch to a multiple files structure again, which is
> more "programmer friendly in a sense".
> Anyone else had similar experiences?

It's quite a hard task to migrate more than 3500 lines :S
This little function is helping a lot, I replace all the :tangle yes
setting the right destination name for the given block,
so at least I do the first big transiction with org-babel..

(defun ca-replace-with-file (fname)
 (interactive "sWith String:?\n")
 (let ((fname (format "modules/ca-%s.el" fname)))
   (query-replace ":tangle yes" (concat ":tangle " fname))
 ))



[O] back to a multiple-file configuration

2011-12-10 Thread Andrea Crotti
For quite a long time I had my emacs configuration in a big org-mode
file (https://github.com/AndreaCrotti/Emacs-configuration).

The file has is more than 3500 lines now, and I think the experiment has
failed in a sense.  The problem is that this even if this style is great
to produce nice documents and add a lot of useful text, is quite bad to
actually write modular code.

I rely quite heavily on the order in which things are declared for
example, instead of having different libraries to load.

So I guess I will switch to a multiple files structure again, which is
more "programmer friendly in a sense".
Anyone else had similar experiences?



[O] fill-paragraph?

2011-12-09 Thread Andrea Crotti
I lilke the fill-paragraph behaviour that I get in org-mode, and I was 
wondering

if I could use it also in other modes.
Using (turn-on-orgstruct) doesn't change the behaviour, and actually how 
does it

work?

I mean M-q in org-mode is still bound to the exact same function, how 
come it

behaves differently?

For example I would like to be able to refill comments in python without 
messing

up the list structure:

# TODO
# - see how to handle possible interconnected links between different 
projects

# - add some ways to declare more possible branches
# - the name of the protocol is not necessary unless it's HTTP

Ideas?



[O] pylint to org reporting

2011-12-07 Thread Andrea Crotti

Since I've been studying PyLint a little bit I tried to write my own
reporter, and in particular I wrote a reporter that writes in org-mode
;)

For example running (on a random source file):
org_pylint_reporter.py src_obj_check.py
I get something like:

* TODO 
[[file:/home/andrea/pydbgr/PIL.PcdImagePlugin.py::49][PIL.PcdImagePlugin]] 
:W0511:
* TODO 
[[file:/home/andrea/pydbgr/PIL.PcdImagePlugin.py::1][PIL.PcdImagePlugin]] 
:C0111:


Where the tag is the error and then we have a nice "jumpable" org-link
to the offending line.

Not sure what to do with it yet, but something cool like bug tracking in
org-mode might come out of this, hope it's of inspiration for someone
else at least :)

The whole script is here:
https://github.com/AndreaCrotti/scripts/blob/master/org_pylint_reporter.py



Re: [O] FR: revivable marks in agenda

2011-10-13 Thread Andrea Crotti

On 10/13/2011 05:57 PM, Samuel Wales wrote:

On 2011-10-13, Andrea Crotti  wrote:

Well in general you should use some revision control system,

Those do not store things that never save to disk.


Sorry I don't understand the answer...
If you're talking about tags and orgmode, how is it possible that is not 
stored to disk?




Re: [O] FR: revivable marks in agenda

2011-10-13 Thread Andrea Crotti

On 10/13/2011 03:41 AM, Samuel Wales wrote:

I have an agenda view for urgent and now tags.  I just spent a lot of
time choosing which ones to mark to remove the tags.  I then did B -
to remove the tags.

I was a little too quick and told it to remove urgent.  It did not
offer the possibility to remove more than one that I know of.  This
meant that all of the marks I did on now disappeared.  :(

I wonder if we should have revivable marks (a command revives them).

In this case, and also for speed, it would be useful to be able to
specify more than one tag to remove.

Samuel



Well in general you should use some revision control system,
(git bzr mercurial fossil you have a large choice).
In this way you can safely modify things and be sure that
you can get back what you lost in case you make a mistake..



[O] underscore behaviour

2011-10-13 Thread Andrea Crotti
I use names with "_" very often, and I like to export to PDF, because 
it' the one that looks nicest.


But the _ in latex means something different, and I find my output a bit 
messed up.
Isn't it possible to add an automatic quote for every "_" when exporting 
to latex/pdf maybe?


Or is there a better way to write things like function names "__init__" 
or similar?




Re: [O] do it today, or well, tomorrow

2011-10-12 Thread Andrea Crotti

On 10/12/2011 04:55 PM, Carsten Dominik wrote:


An alternative is to use the scheduling mechanism.

* TODO My Task
   SCHEDULED:<2011-10-12 Wed>

This task will automatically be forwarded to the following day, until it is 
done.

- Carsten



Fantastic!
I only see the habit page on the manual now, but it has to be enabled,
and the "SCHEDULED" setting has to be done by hand right?
Maybe I should use a capture template for that?

And it's not very clear how do I set an habit on a task, when I run
org-habit-toggle-habits it opens me the agenda buffer, instead of doing 
something in

the current task as I (wrongly) expected.



Re: [O] do it today, or well, tomorrow

2011-10-12 Thread Andrea Crotti

On 10/12/2011 03:54 PM, Dave Abrahams wrote:

Binding `org-agenda-date-later' to a key like `f' ought to work out for
you.



'f' is already bound to next-week, and it's also quite useful.
Shift-right work great thanks!
The problem is that shift-arrow in general is a disputed key for me,
so I have to use M-- / M-+ to get the same result, not a big deal anyway.

Thanks everyone



[O] do it today, or well, tomorrow

2011-10-12 Thread Andrea Crotti
There is a nice little app for android called "do it tomorrow", where
you can plan easily for one day, and move them to the next day easily.

I was trying to do the same in org-mode, so my idea is that:
- in the morning I fill some tasks which I should do during the day
- at night I move to the next days the ones which were not finished

(maybe the "DONE" flag should be set automatically in case they're
trivial or the explanation might go somewhere else).

The problem is that from the agenda view I can't easily move a task to
the next day, is anyone doing anything like this?

Thanks,
Andrea



[O] broken links

2011-10-10 Thread Andrea Crotti

Just to mention, that on this page
http://orgmode.org/GoogleTech.html

the links below that bring to the presentation pdf/swf are broken..



[O] pycallgraph to org-mode

2011-10-05 Thread Andrea Crotti

I'm programming in Python and I have to understand how a quite complicated
code base actually works.

So I thought that using pycallgraph might help me, but the resulting figures
are just normally too big, and also it's annoying to go and look at the code
from the graph.

So I had the following idea, add some functionalities to pycallgraph, to 
create

a text file in org-mode format, where in every function there is also a link
the actual file in the filesystem.

I think it might come very handy, is there anything already to convert a 
graphviz

directed graph into an org-mode file (it might speed up the process)?
Or any code I should take a look at?



Re: [O] rst-mode tables

2011-09-26 Thread Andrea Crotti
Achim Gratz  writes:

>
> Which is why you can switch between table.el and org tables with C-c C-c
> (to recognize an existing table) and then C-c ~ to convert it between
> the two formats if possible.  You do lose some formatting going back and
> forth, though.

Very nice thanks a lot!
True some formatting is lost, but already just org-mode-tables.el
automatic conversion is quite nice, and might come handy.



Re: [O] rst-mode tables

2011-09-21 Thread Andrea Crotti

On 09/21/2011 10:23 AM, Jambunathan K wrote:

Andrea Crotti  writes:


I'm writing in RST a lot of documentation, and I noticed that
RST-tables are very similar to org-mode tables.

This makes me think that I could use happily turn-on-orgtbl and use
it, but the tables are not exactly the same.

++---+---+---+
| THi is | table |   |   |
++---+---+---+
||   |   |   |
++---+---+---+

I think table.el tables look like this.




Didn't know about that, thanks!
It's not, however, as convenient as org-mode tables are unfortunately...



[O] rst-mode tables

2011-09-21 Thread Andrea Crotti
I'm writing in RST a lot of documentation, and I noticed that RST-tables 
are very similar to org-mode tables.


This makes me think that I could use happily turn-on-orgtbl and use it, 
but the tables are not exactly the same.


++---+---+---+
| THi is | table |   |   |
++---+---+---+
||   |   |   |
++---+---+---+

One difference is in the use of "+", is there a way to make orgtbl 
produce something like this too?

//


Re: [O] Git merge tool for Org files

2011-08-20 Thread Andrea Crotti

On 08/20/2011 04:42 PM, Carsten Dominik wrote:

I have no idea, but I would think that it could also be written in Perl,
for example.



Yes from what I understand from the source it can be any executable
that outputs things as git expects them.
There are no compile time dependencies on git as far as I see.

So maybe why not writing it (even a prototype) directly in Elisp?
That would solve many things right?




Re: [O] Git merge tool for Org files

2011-08-20 Thread Andrea Crotti

On 08/18/2011 12:45 PM, Carsten Dominik wrote:

Hi,

I was wondering if anyone here has the skills and interest to write
a git merge driver for Org mode files, in the way


http://git.savannah.gnu.org/gitweb/?p=gnulib.git;a=blob;f=lib/git-merge-changelog.c

does this for GNU style ChangeLog files?

One of the obstacle for using Org-mode for collaborative programs is that
many operations add or remove text from the beginning or end of a file,
or which add or remove a subnode from an outline tree.
These are operations that confuse the git merger, in particular
if two people have added something to a file, or removed/added
sequential sibling nodes.

I believe that this could be solved with a dedicated merge driver
that understands the integrity of an outline (sub)tree, and that
knows that the sequence of two new subtrees added by different people
does not matter.

The idea for this is actually (I believe) from Brian Gough who asked me
about it at FOSDEM.  I have now also run into this problem and would
really find it great if such a merge driver could be written.
Unfortunately, I do not have the skill for this.

- Carsten

Does the merge driver need to be written in C?
It looks quite a complex task considering that org-mode files
are not so easy to parse...

Anyway a partly unrelated thing, with git attributes I'm able
to see the diff of crypted org files very easily (maybe someone
is interested), adding to .git/config:

[diff "gpg"]
  textconv = gpg2 --decrypt

and to .gitattributes:
*.gpg diff=gpg



Re: [O] patch org-mode Makefile - solve a couple debian build problems and a slackware build problem

2011-07-08 Thread Andrea Crotti
Bastien  writes:

>
> Indeed.  I'll apply every patch that
>
> - doesn't break current Makefile commands
> - does add a new func (even tiny) for specific distro
>
> Please send some :)

One way to make the whole deployment really portable could also be to
pass from plain Makefile to the autoconf beast.  This would also be good
to detect the Emacs version and existing external libraries which maybe
needed.

A few other extensions already do and I think it would decrease greatly
the amount of code needed (even if it would increase the "hidden
complexity").



[O] Bug in #+INCLUDE?

2011-07-07 Thread Andrea Crotti
I experienced a weird behavior when including a C++ file, and after an
update to the latest revision of org-mode the problem is still there.

It's very simple to reproduce, with a test.org and test.cpp file as
attached, trying to export to pdf (and latex) org-mode puts in the
output file "footnote definition not found".

The problem I think is that it tries to evaluate the footnote in
expressions like:
my_map[0] = 1;

But it should not since it's just a raw file inclusion.

Another thing since I'm here, I'm still seeing all the compilation
warnings relative to "interactive-p", but if I check the source code
where I see the warnings I see the new macro.

And I don't see how the macro can expand to interactive-p since already
the first condition is satisfied.
--8<---cut here---start->8---
 (if (or (> emacs-major-version 23)
--8<---cut here---end--->8---

my_map[0] = 1;
#+INCLUDE: "test.cpp" src C++

Org-mode version 7.6 (release_7.5.591.g9c05)
GNU Emacs 24.0.50.1 (x86_64-apple-darwin10.7.0, NS apple-appkit-1038.35)
of 2011-06-24


Re: [O] [babel] python sessions

2011-07-03 Thread Andrea Crotti
Eric Schulte  writes:

>
> From what I hear the situation should improve in Emacs24, as there is a
> ground up re-write which should contain much of the functionality of
> python-mode.el with the Emacs-amenable license of python.el.
>

Nice to know, I use python-mode.el and emacs24, but I would vote for a
merge :)

>
> The eoe string will only even appear in session output when there is no
> other result returned by the code block.  I've just pushed up a small
> change which should fix this situation.
>
> The eoe will never appear in tangled code as it is part of the
> interactive session evaluation.
>
> Best -- Eric

I think the last patch created some problems, now it often (but not
always and I can't get why) when I execute the source block, and still I
can't make it work the previous example that I posted...

Thanks,
Andrea



Re: [O] [babel] python sessions

2011-07-03 Thread Andrea Crotti
Eric Schulte  writes:
>
> This is true, in addition to being a language which is dependent upon
> whitespace characters, python has been tricky due to the many
> independent inferior python modes (python.el, python-mode.el, etc...)
> and to the fact that I personally and not very familiar with the
> language.

That is indeed a problem (also in cedet for example) and I really would
like to have just one and working well python mode, not a thousand.. 

>
> I've just pushed up a patch which should improve upon the python session
> behavior.  After this patch your example returns the following
> results...
>
> #+begin_src python :session :results silent
>   def var(x):
>   return float(x ** 2)
> #+end_src
>
> #+begin_src python :session :result value
>   def var2(x):
>   return x ** 2 * var(x)
>   
>   var2(10)
> #+end_src
>
> #+results:
> : 1.0
>

That example now works like a charm
But here still I get that string, but if I tangle the file I get the
correct result, any idea?

--8<---cut here---start->8---
#+begin_src python :session :tangle myset.py :results silent
  class MySetList(object):
  
  def __init__(self):
  self._set = []
  
  def add(self, el):
  if el not in self._set:
  self._set.append(el)
  
  # implementation of other typical set functions
#+end_src

#+begin_src python :session :tangle myset.py :results silent
  class MySetDict(object):
  
  def __init__(self):
  self._dic = {}
  
  def add(self, el):
  if el not in self._dic:
  # we only care about the keys
  self._dic[el] = None
#+end_src

#+begin_src python :session :tangle myset.py :results silent
  class MySetSet(object):
  def __init__(self):
  self._set = set()
  
  def add(self, el):
  self._set.add(el)
#+end_src


#+begin_src python :session :exports both :tangle myset.py
  import timeit
  import random
  
  NUM_ELS = 100
  
  
  def add_many_to_set(set_type):
  m = set_type()
  for i in range(NUM_ELS):
  m.add(i)
  
  
  def test_impl(set_type):
  to_import = """
  from __main__ import add_many_to_set
  from __main__ import %s"""
  
  name = set_type.__name__
  print("testing %s" % name)
  return timeit.timeit("add_many_to_set(%s)" % name,
   setup=(to_import % name))
  
  
  test_impl(MySetList), test_impl(MySetDict), test_impl(MySetSet)
  
#+end_src
--8<---cut here---end--->8---



[O] [babel] python sessions

2011-07-03 Thread Andrea Crotti
I wanted to use sessions in python to do some nice literate programming
and splitting functions, but it doesn't work as expected.

Here below a very simple example in python and ruby, where in ruby
everything seems to work well while in python it doesn't...
And by the way, what is that org_babel_python_eoe? I can't find it
documented anywhere in the manual...

I've read some time ago that python support for babel was a bit tricky,
are there workarounds to make it work anyway?

Or could you explain briefly what the problem is so that I can try to
contribute as soon as I finish this thing?

Thanks a lot,
Andrea

--8<---cut here---start->8---
#+begin_src python :session
  def var(x):
  return float(x ** 2)
  
#+end_src

#+results:
: org_babel_python_eoe

#+begin_src python :session
  def var2(x):
  return x ** 2 * var(x)
  
  var2(10)
#+end_src

#+results:
: org_babel_python_eoe

#+begin_src ruby :session
  def fun(x)
x + 2
  end
#+end_src

#+results:
: nil

#+begin_src ruby :session
  def fun2(x)
x + fun(x)
  end
  
  fun2 10
#+end_src

#+results:
: 22

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



[O] beamer code and auctex

2011-03-22 Thread Andrea Crotti
I'm trying to put some nicely colored code in my org-beamer
presentation.

On one machine I have minted but it's not found and the other is not
installed, but I guess that's a latex problem.
With lstlisting it kind of work but the font is way too big and not very
nice, but I'll try again maybe to see if I can get it better...

The problem is that I use auctex for latex files, and the first time it
asks a value for the tex-master file.

Isn't it possible to disable this and why does it asks since I'm using
pdflatex directly, right?

Thanks,
Andrea



Re: [O] java snippet code not exported

2011-03-21 Thread andrea crotti
2011/3/21 Eric S Fraga :
> Andrea Crotti  writes:
>
> This works just fine for me.  No errors at all and the code (html)
> generated seems fine.  Try latest git version maybe in case the problem
> has somehow been fixed in the 30+ commits made 2since the version you
> used?
>

Right it works also for me now on linux with a bit younger version of org.
I should try on OSX again and see if it's maybe it's something else...

Anyway another issue which is still related to exporting.
The other day it took me a long time to understand why
#+begin_src c
#+end_src

was not working, and in the end the solution was simply to use

#+begin_src C
#+end_src

the problem is that with the capital "C" emacs doesn't find a C-mode and thus
I don't get the right mode to write code with.

But the main question is, does it make sense to make that particular
string case sensitive?

How could
#+begin_src Language and #+begin_src lanGuage do different things?

Thanks a lot,
Andrea



[O] java snippet code not exported

2011-03-20 Thread Andrea Crotti
I was carrying around this issue since long time, but today I finally
understood what exactly the source is.

Suppose I have this very simple orgfile, if I try to export it to html I
get the error as below.  Can anyone else reproduce it?  I guess is
font-locking problem but that should be a perfectly valid (even if
perfectly useless java snippet).


--8<---cut here---start->8---
title

#+begin_src java
  import static org.junit.Assert.*;

#+end_src
--8<---cut here---end--->8---


--8<---cut here---start->8---
Debugger entered--Lisp error: (args-out-of-range 106 113)
  put-text-property(106 113 face font-lock-type-face)
  c-fontify-recorded-types-and-refs()...
--8<---cut here---end--->8---

Thanks,
Andrea

--
Org-mode version 7.5 (release_7.5.60.g706a)



[O] org-passwords

2011-03-15 Thread Andrea Crotti
Last week I finally wrote all my passwords in a crypted org file, using
properties and column mode.

This is very nice, and taking inspiration from the wonderful
org-contacts, I decided to open on github org-passwords.

https://github.com/AndreaCrotti/org-passwords

This VERY simple initial version already basically works, asking name of
the service, username and password and storing it in a (hopefully)
cypted file.

Now it would be nice to make it easy to fetch and modify passwords.
Another thing which I'm a bit "annoyed" is that keeping crypted files
under git, I never see the real diff since the files are binary.

Do maybe some of you found a way to see a text diff even on crypted
files?

PS. anyone is welcome to send suggestions/patches also to me directly if
interested...



[O] Abstract

2011-03-08 Thread Andrea Crotti
Is the abstract section somehow supported in org-mode?
I can easily write
* Abstract

but for example then it goes into the index and it gets numerated if
"num:t" in the #+OPTIONS.
thanks,
Andrea



Re: [O] [Org-contacts] 3 2 1 go?

2011-03-08 Thread Andrea Crotti
Julien Danjou  writes:

>
> Well, do not count on me for that. I use git, it does the job. :)

Sure I also do ;)
For synchronization I meant between different programs/protocol not
different machines...

When everything will work it won't be too necessary, but at least to
switch to some importers are necessary imho.

>
> Well, I had some but they are defcustom anyway, so there's no standard.
> I do not want to put too much obligation on the format used, because
> Org-mode is about organizing stuff the way you want.
>
> For example, some people might want to cut the address part in
> (STREET,ZIPCODE,CITY,COUNTRY) whereas I think it's a burden, I just put
> a LOCATION property with all the address in it. In the end, it does not
> matter for org-contacts.

I agree on that sure, but it would not harm to define some templates of
fields to make it immediately usable as a full "normal" address book.

> Sure that'd be cool. But I don't have such a phone unfortunately, so
> can't help. :)

I'll try something out as soon as possible, I'm sick of my actual
situation...



Re: [O] [Org-contacts] 3 2 1 go?

2011-03-08 Thread Andrea Crotti
Julien Danjou  writes:
> You can set any properties anyway. Org-contacts just use some of them.
>
> For example I use LOCATION as a property to store my contacts' home
> addresses, which I usually set using C-c M-L provided by
> org-google-maps[1].
>
> Just say out loud what you'd like to do, I'll try to answer or write
> code. :)
>
> [1]  http://julien.danjou.info/google-maps-el.html

That's also very nice thanks.
Well the only thing that I would really love to have is a real working
synchronization mechanism, and a real address book with all the
interesting fields for everyone.

The fields I can also set them myself but maybe would be nice to define
some standard fields which can be set and are automatically recognized.

The once that is done, it would be easier to write some code to
synchronize org-contacts to AddressBook/gmail contacts/vcf and even more
important my android phone.

With org-mobile it might even make sense to update the address book
every time I push something ;)



Re: [O] [Org-contacts] 3 2 1 go?

2011-03-07 Thread Andrea Crotti
About the script used to import from AddressBook.app, I update it here
https://github.com/AndreaCrotti/scripts/blob/master/contacts_to_org.py

Now it creates as many contacts for the name as many as the email
addresses.
One thing I haven't found in fact is how to support multiple emails, is
that too hard to do?

Anyway in general I think I will use the VCF exported data instead, also
because "contacts" is not very smart itself and a bit annoying to fetch
all the single fields.

A simple import mechanism (from csv for example) might be good to have
directly inside org-contacts.el, what do you think?



Re: [O] [Org-contacts] 3 2 1 go?

2011-03-05 Thread Andrea Crotti
Michael Käufl  writes:

> No it's not.  As you can see here [1], Julien Danjou has already started
> to inlucde more features.  For now org-contacts supportes mail addresses
> and irc nicknames.  And I'm sure a lot more will follow.
>

Good to know :)
So I think I will avoid trying BBDB after all, I can start with this already.

I have a first thing working well enough for the translation, I use
contacts to get the fields: http://gnufoo.org/contacts/contacts.html

It's very stupid now since it only takes one email and no other fields,
but it's ready for enhancements.
Anyway it 

--8<---cut here---start->8---
#!/usr/bin/env python

"""
Get the contacts with http://gnufoo.org/contacts/contacts.html
 and print out a org-contacts valid output
"""

import subprocess

FMT = [("first name", "fn"),
   ("last name", "ln"),
   ("home mail", "he"),
   ("work mail", "we"),
   ("other mail", "oe"),
   ("birthday", "b")]

cmd = "contacts -H -S -f '%s'" % (';'.join('%' + x[1] for x in FMT))

proc = subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE)
out, err = proc.communicate()

org_contact_template = """* %s
:PROPERTIES:
:EMAIL:   %s
:END:
"""

for line in out.splitlines():
s = line.split(';')
if s[2]:
print org_contact_template % (' '.join((s[0], s[1])), s[2])
--8<---cut here---end--->8---



[O] [Org-contacts] 3 2 1 go?

2011-03-05 Thread Andrea Crotti
So I finally setup gnus after reading some thousand of pages of manuals,
now the only thing which is missing is an address book...

I tried out org-contacts and it looks great, also because from my
understanding BBDB has never been included in the Emacs default
distribution and it's quite old..

So is there also a way to get all the contacts from my OSX address
book?
I can export to vCard and then it should not be hard to convert all the
mails, but maybe someone already scripted that?

The thing I'm wondering more is, is org-contacts only thought for mail
addresses?

Because I would really like to have a complete address book support from
the command-line/Emacs to get rid of the stupid osx AddressBook.app, but
it doesn't look that the purpose is this, right?

Thanks for the great job :)
Andrea



[Orgmode] Exporting to html

2011-02-09 Thread Andrea Crotti
I have a quite huge file with a lot of code blocks in many possible
languages.
Now the problem is that I'm not able to export it to html/pdf.
Some other times it happened that pdf export was not working, but it was
quite easy to spot the mistake and fix it.

But with html export I'm not understanding where is the error, since I
don't get the line...
The funny thing is that the 2 lines that I can see downthere from the
debugger ("import static..." and "..jython..") are now *deleted* from
the buffer.

So where are they still coming from? (I also deleted the previously
created html file).

Maybe it would be useful to have some system to spot easily the line
that causes trouble during exportation, and even better would be to see
it visually in the org-buffer if something could cause troubles...

Here below the backtrace..
Thanks!


Debugger entered--Lisp error: (args-out-of-range 137 150)
  put-text-property(137 150 face font-lock-type-face)
  c-fontify-recorded-types-and-refs()
  #[(match-pos inside-macro) "`\306`\307\"\310=\203\311
!\204R\nSf\312>\203|\neX\203$\313\202~\306\nS\314\"\211\315=\2035\316\202x\f\317=\204C\nSf\320=\203H\321\202x\f\203Q\313\202x
\203\\\n)W\202`\n*W\203v\316\nS+\322+\211T\314\315$\210)\202x\313)\202~\323,\205\206\313=-\324\n.#\211/\203R/\325=\203\241`.\202M
\203\262`)V\203\274`)\202\274`*V\203\274`*/@b\210\203\nSf\326=\205\212\nSb\210\327
 
\210\330\331!\332W\2040\333=\205`1\334\323x\332W\203\n\335\323x\332W\203\n\3112!\203\n\332\2251Y\203\n\336\2021b\210\323)\205\3113!)\202\336\2114\203C\212\327
 \210o\204B`S+\322+\211T\314/A\203>\337\202?\340$\210))\341d4/A#\210)\342 
\210\323\207b\210\343\336\n\323#\2115\205\2605\344=\203\200\3226\2117@@)6\2117@A)\3078$\210\202\2545\345=\203\237\3226\2117@@)6\2117@A)\307\310$\210\202\2545\346=\203\254\347\3506\"\210\3236\336\207"
 [start-pos c-not-decl-init-keywords match-pos context type inside-macro 
get-text-property face font-lock-keyword-face looking-at (40 44 91 60) arglist 
c-type c-decl-arg-start decl c-<>-arg-sep 60 <> put-text-property nil 
c-forward-decl-or-cast-1 cast 40 c-backward-sws skip-syntax-backward "w_" 0 
pike-mode "-!%&*+/<=>^|~[]()" "`" t c-decl-type-start c-decl-id-start 
c-font-lock-declarators c-fontify-recorded-types-and-refs c-forward-label 
goto-target qt-1kwd-colon qt-2kwds-colon mapc #[... "\301@A\302\303$\207" 
[kwd put-text-property face font-lock-keyword-face] 5] 
max-type-decl-end-before-token max-type-decl-end -pos- c-recognize-<>-arglists 
c-restricted-<>-arglists last-cast-end decl-or-cast c-buffer-is-cc-mode pos 
...] 6](0 nil)
  c-find-decl-spots(36 "[[:alpha:]_]" (nil font-lock-type-face 
font-lock-constant-face font-lock-keyword-face) #[(match-pos inside-macro) 
"`\306`\307\"\310=\203\311   
!\204R\nSf\312>\203|\neX\203$\313\202~\306\nS\314\"\211\315=\2035\316\202x\f\317=\204C\nSf\320=\203H\321\202x\f\203Q\313\202x
\203\\\n)W\202`\n*W\203v\316\nS+\322+\211T\314\315$\210)\202x\313)\202~\323,\205\206\313=-\324\n.#\211/\203R/\325=\203\241`.\202M
\203\262`)V\203\274`)\202\274`*V\203\274`*/@b\210\203\nSf\326=\205\212\nSb\210\327
 
\210\330\331!\332W\2040\333=\205`1\334\323x\332W\203\n\335\323x\332W\203\n\3112!\203\n\332\2251Y\203\n\336\2021b\210\323)\205\3113!)\202\336\2114\203C\212\327
 \210o\204B`S+\322+\211T\314/A\203>\337\202?\340$\210))\341d4/A#\210)\342 
\210\323\207b\210\343\336\n\323#\2115\205\2605\344=\203\200\3226\2117@@)6\2117@A)\3078$\210\202\2545\345=\203\237\3226\2117@@)6\2117@A)\307\310$\210\202\2545\346=\203\254\347\3506\"\210\3236\336\207"
 [start-pos c-not-decl-init-keywords match-pos context type inside-macro 
get-text-property face font-lock-keyword-face looking-at (40 44 91 60) arglist 
c-type c-decl-arg-start decl c-<>-arg-sep 60 <> put-text-property nil 
c-forward-decl-or-cast-1 cast 40 c-backward-sws skip-syntax-backward "w_" 0 
pike-mode "-!%&*+/<=>^|~[]()" "`" t c-decl-type-start c-decl-id-start 
c-font-lock-declarators c-fontify-recorded-types-and-refs c-forward-label 
goto-target qt-1kwd-colon qt-2kwds-colon mapc #[... "\301@A\302\303$\207" 
[kwd put-text-property face font-lock-keyword-face] 5] 
max-type-decl-end-before-token max-type-decl-end -pos- c-recognize-<>-arglists 
c-restricted-<>-arglists last-cast-end decl-or-cast c-buffer-is-cc-mode pos 
...] 6])
  c-font-lock-declarations(36)
  font-lock-fontify-keywords-region(1 36 t)
  font-lock-default-fontify-region(1 36 t)
  font-lock-fontify-region(1 36 t)
  byte-code("\212\303 \304\216\305ed#\210\306 \210\307\211+\207" 
[save-match-data-internal verbose font-lock-fontified match-data ((byte-code 
"\301\302\"\207" [save-match-data-internal set-match-data evaporate] 3)) 
font-lock-fontify-region font-lock-after-fontify-buffer t] 4)
  font-lock-default-fontify-buffer()
  font-lock-fontify-buffer()
  org-export-format-source-code-or-example(html "java" "import static 
org.junit.Assert.*;\n\n" " " 0 nil)
  org-export-replace-src-segments-and-examples(html)
  org-export-preprocess-str

[Orgmode] CV with org?

2011-02-07 Thread Andrea Crotti
Long time ago I wrote my CV with latex and the currvita package.

Now before I just modify that maybe some of you has a better option to
create it in org-mode.

I can still use currvita in orgmode of course, but if there is a better
option I would be glad to hear it :)
Thanks


___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: Back from FOSDEM

2011-02-07 Thread Andrea Crotti
Bastien  writes:

> Hi all,
>
> we have had a good time at FOSDEM.  It was great to meet Carsten, Stefan
> Vollmar, Sebastien Vauban, Jose E. Marchesi, Brian Gough and others.
>
> Special thanks to Stefan, who presented a very nice use cas at his lab,
> and to Sébastien who presented a few Org Babel examples.  Org cannot be
> presented without Org Babel.
>
> The devroom was fully packed, which is about 100 people.  I expected to
> "introduce" Org and to try to convert some people, but about 70% of the
> audience was already using Org!  So the presentation was really a mix of
> generalities and a live demo of some features (to be honest: I was a bit
> stressful and tired, I wish I did a better job.)

I was there and you all did a great job, thanks!

The only things that could be made better imho is the readability.
The font was too small for all three presenters, and the minibuffer
unreadable already from the middle of the room.

Also something to popup the keys (is there anything like growl for
linux) would be very useful in this kind of presentation

>
> Note for later: when talking to hackers, forget about the slides and
> have direct fun with an Org-mode buffer, display the *magic* of with no
> taboo -- questions will come along as you hit some neat feature.

Not totally sure, some slides for giving the same background to everyone
are always useful, and they increase the hype and curiousity to see the
tool in practice.

I think that in general hackers always don't stand very well magic, they
would always like to know what key was pressed, what command given and
so on to do them by themselves.

>
> I've put my slides here:
>
>   http://lumiere.ens.fr/~guerry/u/org-fosdem-presentation-beamer.pdf
>
> One point I made : what's special about Org is that it's a reflexive
> tool, one that lets you discover the way you work and the way you want
> to work.  Forget about getting "disciplined" by some external digital
> secretary, start by having fun discovering yourself with a tool that 
> has virtually no learning curve (or "just" that of Emacs itself...) 
>

Yes that was a very nice point, might steal it in the future ;)


___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: GNU devroom at FOSDEM 2011

2011-02-02 Thread Andrea Crotti
Carsten Dominik  writes:

> Hi everyone,
>
> I will be at the meeting on Saturday, and I hope to meet some of you!
> If you have an org-mode T-Shirt - I think it would be fun to wear
> it - I will.
>
> Most of all, I will be very pleased to finally meet Bastien in person.
>
> - Carsten
>

I will be there too and happy to meet who changed my life (well at least
from the productivity point of view).

@Bastian: if you use OSX and growl maybe you could find this useful for
the presentation:

--8<---cut here---start->8---
(defun growl-popup (msg)
  "Pop up a growl notification with MSG, or display an Emacs message.
The \"growlnotify\" program is used if `window-system' is non-nil and
the program is found in `exec-path'; otherwise `message' is used."
  (interactive)
  (if (and window-system (executable-find "growlnotify"))
  (shell-command (concat "growlnotify -a /Applications/Emacs.app/ -m "
 (shell-quote-argument msg)))
(message msg)))

(defun popup-last ()
  (interactive)
  (let
  ((last-key (key-description (this-command-keys
;; check if we don't have a "stupid" sequence
(unless
(= (length (this-command-keys-vector)) 1)
(growl-popup last-key

;TODO: make it an external package and better a minor-mode, switching would 
also be much easier
 
(setq growl-mode nil)

(defun growl ()
  (interactive)
  (if (not growl-mode)
  (progn
(message "enabling growl mode notification")
(add-hook 'pre-command-hook 'popup-last)
(setq growl-mode t))
(progn
  (setq-default pre-command-hook (remq 'popup-last pre-command-hook))
  (message "disabling growl mode notification")
  (setq growl-mode nil
--8<---cut here---end--->8---

In this way people can see what you are pressing (all commands with at
least two keys).


___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: Suppressing src block evaluationon publish?

2011-02-01 Thread Andrea Crotti
Loris Bennett  writes:

> Hi,
>
> I have an org file containing several src blocks which generate images
> using ditaa. When I publish to PDF via LaTeX, the images are all
> generated every time, which makes publishing rather slow.
>
> Is there some way to toggle the evaluation of the src blocks on and off
> when the file is published?
>
> Thanks
>
> Loris

What I do 


___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: Suppressing src block evaluationon publish?

2011-02-01 Thread Andrea Crotti
Loris Bennett  writes:

> Hi,
>
> I have an org file containing several src blocks which generate images
> using ditaa. When I publish to PDF via LaTeX, the images are all
> generated every time, which makes publishing rather slow.
>
> Is there some way to toggle the evaluation of the src blocks on and off
> when the file is published?
>
> Thanks
>
> Loris

Sorry for the other mail I pressed a C-c C-c too much.
What I do normally is to put the graphs in another file and then include
only the link in the file that I want to export.

In case I change something I can still remember to do C-c C-c on the
graph...


___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: Overlays and elisp code

2011-02-01 Thread Andrea Crotti
Jeff Horn  writes:

> I can reproduce this. emacs 23.1 and org 7.4
>

Good that I'm not alone :)
Another thing is that also changing mode in the overlay messes things
up, but that's not an orgmode fault I think, it's just how they work...


___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Overlays and elisp code

2011-01-31 Thread Andrea Crotti
I found a strange behaviour which might be a bug, but maybe of my
configuration.

This is org mode version:
Org-mode version 7.4 (release_7.4.199.g8be1.dirty)
and emacs:
"GNU Emacs 23.2.1 (x86_64-apple-darwin10.3.0, NS apple-appkit-1038.29)
 of 2010-05-09 on linc"

To reproduce the bug I do
- go over an elisp code block
- C-c ' to edit in the overlay
- C-c ' to go back when done

And it works perfectly, BUT if for example I remove a parenthesis before
pressing C-c ', I can't go back.

C-c ' becomes undefined and I have to kill both the overlay and the
original buffer.

While I was writing I also found the cause of the problem, Paredit!
Removing the hook from emacs-lisp-mode-hook fixes this, but paredit is
really useful with elisp, maybe someone has an idea of why this happens?


___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] org-latex and figures

2011-01-27 Thread Andrea Crotti
I could not understand why on earth my pdf had all the images after the
whole document.
Then I found this:

http://www.eng.cam.ac.uk/help/tpl/textprocessing/float_hint.html

and found out that the default for a figure was
\begin{figure}[ptb]

while in the generated latex file from org I had
\begin{figure}[htb]

So I changed to the default and now it works fine...
Isn't that default maybe a bit dangerous?

The fact is that if the first image doesn't fit "here" it will be
printed late and all the others after.

I might also just use the latex code here for these things, I don't care
to export to other formats, it's just nicer to look if it's in org syntax


___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: [BEAMER] make text fit in a slide

2011-01-20 Thread Andrea Crotti
Chris Malone  writes:

> Hi Andrea,
>
> In the example I showed, I set the block to an =ignoreheading= block by
> using =C-c C-b i=.  This, as best I can tell, generates a block but
> comments out the part which gives the block its title.  Doing this
> overrides the "alertblock" heading, so I'm not entirely sure how to
> combine the two to do what you are asking.
>
> Chris

I also tried that and I saw it doesn't work...
Actually a normal block would be also fine, but the ignoreheading block
doesn't "box" my text in a different background color as the normal
block does.

So it's a bit different, not exactly like a block which ignores the
heading.

I think I solved this issue already a very long time ago, but went
completely out of my mind...

Is it also possible to have one part of a frame fixed while one other
part (a block/column) changes its content?

\pause writes things after, doesn't substitute the content, so I guess
something else is needed...


___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: [BEAMER] make text fit in a slide

2011-01-20 Thread Andrea Crotti
Chris Malone  writes:

> Hi Andrea,
>
> Here I can help some :).
>
> What I have done in the past is take advantage of the fact that org-mode
> will close a beamer =columns= environment if the column width is set to 0
> (or 1):
>
> --
> ** What is a Type I X-ray
> Burst?   
>  
> *** ignore   
> :BMCOL:B_ignoreheading:  
>  
> :PROPERTIES:  
>   :BEAMER_col:
> 0.33 
>   :BEAMER_env:
> ignoreheading
>   :BEAMER_envargs:
> C[t] 
>  
> :END: 
> - Low Mass X-ray
> Binaries  
> *** ignore   
> :BMCOL:B_ignoreheading:  
>  
> :PROPERTIES:  
>   :BEAMER_col:
> 0.3  
>   :BEAMER_env:
> ignoreheading
>  
> :END: 
> - Accretion of H and/or
> He 
> *** ignore   
> :BMCOL:B_ignoreheading:  
>  
> :PROPERTIES:  
>   :BEAMER_col:
> 0.4  
>   :BEAMER_env:
> ignoreheading
>  
> :END: 
> - Ignition at base of accreted
> layer   
> *** close columns
> :BMCOL:B_ignoreheading:  
>
> :PROPERTIES:   
>  :BEAMER_col:
> 0 
>  :BEAMER_env:
> ignoreheading 
>
> :END:  
> *** data 
> :B_ignoreheading:BMCOL:   
>
>  
> :PROPERTIES:  
>   
>   
>   :BEAMER_env:
> ignoreheading 
>   
>  
>   :BEAMER_envargs:
> C[T]  
>   
>  
>   :BEAMER_col:
> 0.4   
>   
>  
>  
> :END: 
>   
>   
> whatever else I want
> --
>
> This creates a "row" on the top of the frame that has 3 columns of widths
> 0.33, 0.3, and 0.4.  Then to close that "row" I made the =close columns=
> header with a column width of 0.  The next header, =data= starts another
> "row" and its column width is set to 0.4 giving room for another column to
> its right if I so choose.

Great thanks a lot.
Too bad that things really start to become complicated with the
syntax...

Another last thing, if I want a block (for example an "alertblock") is
there a way to not having the heading line?

I mean
** Thanks:B_block:
   :PROPERTIES:
   :BEAMER_env: alertblock
   :END:

   *Thanks you all*

I would like not to see the initial Thanks...
For latex is perfectly fine but how do I say that to org-beamer?


___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: [BEAMER] make text fit in a slide

2011-01-20 Thread Andrea Crotti
chris.m.mal...@gmail.com writes:

> Hi Andrea,
>
> I stand corrected - you are getting a lot of useful information here! :-)
>

Yes true :)
Thanks everyone, the "per frame" setting is perfect.
And since I'm here another thing I'm not getting.

If I want to have a situation like this below

+--+-+
|  | |
|  | |
|  | |
|  | |
|  | |
|  | |
+--+-+
||
||
||
||
||
++


with two columns on top and then text, how do I achive this with
org-beamer?
I don't understand how to "quit" from the last environment use staying
in the same frame...


___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: [BEAMER] make text fit in a slide

2011-01-20 Thread Andrea Crotti
iem...@gmail.com writes:

> Hi Andrea,
>
> I use the following line to allow frame breaks
>
> #+BIND: org-beamer-frame-default-options "[allowframebreaks]"

Perfect nice, but now I also get
"Slide I" for all the slides, even if there isn't a second one...
I might only need it in one case (for the bibliography) actually...


___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] [BEAMER] make text fit in a slide

2011-01-19 Thread Andrea Crotti
Would it be possible with some trick to automatically make the font
resize when the frame doesn't fit in the slide?

Or maybe would that be possible otherwise to split the slide in two
parts automatically?

I always wondered how to do it but never really found out.
And how do I in general could have a section of text in a smaller font?


___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: Bibtex and beamer

2011-01-19 Thread Andrea Crotti
Jeff Horn  writes:

> On Wed, Jan 19, 2011 at 4:14 PM, Andrea Crotti
>  wrote:
>> Only one thing is not clear, how do I tell org-mode to call
>> pdflatex/bibtex "enough" times to get all the links correctly setup.
>
> If you're using a *nix system, you might try customizing
> `org-latex-to-pdf-process` with "texi2dvi".
>
> I've been having intermittent issues with bibtex and beamer. Not sure
> what did it on my end, but I flip between "texi2dvi" for
> beamer/latex/bibtex usage, and "shell command sequence" (what you
> mention) for publishing PDFs on my personal website (like my CV).

Thanks a lot, with this

(setq org-latex-to-pdf-process '("pdflatex -interaction nonstopmode 
-output-directory %o %f" "bibtex %b" "pdflatex -interaction nonstopmode 
-output-directory %o %f" "pdflatex -interaction nonstopmode -output-directory 
%o %f"))

It works quite well, even if it looks like an hack, but I can avoid
using texi2dvi I think...

It takes some time though for the whole process, and sometimes only one
run of "pdflatex" would suffice.
Is it so hard to have a smarter check for how and what passes are
needed?

Is not enough to check if all the references are satisfied?

And another thing, why do I have to setup a default citation file?
(setq reftex-default-bibliography "cit")

In theory from my understanding reftex should grep this in my file
\bibliography{cit}

and open that file to see the citations, is that not correct?


___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Bibtex and beamer

2011-01-19 Thread Andrea Crotti
I'm doing a presentation and using bibtex for keeping my references,
exactly how I will use it in the dissertation.

That's really wonderful and it works like a charm, using reftex-citep
and an external bibliography file.

Only one thing is not clear, how do I tell org-mode to call
pdflatex/bibtex "enough" times to get all the links correctly setup.

I didn't get it working, and only calling manually
- pdflatex
- bibtex
- pdflatex
- pdflatex

on the generated I could get the correct references...


___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: Disputed keys

2010-12-20 Thread Andrea Crotti
Suvayu Ali  writes:

>
> I think Andrea meant to say switching window. But none the less, Emacs
> has the ability to switch frames, `C-x 5 o' or even your regular
> switch-buffer'. But I think it does it by talking to the window
> manager.
>
> This can be very useful when you have multiple emacs frames for one
> instance of emacs on different desktops. If you have configured your
> window manager appropriately simply switching to a buffer shown on
> another desktop can switch you to that desktop and raise the Emacs
> frame with the buffer. :)

I meant switching frames...
I normally would keep the frames in the same desktop, maybe different
instances of emacs on different desktops (I have one for gnus and one
for everything else).

An example of a window manager configuration to do this anyway?


___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: Disputed keys

2010-12-20 Thread Andrea Crotti
Stefan Vollmar  writes:

> Dear Andrea,
>
> I have this in my .emacs file
>
> (defun my-org-mode-stuff ()
>   (define-key org-mode-map [(meta tab)] 'previous-user-buffer)
>   (local-set-key (kbd "S-") 'forward-char-mark)
>   (local-set-key (kbd "S-") 'backward-char-mark)
>   (local-set-key (kbd "S-") 'previous-line-mark)
>   (local-set-key (kbd "S-") 'next-line-mark))
>
> (add-hook 'org-mode-hook 'my-org-mode-stuff)
>
> this was a suggestion from the list (thanks to PT 
> ) and works for me, I realize that this was not 
> exactly what you were asking for but thought it might help.
>

I'm quite sure that also would work for me, that's the normal way to
proceed.
But since org-mode has this disputed-keys feature which is quite a good
idea I wanted to use it if possible...

Looks like that the key meta-left which would be bound to "other-frame"
is not seen as used by org-mode, that's my explanation...


___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: Disputed keys

2010-12-20 Thread Andrea Crotti
Eric S Fraga  writes:

>
> Isn't switching to frame a function of your window manager and not
> emacs?  That is, shouldn't this be a case of telling your window manage,
> whatever that may be, to switch frames when these keys are pressed?
>
> Or am I missing something fundamental here?

Well yes and no, I could many programs running, and I want a key that
lets me switch only between the emacs frames, without showing me the
other windows.

Having that working it would be even better that the operating system
only show me one instance of emacs frames, not all of them.


___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Disputed keys

2010-12-18 Thread Andrea Crotti
I wanted finally to fix the following problem, I would like to use
meta-left/right to switch frame, and that's one of the keys that orgmode
uses.

I added the two values here to the org-disputed-keys

--8<---cut here---start->8---
[(meta left)]
Value: [(meta control left)]
[(meta right)]
Value: [(meta control right)]
--8<---cut here---end--->8---

but still it doesn't work, in orgmode meta-left is always bound to the
org action, not to other-frame as it is in other modes...

Any suggestions?


___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] org beamer conflicts

2010-12-10 Thread Andrea Crotti
I noticed a strange problem.
My emacs configuration uses orgmode from git, and loads it in this way:

(defun make-conf-path (path)
  (expand-file-name (concat base path)))

(add-to-list 'load-path (make-conf-path "org-mode/lisp"))
(add-to-list 'load-path (make-conf-path "org-mode/contrib/babel/lisp"))
(add-to-list 'load-path (make-conf-path "org-mode/contrib/babel/lisp/langs"))

;; this variable must be set BEFORE org-mode is loaded or it will have no effect
(setq org-replace-disputed-keys t)

(require 'org)

On an ubuntu 10.10 machine (with emacs 23.1) I wanted to use org-beamer,
and even if locate-library told me that I was using the right orgmode
(not the one shipped in) the variable org-export-latex-classes didn't
contain the entry "beamer", and then I could not export my presentation.

I fixed it using instead of require->load-file, but what I don't
understand is why it was using the other version, when locate-library
told me something else.

Any idea?


___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: TODO hooks

2010-08-16 Thread Andrea Crotti
Jan Böcker  writes:

>
> Just make a checklist somewhere:
>
> * DONE Notify people of my current address
> - [X] Y
> - [X] Z
> - [X] W
>
> When your address changes, change the todo state to TODO and do M-x
> org-reset-checkbox-state-subtree to uncheck all the boxes.
>
> Of course, you still have to remember to do that, but don't have to
> remember /who/ you have to notify (because you can add to this list
> whenever you give your address to someone new).
>
> If that does not accomplish your goal, please provide more detailed
> explanation of what Org should do to help you in this situation.
>
> -- Jan
>

Yes this sounds good already thanks.
I was also just wondering in general if it could be done something more
general.

That's more an elisp problem though, for example when the result of the
command
ls -l  | grep  == 1
add something to the agenda.


___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] TODO hooks

2010-08-16 Thread Andrea Crotti
After another time that I forgot something I came up with the same idea.

Suppose I live in address X, and whenever I change my address I have to
notify Y, Z, W.

Now how could I handle this automatically?
I would like that, whenever my address changes I get a todo telling me
to contact Y, Z, W.

Is it possible to do anything like that in org-mode?
Maybe with org-babel and elisp, but there should also maybe an
elisp-hook on the change of that text...

Any idea, other people feelt my same need from time to time?


___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: From todos to tracking

2010-08-12 Thread Andrea Crotti
Bastien  writes:

> Andrea Crotti  writes:
>
>> I was wondering if there is something that would be able to convert a
>> org-mode buffer (with todos) to a web page (even static) that resembles
>> a tracking system.
>>
>> I don't mean also the way back (writing from the web page to the org
>> mode) but also one way it would be nice, because TODO in the normal html
>> exportation don't really resembles TODO in a tracking system...
>
> Can you be more specific?


Something like this
http://it.wikipedia.org/wiki/File:Kde-bugtracking-via-bugzilla-firefox-1.0.6-kde-3.4.2-de.png
I mean of course we need to give to it many more informations, but at
least the state is there, the message also and the number could be
generated.

Something like
org-export-todo-to-tracking

could have some variables to set and given a normal page prodouce
something like the figure.
But maybe it doesn't make sense I'm not sure...


___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] From todos to tracking

2010-08-12 Thread Andrea Crotti
I was wondering if there is something that would be able to convert a
org-mode buffer (with todos) to a web page (even static) that resembles
a tracking system.

I don't mean also the way back (writing from the web page to the org
mode) but also one way it would be nice, because TODO in the normal html
exportation don't really resembles TODO in a tracking system...



___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: Finally jekyll and org-jekyll

2010-08-12 Thread Andrea Crotti
Ian Barton  writes:

>>
> Hi Andrea,
>
> I don't use org-jekyll myself. You can view my tutorial on the way I
> di it at http://orgmode.org/worg/org-tutorials/org-jekyll.php
> . Basically what you need to do is to organize your system so that org
> publishes your .org files to html in a place that jekyll can process
> them.
>
> Are you trying to write a blog ie. posts ordered in date format, or a
> static web site, or a combination of both? If you can tell me exactly
> what you want to achieve, I'll try and help out.
>
> Ian.

Thanks, I would like to have a mixed approach, but also just a blog with
articles might be perfectly fine for now.

So reading again I think I got it, I create the index.html showing the
lasts posts (for example), I eventually add some CSS and then I export
the org-files in the right place.

Org-jekyll helps giving the right name to the html files so that is
automatically recognized by jekyll.
Then I want to export it to github pages, but that should be already
set up correctly.

Is that correct?
A not about the tutorial (which is very clear): you should quote the "_"
otherwise, like
\_posts or project\_name
for example.

Thanks a lot


___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Finally jekyll and org-jekyll

2010-08-11 Thread Andrea Crotti
I've been struggling for already too much time and I really don't get
anywhere the few informations I need.

I want to finally build my page with jekyll and org-mode, and I also
have org-jekyll which looks pretty cool, but anything I tried until now
didn't work

The question basically is, what do I have to write myself and what will
be automatically written?

I see that jekyll wants something like this below, but do I need to
define alli those things even using org-jekyll?

I also tried the test example in org-jekyll but all I get is the same
files repeated again in the directory.

--8<---cut here---start->8---
|-- _config.yml
|-- _layouts
|   |-- default.html
|   `-- post.html
|-- _posts
|   |-- 2007-10-29-why-every-programmer-should-play-nethack.textile
|   `-- 2009-04-26-barcamp-boston-4-roundup.textile
|-- _site
`-- index.html
--8<---cut here---end--->8---

Any simple in two words explanation that could finally enlighten me
please?
Thanks a lot


___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Strange error in html exporting

2010-08-01 Thread Andrea Crotti
I just updated today to
--8<---cut here---start->8---
Org-mode version 7.01trans (release_7.01g.55.g0cafa.dirty)
--8<---cut here---end--->8---
and I found many nice new features, great job!

The gantt exporting is real cool, pity the program only runs on linux
apparently.

Anyway only one minor problem, if I try to export to html a file with a
lot of code (also other java snippets) and this:

#+begin_src java
  import static org.junit.Assert.*;
#+end_src

I get an error (see below).
If I just remove this apparently innocuous snippet everything works
again, what could that be?

I pasted the error here anyway:
http://gist.github.com/503607

Another thing (not related but I think is very small)
if "~/Documents/pycon/conf/org-mode/share/info" I have 
there my
--8<---cut here---start->8---
Directory /Users/andrea/Documents/pycon/conf/org-mode/share/info/
dir org
--8<---cut here---end--->8---
compiled from "make install-info"

shouldn't I be able to see the right info page?

It's very funny because whatever I do I always see the info for version
6.33, and I don't know where it comes from since I also deleted the old
installations.

And my "system" org-mode info is 4.something so it's not even that...

Thanks a lot, Andrea

PS. by the way, I've never needed to have htmlize before but now I had
to install it, was it maybe included in org-mode before?


___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] [org-BEAMER] block without header

2010-07-29 Thread Andrea Crotti
I don't find how I can get something translated as

\begin{block}{}
where the header of the block is empty and get more space below.
There is also an option for ignoreheading but it only works with BMcol,
and if I don't write anything there it doesn't work...

Now I ended with something ugly like this but still the bar remains
--8<---cut here---start->8---
* __:B_block:
  :PROPERTIES:
  :BEAMER_env: block
  :END:
--8<---cut here---end--->8---


Any help?
Thanks a lot

PS. I would like to get it done since I pushed so much to use beamer
with my 2 collegues that they should not find some points to attack
it :D


___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: Nice links bookmarks

2010-07-27 Thread Andrea Crotti
I meant exactly what Eric said, footnote.el is quite cool in fact.
But we can achieve the same result with org-mode (even in his minor-mode
version), so why don't use it?

With this variable moreover we get the same style:
(setq org-footnote-auto-label 'plain)

The only thing that puzzles me is the fact that with C-c I should go
back in the text while in message-mode it will try to send it, BUT
looking at what the command does we get:

--8<---cut here---start->8---
C-c C-c runs the command orgtbl-ctrl-c-ctrl-c
--8<---cut here---end--->8---

Does that mean that in the minor mode it passes the control on the major
mode for keys?

Could it not be possible to execute the footnote command with C-c if
we're on a footnote and message-mode command otherwise?
Thanks


___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: Installation - no way

2010-07-27 Thread Andrea Crotti
Have a look also here
http://www.ourcomments.org/Emacs/EmacsW32Util.html
It looks a bit old and I'm not sure it contains org-mode but it should
be a bit easier for beginners.

It will be quite hard anyway if you don't use it every day for some time
to grasp the main concepts.



___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: word count checklist?

2010-07-27 Thread Andrea Crotti
I feel that maybe a minor mode would be a good choice for this.
You could set a file variable (something like
// -*- compile-command: "gcc -Wall -o dest file" -*-
)
where you set the max and the minor mode with a hook on every key could
update a value in the modeline.

I'm not sure I can do it but I might try if I don't get asleep :D


___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Nice links bookmarks

2010-07-27 Thread Andrea Crotti
I was wondering how many people add nice links in the footnotes like [1]

I use "turn-on-orgstruct" and "turn-on-orgtbl" when I write messages and
I suspect that it could be an orgmode feature, but I could not find it.

If I add a footnote I get a similar result but not exactly the same...
Thansk a lot

[1] www.fakelink.com





___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: Let's TALK about it

2010-05-18 Thread Andrea Crotti
"Eric Schulte"  writes:
> So, I hope it goes well, and I'd second Tom's point that if you do end
> up working Org-mode/babel into your talk we'd love to see a video and/or
> hear how it was received.

Ok finally I did the talk...
Unfortunately it had to be in italian and I have no video yet, BUT
I've set up an emacs configuration with org-mode for the talk which now
I've extended quite a lot
http://github.com/AndreaCrotti/Emacs-configuration

you might be interested to give it a look.

I want to do something very generic that everyone can use, setting its
own private variables somewhere else (for example in custom.el).


The slides I've used are in the file "slides.org", they're not many
because the talk had to be mainly interactive, but I've finally really
appreciated the org-beamer stuff, great job really!

Thanks for the help


___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: Automatic clock-in

2010-04-20 Thread Andrea Crotti
Benjamin Andresen  writes:

> Hey Andrea,
>
>
> Maybe C-u M-x org-clock-in RET does what you want.
>
> br,
> benny

Ah great that's really nice, I always forget to try the magic C-u
first...
So by the way what is the real function called when prefixing C-u?
I mean, can I call it directly?

I see that (universal-argument) is a function but it doesn't take any
argument actually...



___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Automatic clock-in

2010-04-19 Thread Andrea Crotti
I'm using more and more the very nice clock functions provided by
org-mode.
I added this
--8<---cut here---start->8---
(global-set-key "\C-c\C-x\C-o" 'org-clock-out)
--8<---cut here---end--->8---

So I can clock out from every buffer without problems.
It would be nice somehow to have a similar thing for clock in also.
It's not so easy of course but most of the I clock in in the same buffer
that I last clocked out.

There could be a default choice which brings you there and otherwise
asks you to which buffer you want to clock in, something like that.

Or is there another better way to do already what I'm asking?



___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: Let's TALK about it

2010-04-19 Thread Andrea Crotti
Andrea Crotti  writes:

> My talk has been accepted :)
> So now I really have to prepare something!
>
> I thought that for showing the power of org-mode and babel I could use
> something I already have
>

No news?
Here I'm also putting some slides, they should just contains list of
things.
I'm doing them in Beamer, it could be a good way to show another usage
of org-mode.

But actually I don't know if it's a good thing, after all they're just a
few slides so it might be better to make something more graphically
nice, what do you think?

For the interactive part, would be better to show different things in
separate examples or all of them in a more complex file?

What about some sort of unit testing with tables/formulas/org-babel all
together?

Could be nice to generate a table with some checks that pass only if we
get some results from the code which is automatically executed, what do
you think?



___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: Freemind exportation

2010-04-12 Thread Andrea Crotti
Friedrich Delgado Friedrichs  writes:

> Hi!
>
> The freemind exporter works nicely now.
>
> If you use org-freemind.el from a recent git, it should just work.
>
> Otherwise you'd need to give us a bit more information.
>

Ok good to know, now I tried and the exportation goes fine, but if I
open it with Freemind 8.1 it's like an empty file.

With Freemind 9 instead it complains that the format it's old, so I
confirm the translation to the new format and everything works fine.

So there is something wrong I don't know where...
And by the way the header of the file is
--8<---cut here---start->8---


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

So why should freemind 0.9 complain?
I'm using a very recent org-freemind on OSX 10.6 and emacs 23..



___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Freemind exportation

2010-04-12 Thread Andrea Crotti

I don't know if I'm doing something wrong, but I tried many times during
the last months and I've never seen the freemind exporter works, is it
just to me or a general problem?

It would be a great thing, what is/was the problem and is possible to
fix it?



___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: Tangling

2010-04-12 Thread Andrea Crotti
Dan Davison  writes:

> Andrea Crotti  writes:
>
> Hi Andrea,
>
> I think that should be
>
> (add-to-list 'load-path (concat conf "org-mode/lisp"))
> (add-to-list 'load-path (concat conf "org-mode/contrib/lisp"))
>
> (require 'org-install)
> (require 'org-babel-init)
>
> (org-babel-tangle-file (concat base "miniconf.org"))
>
> Dan
>

Great Dan thanks a lot, now it works perfectly!
So in case someone is interested can get the configuration I'm preparing here
http://github.com/AndreaCrotti/Org-mode-notes

Feel free to take what you need and modify as you wish, at the moment
it's working and should work everywhere (only my personal snippets are a
symlink so I guess it's not working outside my machine).



___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: Tangling

2010-04-11 Thread Andrea Crotti
Dan Davison  writes:

>
> here
>
> Although Org maps "elisp" to emacs-lisp-mode in org-src-lang-modes
> (therefore C-c ' works), Org-babel currently does not recognise "elisp"
> by default. Thanks for raising this, I think we need to make ourselves
> more compatible with org-src-lang-modes.
>
> So the short answer is: change "elisp" to "emacs-lisp".
>
> The longer answer is, you could do
>
> (org-babel-add-interpreter "elisp")
> (add-to-list 'org-babel-tangle-langs '("elisp" "el"))
>
> But you (we) 'll still be faced with the problem that org-babel-load-file
> expects the blocks to be "emacs-lisp" blocks. org-babel-tangle-file, on
> the other hand, will work.
>
> Does that get things working?
>
> Dan

Yes thanks a lot I was doing a stupid mistake, in other files I always
used emacs-lisp.
But if it will be aliased even better (I could do it myself but I've
made a snippet for it so I won't forget again)...

So now I have a strange behaviour, sometimes the file is loaded and
sometimes is not

This is the init file:

--8<---cut here---start->8---
(setq base "~/Documents/pycon/")
(setq conf (concat base "conf/"))

(add-to-list 'load-path (concat conf "org-mode/lisp"))
(add-to-list 'load-path (concat conf "org-mode/contrib/babel/lisp"))

(require 'org)
(require 'org-babel)
(require 'org-babel-tangle)

(org-babel-tangle-file (concat base "miniconf.org"))
--8<---cut here---end--->8---

The tangling works perfectly fine on my "real" emacs conf, but with the
testing configuration I get sometimes (don't understand why sometimes it
works this)

http://gist.github.com/362682

And is short

Debugger entered--Lisp error: (void-function -mode)

What is that supposed to mean? Just some stupid mistake again?
The file to load is 
http://github.com/AndreaCrotti/Org-mode-notes/blob/master/miniconf.org
but I guess that's correct because on one emacs it works perfectly fine



___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Tangling

2010-04-09 Thread Andrea Crotti

So for my presentation I'm preparing a minimal emacs configuration which
will have
- org-mode/babel
- python mode
- yasnippet/auto complete 

And it will be everything here
http://github.com/AndreaCrotti/Org-mode-notes

I'm running
Org-mode version 6.34trans
on
GNU Emacs 23.1.50.1
(i386-apple-darwin9.8.0, NS apple-appkit-949.54) of 2009-09-16 on neutron.local

But I don't know why I'm not able to tangle anything and then load the
elisp code from an org-mode file.

--8<---cut here---start->8---
ELISP> (org-babel-load-file "/Users/andrea/Documents/pycon/miniconf.org")
*** Eval error ***  No buffer named miniconf.org
--8<---cut here---end--->8---

But the file is actually there, or like this
--8<---cut here---start->8---
ELISP> (org-babel-tangle "/Users/andrea/Documents/pycon/miniconf.org")
nil
--8<---cut here---end--->8---

And it doesn't export any source even if it looks something like this

--8<---cut here---start->8---
* Org mode
** Clock configuration
#+begin_src elisp :tangle yes
;; Clock configuration
(setq org-clock-persist t)
(org-clock-persistence-insinuate)
#+end_src
--8<---cut here---end--->8---

Any idea?



___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: Emacs setups?

2010-04-07 Thread Andrea Crotti
Nathan Neff  writes:

> I'm not an Emacs user, but use it for org-mode, mostly on a Mac.
>
> I tried finding some discussions on this list about what everyone
> on this list uses for Emacs.
>
> I have three Emacs builds that I bounce back & forth between:
> 1) Aquamacs
> 2) http://atomized.org/wp-content/cocoa-emacs-nightly/ (found on
> http://www.emacswiki.org/emacs/EmacsForMacOS#toc10)
> 3) http://emacsformacosx.com/ (also found on
> http://www.emacswiki.org/emacs/EmacsForMacOS#toc10)
>
> Can anyone point me to a thread where org-mode users discuss the version
> of Emacs that they use and OS, etc? 

I personally use the 2) on OSX 10.6 and I'm quite satisfied.
Sometimes it happens that it crashes (very seldomly) but for the rest is
quite good.

I don't understand the difference with 3), maybe less packages already inside.

Anyway not being an emacs using org-mode is a "pity", because if you get
more confident with emacs itself you will be also much more productive
with org-mode (and viceversa).



___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: Let's TALK about it

2010-04-07 Thread Andrea Crotti

My talk has been accepted :)
So now I really have to prepare something!

I thought that for showing the power of org-mode and babel I could use
something I already have

http://github.com/AndreaCrotti/my-project-euler/blob/master/euler.org
(click on raw to see the code)

It's a summary of which problems I've solved or I want to solve.
Below there are elisp functions that are called inside the table, and
the table is updated smartly looking for every file with a particular
extension in the directories of the problems.

Then I was thinking to remove the table and I started to use a babel
approach, but I think both approaches could be very interesting.

Those snippets of code that only returns a result are a nice example to
use with babel (I think).

Could be a good idea?
I'm also going to show something from python-mode/yasnippet because in
the end the title of the talk is
"Light of speed python programming with emacs"
So I have to stay close to it :D



___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: Let's TALK about it

2010-02-25 Thread Andrea Crotti
"Eric Schulte"  writes:

> Hi Andrea,
>
> That's an excellent question, and I have no idea what the answer should
> be.  The first step is certainly introducing Org-mode, maybe with a
> focus on tables, and the export to html and LaTeX.  From there Org-babel
> may best be described as the addition of active source code to Org-mode
> documents.
>
> I think Org-babel is most easily introduced through a couple of short
> live demos hitting on the main points of functionality
> - executing a source code block capturing the results in an org-mode buffer
> - reading inputs from a table
> - reading inputs from another source-code block
> - tangling
> - exporting an org file to html including soure-code block results
>   and/or fontified code
>
> Best of luck! -- Eric

Thanks a lot, now there are a couple of "problems":
- it's a python conference, I should be able to remain at least close to
  the topic
- the talks are "chosen" by the people who bought the ticket, so I
  should try to write it as inviting as possible.

The thing is that a tour of python-mode and all what's related for
productivity and org-mode/babel would be 2 different talks, so I maybe
also propose both of them...

But if I propose only org I don't think it will ever be accepted, if I
put them together maybe...

And if I'm doing both I should take a very long time to show everything
could be nice (most talks are 60 minutes if I'm not wrong).



___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Let's TALK about it

2010-02-25 Thread Andrea Crotti

I will probably go here http://www.pycon.it/
(what does it have to do with org-mode you might think).
Anyway I wanted to propose a talk on emacs and python programming
packages used to simplify the editing.

I would also like to include something on literate programming with
orgmode/babel, so I was wondering if you have any advices...

I've never done a presentation like this before, but in this case I
think an interactive session where I show things would be nicer than a
set of slides.

Are there any presentations around about the subject where I could give
a look?

Also the emacs+org-mode is a quite complicated world, I would like to
show all the best features without having to deal with elisp code or
having to explain too much...

What could be the "minimal" introduction needed before talking about
org-babel for a smart (but maybe not emacser) audience?



___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: Wiki?

2010-02-20 Thread Andrea Crotti
Manish  writes:

> have you tried Wes Hardaker's generic exporter?  C-c C-e g RET.  it
> should already be able to do a lot of what you want.

Ah thanks perfect, that's more than enough!  Making modification
possible is of course too much trouble, having a single command to
export to wiki syntax and be able to paste directly is already very
nice...



___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: Wiki?

2010-02-19 Thread Andrea Crotti
Ben Finney  writes:
>
> This much, at least, can be fixed by the “It's All Text” add-on for
> Firefox https://addons.mozilla.org/en-US/firefox/addon/4125>.

Yes I know and it's really nice but on OSX I never use firefox, I really
prefer Safari to it...



___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Wiki?

2010-02-19 Thread Andrea Crotti

Today I had to modify some wiki pages for a project and I realized how
it sucked..
Stupid editor, annoying markup language, difficult to remember/track
down what you've written and so on.

So wouldn't be great to do something like this

* Wiki stuff
** Page1
   This is a wiki page, automatically created if not existing
   - item
   - item

** Page2
   Another page.

Than with one command like org-export-to-wiki look if the page is
existing, if not create it, convert it to the right format and it's
done!

I think it should involve some rpc php stuff which is not directly
related, and also if the page is modified by someone else is not so
easy (unless we're able to update our org-version).
But to create new pages it would be great (for me at least).
What do you think?

Thanks



___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Github understands us

2010-02-17 Thread Andrea Crotti
Maybe some of you already noticed, but I found out that actually github
understands org-mode!

If you put a README.org it just works, there surely are some minor
problems (for example footnotes) but see for example here
http://github.com/AndreaCrotti/Razz
for an example.



___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: Absolute paths in exported files

2010-01-25 Thread Andrea Crotti

Ok forget about the sh problem, I just deleted it..
The absolute path is another mystery, I thought the problem was that I
wasn't using a project but it's exactly the same thing with a project.

Paths will only be absolutes, I also added
:include ("java")
but still the same, no code included and exported pages only works on my
machine, very strange there must be an easy explanation



___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: Absolute paths in exported files

2010-01-24 Thread Andrea Crotti
andrea  writes:

Ok that's really driving me crazy, the problems is there only with that
file and only with "src sh", it would work for other languages.
I removed the options, modified the outline but nothing to do
Here's the whole file by the way:
http://gist.github.com/285248


Isn't there a sort of verbose mode in which org-mode could actually run?



___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: batch exporting

2009-12-21 Thread andrea Crotti
This is my whole error by the way if someone can understand what it means...

Debugger entered--Lisp error: (wrong-type-argument stringp nil)
  re-search-forward(nil nil t)
  org-export-remove-headline-metadata((:for-LaTeX t :emph-multiline t
  :add-text nil :comments nil :skip-before-1st-heading nil
  :LaTeX-fragments nil :timestamps t :footnotes t))
  org-export-preprocess-string("" :for-LaTeX t :emph-multiline t
  :add-text nil :comments nil :skip-before-1st-heading nil
  :LaTeX-fragments nil :timestamps t :footnotes t)
  org-export-latex-first-lines((:latex-image-options "width=10em"
  :exclude-tags ("noexport") :select-tags ("export") :email
  "and...@44-131.eduroam.rwth-aachen.de" :author "andrea"
  :auto-postamble nil :auto-preamble nil :postamble nil :preamble nil
  :publishing-directory nil :timestamp nil :expand-quoted-html t
  :html-table-tag nil :xml-declaration nil :html-extension nil
  :inline-images nil :convert-org-links nil :agenda-style ""
  :style-extra nil :style nil :style-include-scripts nil
  :style-include-default nil :table-auto-headline t :tables t
  :time-stamp-file t ...) nil nil) org-export-as-latex(3 hidden)
  org-export-as-latex-batch() command-line-1(("--no-splash" "--eval"
  "(add-to-list 'load-path \"/Users/andrea/.emacs.d/org-mode/lisp/\")"
  "--eval" "(setq debug-on-error t)" "--eval" "(require 'org)"
  "--eval" "(require 'org-install)" "--visit=navigator.org" "-f"
  "org-export-as-latex-batch")) command-line() normal-top-level()




___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: Bug in table formula editor?

2009-11-22 Thread andrea Crotti
Andreas Burtzlaff  gmx.net> writes:

>
> I cannot reproduce this with Emacs 23.1.1 and org-6.33trans
> release_6.33f.30.g011f.
> If Emacs hangs completely it might be a bug in the Emacs core rather
> then org-mode.

I don't know what's the problem but it does it on both
osx and linux with emacs 23.1.50...
> 
> @1
> 
> so your full formula would look like:
> 
> '(check_file (concat "prob_" A& "." (downcase @1)))
> 

Ok thanks a lot, but I'm not able to define it over many columns..
I tried with
C&..F& =
but it doesn't keep the formula, is that wrong?



___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: Bug in table formula editor?

2009-11-22 Thread andrea Crotti
Yes I'm sorry the table was too big and screwed up so I didn't copy the 
formulas.
Anyway it's everything here
http://github.com/AndreaCrotti/my-project-euler/blob/master/euler.org

For the "bug" just go over the table
- press C-c '
- start typing a new formula with @+
after that emacs hangs and not even C-g restores it...

I now would like to use only one formula in the whole rectangular area and 
take the extension from the first header of the column.



___
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: [babel] latex code in final pdf

2009-11-17 Thread andrea Crotti
Eric Schulte  gmail.com> writes:
> as expected.  Maybe it is possible that even though you have the latest
> org-mode on your computer your Emacs is still loading an older version?
> If that is not the case then it could be something specific to your
> configuration, which you can determine by starting Emacs with the -Q
> option and then loading up org-mode manually and trying to re-create the
> problem.
> 
> Best of luck -- Eric
> 

Me idiot I was using version in /Applications/Emacs.d because I changed a
 directory folder name, now it works very well, thanks!
Now I deleted the old one to make sure



___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] [babel] latex code in final pdf

2009-11-17 Thread andrea Crotti
I'm not so sure it's related to babel since it's in
#+BEGIN_SRC haskell

tags.

Anyway in short I see latex code in the final source
code block exported.
I updated from git org-mode.

This is the code that gives program:

  sumListCond :: Int -> Int -> [Int] -> Int
  sumListCond l n xs
  | foldl (+) 0 (take l xs) <= n = sumListCond (l + 1) n xs
  | otherwise = foldl (+) 0 (take (l - 1) xs)


I get this strange thing

sumListCond :: Int -> Int -> [Int] -> Int
sumListCond l n xs
\begin{center} \begin{tabular}{l}
foldl(+)0(takelxs)<=n=sumListCond(l+1)nxs \\
otherwise = foldl (+) 0 (take (l - 1) xs)   \\ \end{tabular} \end{center}


Who tell it to create a tabular in the center?
It's inside the source code block so it shoudn't evaluate "|" right?



___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Emacs package management with org-mode

2009-11-14 Thread andrea Crotti
I was keeping a list of packages I use with emacs (here)
http://github.com/AndreaCrotti/Emacs-conf/blob/master/.emacs.d/README.txt

but now I had another idea, why don't create a table with org mode?

I thought a table like

| PACK | UPDATE CMD | REPO | COMMENT | RANK | CONF |

where
PACK: name and link
UPDATE CMD: command shell or elisp to give to update it
REPO: where is actually stored (could be a file or a directory)
CONF: my configuration file

So in this way in my dream if for example I want to update auto-complete
my function
- looks for it on the table
- cd to the right directory
- git pull the differences (and do other things as needed)

and I have all the informations in one table.

It's not so easy I guess but it maybe worth the effort, what do you think?
Thanks



___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: [babel] dot in pdf directly

2009-11-12 Thread andrea Crotti
A question about updating org...
I also have all my .emacs.d under git, so if I put
the whole org-mode in it (46M) I wast a lot of space.
But if I don't then every time I can't just "git pull" but I need more
operations, which can be annoying, how do you deal with it?

For the capitalization I could also always write not capitalized,
it's not a problem.
Given I've always seen the org directives capitalized I thought it 
would be better..
Andrea



___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: [babel] dot in pdf directly

2009-11-10 Thread andrea Crotti
Eric Schulte  gmail.com> writes:

> Note that the solution I'm about to propose relies on the use of
> org-babel and #+begin_src dot blocks rather than #+begin_dot blocks.
> 
> When in these situations I will often set the block so that neither the
> code or the resulting image is exported, and so that the results of
> block evaluation are silent.
> 
> #+begin_src dot :file file.pdf :cmdline -Tpdf :exports none :results silent
> ...
> #+end_src
> 
> Then I manually add file links to the image throughout my document.
> 
> [[file:file.pdf]]
> 
> Whenever I change the contents of the block I manually re-evaluate the
> block with C-c C-c and the image to which all of the links point is
> updated.
> 
> Best -- Eric
> 

Ok that's really perfect!
The only "problem" is that it keeps exporting the code even without
the :exports none, maybe I need some newlines?

 s2
#+BEGIN_SRC dot :file s2.pdf :cmdline -Tpdf :exports none :results silent
digraph s1 {
t1;
t2;
}
#+END_SRC

[[file:s2.pdf]]




___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


[Orgmode] Re: Adding org files

2009-11-10 Thread andrea Crotti
Stephan Schmitt  cs.tu-berlin.de> writes:

> 

> 
> if you use (setq ...) you circumvent the customization framework
> and the variable is set only for the emacs session.
> 
> don't know if this helps, otherwise rephrase your question, please.
> 

Well no that's even better!
In this way I can directly avoid building up my list every time I "boot"
emacs, which takes a lot of time.
I just have to make sure that the hook is always working...

I would also like to check that the new org-file created is in a
subdirectory of the org-directories, how could that be easily done?





___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


  1   2   >