Re: [O] orgstuct++ does not lurk silently in the shadow

2012-04-28 Thread Eric Fraga

Eric Fraga  writes:


[...]

> Bastian,
>
> Filling seems to work much better now but I don't know whether any of
> this is org or gnus.  

Actually, I just noticed from my modeline that OrgTbl is
active.  However, I have searched everything in my configuration and
cannot see where I turn this on!  I am perturbed :(

The point being that orgstruct++-mode does cause problems with
indentation and filling in email messages but without it, but with
OrgTbl maybe, filling is working very nicely now.

Thanks again,
eric


-- 
: Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 24.1.50.1
: using Org release_7.8.09-414-gb3e8a8




Re: [O] orgstuct++ does not lurk silently in the shadow

2012-04-28 Thread Eric Fraga
Bastien  writes:

> Hi Eric,
>
> Eric Fraga  writes:
>
>> Thanks for this.  This behaviour has annoyed me for years now.  
>
> Me too...
>
>> I've
>> never gotten around to figuring out why I got this behaviour because I
>> get caught up with writing the email and forget by the time I finish...
>>
>> I hope somebody can indeed fix this as it sounds quite straightforward
>> (for better elisp programmers than I...).
>
> This should be fixed now in master.
>
> Can you confirm?
>
> There is one remaining use-case I didn't fix: the case where you use M-q
> on the first line of the message (things are messed up then.)  I don't
> know how to fix this, but this is a rather border-line case, as simply
> typing and using auto-fill does the right thing.
>
> Thanks for insisting on this!

Bastian,

Filling seems to work much better now but I don't know whether any of
this is org or gnus.  However, I am not sure what is happening
here.  With the following line in my configuration:

(add-hook 'message-setup-hook 'turn-on-orgstruct++)

all my emails end up indented strangely.  Specifically, if this email
had been composed with that hook entry, all my lines would have been
indented 2 spaces.  See my previous message to this list if you can find
such easily...

I commented out that line in my configuration and restarted Emacs to
compose this reply.  No indenting is happening (which is a good thing).

Very strange.  I do not understand why turning on orgstuct++ would cause
a default indentation of all text.

I am happy to explore this further if you give me some hint as to what
to try.

I am using gnus and org up to date as of yesterday (Australia time).  I
haven't updated today yet.

Thanks,
eric

-- 
: Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 24.1.50.1
: using Org release_7.8.09-414-gb3e8a8




[O] Org tiny changes?

2012-04-28 Thread François Pinard
Hi, everybody.

I might not be following the mailing list closely enough… May I check
with you, just in case I should rather chase an error on my side?

* It now seems that UNDER\_LINE, while producing HTML, is now rendering
  the backslash instead of removing it.  The backslash was previously
  required so "LINE" is not shown as a subscript for "UNDER".  Today, if
  I use UNDER_LINE, it gets rendered as is, without the need of a
  backslash.

* Whenever a date is generated (through "C-c !" say) or adjusted, the
  day of the week has a period appended.  That is, where I was
  previously getting "[2012-04-28 sam]", I now get "[2012-04-28 sam.]".

Are these changes on purpose?  If yes, I'll mass edit my files so they
become consistent with the new behavior.  If not, please advise me. ☺

François

P.S. I installed Ubuntu 12.04 on a fresh partition today, and observed
the changes after the fact (and after having re-installed Org from Git).
This is probably a mere coincidence, I would not be tempted to think the
upgrading of Ubuntu has a consequence on the Org changes I'm seeing.

Oh, by the way, Org now installs in /usr/local/emacs/site-lisp/org/,
while it used to go within /usr/local/share/emacs/site-lisp/.  That's
another change which I presume willful, and to which I quickly adjusted.





Re: [O] Bug: babel results: output wrong location [7.8.09]

2012-04-28 Thread Ista Zahn
Hi Eric,

This is the second time I've reported a bug in org mode. Both times
the bug has been fixed the same day. I don't know of any other
software development project that even comes close to this. You guys
are simply amazing. Thank you so much for all your work on org-mode.

Best,
Ista

On Sat, Apr 28, 2012 at 6:07 PM, Eric Schulte  wrote:
> Ista Zahn  writes:
>
>> Remember to cover the basics, that is, what you expected to happen and
>> what in fact did happen.  You don't know how to make a good report?  See
>>
>>      http://orgmode.org/manual/Feedback.html#Feedback
>>
>> Your bug report will be posted to the Org-mode mailing list.
>> 
>>
>> What happens:
>>
>> When I set <:results output> to an R babel block that does not output
>> anything, two equals signs are inserted at column one of the next
>> non-empty line after the second evaluation.
>>
>> Reproducible example:
>>
>> Start with this simpel org file:
>>
>> -- begin org --
>>
>> * Test babel block
>>
>> #+name: test1
>> #+begin_src R :results output
>>   x <- 1
>> #+end_src
>>
>> * Next heading
>>
>> -- end org --
>>
>> After placing the point inside the test1 block and pressing C-c C-c the
>> buffer looks like this:
>>
>> -- begin org --
>>
>>
>> * Test babel block
>>
>> #+name: test1
>> #+begin_src R :results output
>>   x <- 1
>> #+end_src
>>
>> #+RESULTS: test1
>>
>>
>> * Next heading
>>
>> -- end org --
>>
>> So far so good. But when I press C-c C-c a second time, the buffer looks
>> like this
>>
>> -- begin org --
>>
>> * Test babel block
>>
>> #+name: test1
>> #+begin_src R :results output
>>   x <- 1
>> #+end_src
>>
>> #+RESULTS: test1
>>
>>
>> ==* Next heading
>>
>> -- end org --
>>
>> Now "Next heading" is no longer a heading (notice the "==" inserted at
>> the beginning of the "* Next heading" line).
>>
>> What I expected to happen:
>>
>> The second evaulation of the code block
>> should produce the same output as the first. The == text should not be
>> inserted!
>>
>
> Hi Ista,
>
> Thanks for sharing this bug, I find the same behavior with the following
> example code.
>
> ,
> | #+name: block
> | #+begin_src sh :results output
> |   # nothing
> | #+end_src
> |
> | #+RESULTS: block
> |
> | * top
> `
>
> Alright, I've just pushed up a fix for this issue.
>
> Best,
>
>>
>> Emacs : GNU Emacs 24.1.50.2 (x86_64-unknown-linux-gnu, GTK+ Version
>>3.2.3)
>>  of 2012-04-15 on arch-desktop
>> Package: Org-mode version 7.8.09
>>
>> current state:
>> ==
>> (setq
>>  org-export-preprocess-before-selecting-backend-code-hook
>> '(org-beamer-select-beamer-code)
>>  org-tab-first-hook '(org-hide-block-toggle-maybe
>> org-src-native-tab-command-maybe org-babel-hide-result-toggle-maybe)
>>  org-speed-command-hook '(org-speed-command-default-hook
>> org-babel-speed-command-hook)
>>  org-occur-hook '(org-first-headline-recenter)
>>  org-metaup-hook '(org-babel-load-in-session-maybe)
>>  org-export-preprocess-before-normalizing-links-hook
>> '(org-remove-file-link-modifiers)
>>  org-confirm-shell-link-function 'yes-or-no-p
>>  org-export-latex-final-hook '(org-beamer-amend-header
>> org-beamer-fix-toc org-beamer-auto-fragile-frames
>> org-beamer-place-default-actions-for-lists)
>>  org-export-latex-after-initial-vars-hook '(org-beamer-after-initial-vars)
>>  org-after-todo-state-change-hook '(org-clock-out-if-current)
>>  org-src-mode-hook '(org-src-babel-configure-edit-buffer
>> org-src-mode-configure-edit-buffer)
>>  org-agenda-before-write-hook '(org-agenda-add-entry-text)
>>  org-babel-pre-tangle-hook '(save-buffer)
>>  org-mode-hook '(#[nil "\300\301\302\303\304$\207" [org-add-hook
>> change-major-mode-hook org-show-block-all append local] 5]
>>                #[nil "\300\301\302\303\304$\207" [org-add-hook
>> change-major-mode-hook org-babel-show-result-all append local] 5]
>>                org-babel-result-hide-spec org-babel-hide-all-hashes)
>>  org-ctrl-c-ctrl-c-hook '(org-babel-hash-at-point
>> org-babel-execute-safely-maybe)
>>  org-cycle-hook '(org-cycle-hide-archived-subtrees
>> org-cycle-hide-drawers org-cycle-show-empty-lines
>> org-optimize-window-after-visibility-change)
>>  org-export-latex-format-toc-function 'org-export-latex-format-toc-default
>>  org-export-blocks '((src org-babel-exp-src-block nil) (export-comment
>> org-export-blocks-format-comment t) (ditaa
>> org-export-blocks-format-ditaa nil)
>>                    (dot org-export-blocks-format-dot nil))
>>  org-export-first-hook '(org-beamer-initialize-open-trackers)
>>  org-export-interblocks '((src org-babel-exp-non-block-elements))
>>  org-babel-tangle-lang-exts '(("python" . "py") ("perl" . "pl")
>> ("latex" . "tex") ("emacs-lisp" . "el"))
>>  org-confirm-elisp-link-function 'yes-or-no-p
>>  org-metadown-hook '(org-babel-pop-to-session-maybe)
>>  org-babel-load-languages '((emacs-lisp . t) (sh . t) (R . t) (js . t)
>> (latex . t) (octave . t) (ditaa . t) (org . t) (perl . t) (pyth

Re: [O] mail integration, advice?

2012-04-28 Thread Neil Smithline

On 4/27 08:09 , Stephen Eglen wrote:

A relatively new emacs mailer, mu4e, is worth mentioning:

http://www.djcbsoftware.nl/code/mu/mu4e.html

I really like it so far + it has support for org mode links.


Stephen,

I didn't know about mu4e. I've played around with mu in the past and 
thought it was very cool but couldn't really work it into my daily 
workflow. mu4e seems to handle that.


Are the directions at 
http://www.djcbsoftware.nl/code/mu/mu4e/Gmail-configuration.html really 
all it takes to get this running? If so, I'm definitely going to give it 
a whirl.


Neil Smithline
http://www.neilsmithline.com
Proud GNU Emacs user since 1986, v. 18.24.




Re: [O] [OT] mail integration, advice?

2012-04-28 Thread Eric Schulte
Rasmus  writes:

> Eric Schulte  writes:
>
>> Myles English  writes:
>>
>>> Matt,
>>>
> On Thu, 26 Apr 2012 09:47:40 -0400, Matt Price said:
>>>   > So, I'm wondering what solutions other org users have settled
>>>   > on.
>>>
>>> I use gnus, offline imap, dovecot, notmuch, msmtp, bbdb3.  And
>>> org-mode
>>> capture including links to emails works fine.
>>>
>>> The end result is very good and stable through updates (I am using
>>> Arch
>>> Linux too) but I have to say though it did take a LOT of
>>> configurating.
>>>
>>
>> As a long-time user of gnus with imap my only complaints are the
>> inability to work offline and the relatively poor sorting rules of my
>> web-mail imap servers.  It sounds like dovecot and offline-imap could
>> solve both of these problems.
>>
>> Was the offline-imap/dovecot combo difficult to configure?
>
> No.
>

Thanks to you and Myles for your respective advice on this setup.  I'm
now using offlineimap+dovecot to read almost [1] all of my email.  I'll
share my config in case anyone else is interested in trying out this
combination of tools.

I'm using the following very basic dovecot config [2], with the
following offlineimap config [3], and gnus config [4].  This was all
very easy to setup.

Now my email system should be complete.  At least until I decide I need
to switch from using free webmail servers to running my own remote IMAP
server.

Thanks,

Footnotes: 
[1]  Due to a weird issue on my school's imap server I must issue the
 LIST command as 'LIST "mail" "*"' instead of 'LIST "" "*"'.  I
 haven't yet figured out how to port this workaround to offlineimap.

[2]  $ dovecot -n
# 2.1.5: /etc/dovecot/dovecot.conf
# OS: Linux 3.3.3-1-ARCH x86_64  ext4
mail_location = maildir:/home/eschulte/mail
namespace inbox {
  inbox = yes
  location = 
  mailbox Drafts {
special_use = \Drafts
  }
  mailbox Junk {
special_use = \Junk
  }
  mailbox Sent {
special_use = \Sent
  }
  mailbox "Sent Messages" {
special_use = \Sent
  }
  mailbox Trash {
special_use = \Trash
  }
  prefix = 
}
passdb {
  args = /etc/dovecot/passwd
  driver = passwd-file
}
ssl = no

[3]  $ cat .offlineimaprc
[general]
accounts = gmx
maxsyncaccounts = 1

[Account gmx]
localrepository = gmx-local
remoterepository = gmx-remote

[Repository gmx-local]
type = IMAP
remotehost = localhost
remoteport = 143
remoteuser = eschulte
preauthtunnel = MAIL=maildir:$HOME/mail/me /usr/lib/dovecot/imap
holdconnectionopen = yes

[Repository gmx-remote]
type = IMAP
remotehost = imap.gmx.com
remoteuser = my-email-address
remotepass = my-password
remoteport = 993
ssl = yes

[4]  
#+begin_src emacs-lisp
  (setq
   gnus-select-method
   '(nnimap "gmx"
(nnimap-stream shell)
(nnimap-shell-program
 "MAIL=maildir:$HOME/mail/me /usr/lib/dovecot/imap")))
#+end_src

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



Re: [O] Google Summer of Code -- 3 Org projects for our first participation!

2012-04-28 Thread Neil Smithline

On 4/26 03:57 , Bastien wrote:

What will help org-ruby (and github's support of org files) is to
stabilize the syntax of .org files as much as possible.  We are
currently working in this direction.

org-ruby's main job is to convert .org files into HTML or textile files.


The org-ruby gem is really in its infancy with regards to processing Org 
Mode. For example, I added support for converting a line with just 
"-" to an HTML  tag. So now it supports horizontal rules but it 
still doesn't support centering of text.


> If the list can specifically help about org-ruby issues, let's help!

A quick hack to provide better support would be to add support to the 
org-ruby gem to process HTML in a .org file. While not the cleanest of 
solutions, being able to process HTML will allow work-arounds for many 
missing features.


But it would be much better if the org-ruby gem could process a larger 
subset of Org Mode directives. But this isn't as easy as it sounds.


The gem is a reasonably well-written parser that is organized to allow 
pluggable backends. I kind of like it. But it is really, really tiny. 
(See the end of this email for details about the size).


I think the basic parser framework is too simplistic to support much 
more of Org. No fault to the gem; it was written to be no more complex 
than it had to be to do what it does.


In the end, my thought is that I'm not sure if it is better to extend 
the org-ruby gem or to do something totally different (I don't know what).


In the end, I think the way that the best way the list could help 
improve Github's support of Org files would be to provide two things:


1) Come up with a prioritized list of features that would be nice to be 
supported by Github. This may just be the most used features of Org Mode 
or it may be something special to how Org Mode is used in Github. I'm 
not sure.


2) Have a few people look at the org-ruby gem and then brainstorm about 
the best way to proceed. This would either require people who know Ruby 
or more experienced software engineers. I modified the gem and learned 
Ruby by reading the source for this gem and occasionally looking 
something up in a reference manual. But I'd bet I've been coding longer 
than list members such as Thorsten have been alive.


I really don't know enough about the culture of the Org Mode developers 
to know if this is possible or not. The alternative is that I can just 
keep adding features as I need them and think I can implement them.


As I said in my initial email:

>> PS: And the answer is "Yes. I am aware that vehemently suggesting a 
project

>> is equivalent to offering to help with it." :-D

Neil

ORG-RUBY LINES OF CODE

Here's a wc output on the gem's source code with tests and other 
non-functional parts omitted:


 110 3943392 headline.rb
 246 7938521 html_output_buffer.rb
 345 691   18139 html_symbol_replace.rb
 258 8397877 line.rb
 241 9098318 output_buffer.rb
 3701189   12363 parser.rb
 192 8437020 regexp_helper.rb
 102 3202919 textile_output_buffer.rb
 346 695   16882 textile_symbol_replace.rb
  29  49 498 tilt.rb
22396722   85929 total

If you subtract out the two dedicated textile files, the org-ruby gem 
has fewer than 10% of the lines that org.el alone has. The comparison 
isn't wholly fair as org.el has many more public functions than org-ruby 
and, correspondingly, org.el has significantly more lines of documentation.





Neil Smithline
http://www.neilsmithline.com
Proud GNU Emacs user since 1986, v. 18.24.



Re: [O] Bug: babel results: output wrong location [7.8.09]

2012-04-28 Thread Eric Schulte
Ista Zahn  writes:

> Remember to cover the basics, that is, what you expected to happen and
> what in fact did happen.  You don't know how to make a good report?  See
>
>  http://orgmode.org/manual/Feedback.html#Feedback
>
> Your bug report will be posted to the Org-mode mailing list.
> 
>
> What happens:
>
> When I set <:results output> to an R babel block that does not output
> anything, two equals signs are inserted at column one of the next
> non-empty line after the second evaluation.
>
> Reproducible example:
>
> Start with this simpel org file:
>
> -- begin org --
>
> * Test babel block
>
> #+name: test1
> #+begin_src R :results output
>   x <- 1
> #+end_src
>
> * Next heading
>
> -- end org --
>
> After placing the point inside the test1 block and pressing C-c C-c the
> buffer looks like this:
>
> -- begin org --
>
>
> * Test babel block
>
> #+name: test1
> #+begin_src R :results output
>   x <- 1
> #+end_src
>
> #+RESULTS: test1
>
>
> * Next heading
>
> -- end org --
>
> So far so good. But when I press C-c C-c a second time, the buffer looks
> like this
>
> -- begin org --
>
> * Test babel block
>
> #+name: test1
> #+begin_src R :results output
>   x <- 1
> #+end_src
>
> #+RESULTS: test1
>
>
> ==* Next heading
>
> -- end org --
>
> Now "Next heading" is no longer a heading (notice the "==" inserted at
> the beginning of the "* Next heading" line).
>
> What I expected to happen:
>
> The second evaulation of the code block
> should produce the same output as the first. The == text should not be
> inserted!
>

Hi Ista,

Thanks for sharing this bug, I find the same behavior with the following
example code.

,
| #+name: block
| #+begin_src sh :results output
|   # nothing
| #+end_src
| 
| #+RESULTS: block
| 
| * top
`

Alright, I've just pushed up a fix for this issue.

Best,

>
> Emacs : GNU Emacs 24.1.50.2 (x86_64-unknown-linux-gnu, GTK+ Version
>3.2.3)
>  of 2012-04-15 on arch-desktop
> Package: Org-mode version 7.8.09
>
> current state:
> ==
> (setq
>  org-export-preprocess-before-selecting-backend-code-hook
> '(org-beamer-select-beamer-code)
>  org-tab-first-hook '(org-hide-block-toggle-maybe
> org-src-native-tab-command-maybe org-babel-hide-result-toggle-maybe)
>  org-speed-command-hook '(org-speed-command-default-hook
> org-babel-speed-command-hook)
>  org-occur-hook '(org-first-headline-recenter)
>  org-metaup-hook '(org-babel-load-in-session-maybe)
>  org-export-preprocess-before-normalizing-links-hook
> '(org-remove-file-link-modifiers)
>  org-confirm-shell-link-function 'yes-or-no-p
>  org-export-latex-final-hook '(org-beamer-amend-header
> org-beamer-fix-toc org-beamer-auto-fragile-frames
> org-beamer-place-default-actions-for-lists)
>  org-export-latex-after-initial-vars-hook '(org-beamer-after-initial-vars)
>  org-after-todo-state-change-hook '(org-clock-out-if-current)
>  org-src-mode-hook '(org-src-babel-configure-edit-buffer
> org-src-mode-configure-edit-buffer)
>  org-agenda-before-write-hook '(org-agenda-add-entry-text)
>  org-babel-pre-tangle-hook '(save-buffer)
>  org-mode-hook '(#[nil "\300\301\302\303\304$\207" [org-add-hook
> change-major-mode-hook org-show-block-all append local] 5]
>#[nil "\300\301\302\303\304$\207" [org-add-hook
> change-major-mode-hook org-babel-show-result-all append local] 5]
>org-babel-result-hide-spec org-babel-hide-all-hashes)
>  org-ctrl-c-ctrl-c-hook '(org-babel-hash-at-point
> org-babel-execute-safely-maybe)
>  org-cycle-hook '(org-cycle-hide-archived-subtrees
> org-cycle-hide-drawers org-cycle-show-empty-lines
> org-optimize-window-after-visibility-change)
>  org-export-latex-format-toc-function 'org-export-latex-format-toc-default
>  org-export-blocks '((src org-babel-exp-src-block nil) (export-comment
> org-export-blocks-format-comment t) (ditaa
> org-export-blocks-format-ditaa nil)
>(dot org-export-blocks-format-dot nil))
>  org-export-first-hook '(org-beamer-initialize-open-trackers)
>  org-export-interblocks '((src org-babel-exp-non-block-elements))
>  org-babel-tangle-lang-exts '(("python" . "py") ("perl" . "pl")
> ("latex" . "tex") ("emacs-lisp" . "el"))
>  org-confirm-elisp-link-function 'yes-or-no-p
>  org-metadown-hook '(org-babel-pop-to-session-maybe)
>  org-babel-load-languages '((emacs-lisp . t) (sh . t) (R . t) (js . t)
> (latex . t) (octave . t) (ditaa . t) (org . t) (perl . t) (python . t)
> (matlab . t))
>  org-clock-out-hook '(org-clock-remove-empty-clock-drawer)
>  )
>

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



Re: [O] mail integration, advice?

2012-04-28 Thread Myles English

Hi Rasmus,

>> On Sat, 28 Apr 2012 13:28:00 +0100, Rasmus  said:

  > Eric Fraga  writes:
  >> Rasmus  writes:

  > As this is becoming somewhat of a dovecot thread I've got a
  > question:

  > Often, after resuming the computer from standby, say, Gnus looses
  > the connection to Dovecot.  I have to press `g' three times it
  > updates mail group and each time I must wait for it to time out.

  > Has anyone found a solution to this bothersome issue?

This doesn't happen to me but I notice that my config is slightly different:

;; tell gnus not to fetch mail
(setq mail-sources nil)

;; we are only using email
(setq gnus-nntp-server nil
  gnus-read-active-file nil
  gnus-save-newsrc-file nil
  gnus-read-newsrc-file nil
  gnus-check-new-newsgroups nil)

;; fetching email
(setq gnus-select-method
  '(nnimap "mainMail"
   (nnimap-address "localhost")
   (nnimap-stream network)
   (nnimap-authinfo-file "/home/myles/.authinfoMainMail")
   (nnimap-authenticator login)
   (imap-shell-program "MAIL=maildir:/home/myles/Maildir/otherMail 
/usr/lib/dovecot/imap")))

(setq gnus-secondary-select-methods
  '((nnimap "otherMail"
(nnimap-address "localhost")
(nnimap-stream network)
(nnimap-authinfo-file "/home/myles/.authinfoOtherMail")
(nnimap-authenticator login)
(imap-shell-program "MAIL=maildir:/home/myles/Maildir/otherMail 
/usr/lib/dovecot/imap"))

  > Thanks, Rasmus

  > -- Hooray!

Myles



Re: [O] Google Summer of Code -- 3 Org projects for our first participation!

2012-04-28 Thread Neil Smithline
I think I'm lacking sufficient information to fully understand the 
situation (that's just a secret code for saying I'm confused).


From your original email about GSOC:

On 4/24 01:55 , Bastien wrote:
> As part of the engineering process, abstract out a
> web-framework (called iOrg) based on these GNU Emacs technologies. A
> web-framework written in Elisp, with Org files used for database
> functionality, is a new approach that enables interactive web
> applications built on top of GNU Emacs. Bugpile is an example
> application, but useful in itself.

To me, that sounds like iOrg will be an Emacs web server or an Emacs 
plugin to a web server or something like that.


In reply to my email you wrote:

On 4/26 03:57 , Bastien wrote:
> As I understand it, iOrg will convert .org files to HTML using the
> internal Org's HTML exporter.  I don't see how github could use such
> a setup to produce HTML files from Org (unless github runs an Emacs
> batch query for exporting HTML... which seems very unlikely - and
> wrong by design anyway.

To me, that sounds like iOrg will not be appropriate to be part of a web 
server.


Hence, I'm confused. My guess is that I'm confused about the exact 
nature of iOrg as I was surprised that someone was going to turn Emacs 
into something appropriate to be part of a Github web server. Even 
factoring in a large college hacker coding multiplier, three months 
seemed too short to me. That was part, albeit the smaller part, of my 
motivation for trying to put aside bugpile in favor of just iOrg.


I will follow-up with my thoughts about the org-ruby gem in a separate 
email.


Neil



Neil Smithline
http://www.neilsmithline.com
Proud GNU Emacs user since 1986, v. 18.24.


On 4/26 03:57 , Bastien wrote:

Hi Neil,

Neil Smithline  writes:


I've run into this problem dealing with the weak presentation of Org Mode
files on Github. Github uses the Ruby gem org-ruby
(https://github.com/bdewey/org-ruby) to convert .org files to HTML. I've
added a feature or two to org-ruby but really feel that trying to
completely re-implement Org Mode in a Ruby gem is a losing battle.


What will help org-ruby (and github's support of org files) is to
stabilize the syntax of .org files as much as possible.  We are
currently working in this direction.

org-ruby's main job is to convert .org files into HTML or textile files.


If I understand the project correctly, a working iOrg could be used to
support Github's rendering of .org files. Github could just drop the use of
org-ruby and use iOrg as an external converter for formatting .org files.


As I understand it, iOrg will convert .org files to HTML using the
internal Org's HTML exporter.  I don't see how github could use such
a setup to produce HTML files from Org (unless github runs an Emacs
batch query for exporting HTML... which seems very unlikely - and
wrong by design anyway.

Let's see how iOrg evolves but let's stick to the bugpile for now.

If the list can specifically help about org-ruby issues, let's help!

All best,


PS: And the answer is "Yes. I am aware that vehemently suggesting a project
is equivalent to offering to help with it." :-D


Good :)






Re: [O] Org Clock Table / Subtree Export subtle bug

2012-04-28 Thread Bastien
Hi Mike,

thanks very much for the detailed bug report.

Mike McLean  writes:

> The general symptom is that if:
>
> You have org-update-all-dblocks added
> to org-export-first-hook with the goal of ensuring that dynamic
> blocks are current before every export; AND
> You are exporting only a region of the file, for example
> using C-c C-e 1 b (buffer/subtree export)
>
> The Mark terminating the end of the region to be exported is carried
> into the org-clocktable-write-default formatting function and the
> call of (backward-delete-char 1) on line 2352 oforg-clock.el deletes
> a region (between the Mark of the initial call and point, which is
> immediately before the #+END: construct of the clock table). Deletion
> of the #+END: construct malforms the clock table and ultimately the
> export fails leaving the Org file is a corrupt state.

The trick is to use (let ((delete-active-region nil)) ...) so that 
the active region is not deleted by such adjustments.

I pushed a fix.

Thanks!

-- 
 Bastien



Re: [O] Google Summer of Code -- 3 Org projects for our first participation!

2012-04-28 Thread Neil Smithline
Thanks for the response Thorsten. I didn't understand how much of the 
project was included in the GSOC proposal. From the tone of Bastien's 
email I thought that bugpile was unlikely to be completed in the summer. 
I'm glad to hear that you think you'll be able to finish it. I'm sure 
you'll do a great job and have fun over the summer no matter what, but 
it is always nice to be able to point at something real and say "I made 
that."


Even when I asked the question I thought the chances of a change were 
fairly low. It was too late in the process to coopt the summer co-op (no 
apology - that pun was too good to pass up :-D.


Neil

Neil Smithline
http://www.neilsmithline.com
Proud GNU Emacs user since 1986, v. 18.24.

On 4/26 03:48 , Thorsten Jolitz wrote:

Neil Smithline  writes:

Hi Neil,


This is way cool! Recently I have been deeply irritated by the lack of
a functional server for Emacs Org Mode.

I've run into this problem dealing with the weak presentation of Org
Mode files on Github. Github uses the Ruby gem org-ruby
(https://github.com/bdewey/org-ruby) to convert .org files to HTML.
I've added a feature or two to org-ruby but really feel that trying to
completely re-implement Org Mode in a Ruby gem is a losing battle.

If I understand the project correctly, a working iOrg could be used to
support Github's rendering of .org files. Github could just drop the
use of org-ruby and use iOrg as an external converter for formatting
.org files.

At the risk of being flamed to a cinder, I'll say that I think that
using iOrg to support .org files on Github would be a better pilot
project than Bugpile.

I figured out too that the best way to watch org files on github is raw
mode, so I think this is a very interesting and useful proposal. But its
a bit late for this year ;)

I like the bugpile project, and as I understood it, the bugtracker might
actually be used for Org-mode development if it fits the needs of the
Org-mode hackers.

Since this years application was such an success with 3 projects
accepted, Org-mode might well try it again in 2013.
What do you think about putting your proposal on the ideas page for GSoC
2013 (which I could rapidly push to Worg) with you as potential
mentor/co-mentor?

Then it would not get lost, and interested students could apply next
year (if you can cope with githubs rendering of org files so long). And
there would be much more time to outline and coordinate the project.


Besides my personal interest in better Github support for .org, I
think that the Github project will be generally useful.

Also, from the tone of postings, it sounds like the Bugpile project is
not well specified. Being that Thorsten only has a summer to do the
work, I think it will be hard to create a Bugpile specification and
implementation and an iOrg specification and implementation in just
one summer.

As Github already has a specification for external markup converters
(see https://github.com/github/markup), there is no need for writing
any spec. For the first release of iOrg (ie: this summer's work), the
iOrg implementation can be simplified to providing .org support for
Github.

If things go well, I imagine that Thorsten would be very happy to
finish the summer with his iOrg a part of Github.

Definitely a very interesting idea, but I'm already quite 'invested in
the bugpile project, and imagine I finish the summer as the author of a
bugtracker actually used by a quite big and dynamic GNU project like Org-mode.


Just my two cents,

Neil

PS: And the answer is "Yes. I am aware that vehemently suggesting a
project is equivalent to offering to help with it." :-D

I can help with the .org/Github side of the project though I'm sure
others know more about the implementation of Org Mode than me. If
needed, I could also help manage interactions between Thorsten and
Github as I'm sure that Github will have some requirements before they
accept a pull request into their repository.

As far as Emacs internals, it's been 25 years since I last looked at
the C source for Emacs so there must be better folk than I. In any
case, any Emacs internal work that must be done for iOrg existed prior
to my suggestion. In other words, it ain't my problem ;-)


Neil Smithline
http://www.neilsmithline.com
Proud GNU Emacs user since 1986, v. 18.24.


On 4/24 04:12 , Thorsten wrote:

Ian Barton  writes:


Bugpile - a bugtracker for GNU Emacs Org-mode written in Elisp and
Org-mode (Thorsten)

 The Bugpile project has two goals: 1. Develop a bugtracker (called
 Bugpile) for GNU Emacs Org-mode, using Elisp, Elnode, Org-mode, and a
 dVCS. 2. As part of the engineering process, abstract out a
 web-framework (called iOrg) based on these GNU Emacs technologies. A
 web-framework written in Elisp, with Org files used for database
 functionality, is a new approach that enables interactive web
 applications built on top of GNU Emacs. Bugpile is an example
 application, but useful in itself.


Great news!

Re: [O] org-program-exists vs executable-find

2012-04-28 Thread Bastien


"Sebastien Vauban"
 writes:

> Why not replacing it simply by `executable-find': I don't see what it
> adds to it?  I would not say so if it was some upper abstraction, but
> I do feel they're simply the same.

Actually `executable-find' is faster and already available, so yes, I
removed ̀org-program-exists'.

Thanks!

-- 
 Bastien




Re: [O] org-table-store-formulas bug

2012-04-28 Thread Bastien
Hi Matt,

Matt Lundin  writes:

> The following commit introduced a bug that prevents org-table from
> evaluating formulas inserted into fields:
>
> 1c203d8d196aa9b46ea9a455cb891fefe2179d52

Fixed.  Thanks for reporting this!

-- 
 Bastien



Re: [O] Symbol's value as variable is void: org-version

2012-04-28 Thread Achim Gratz
Carsten Dominik writes:
> I am sure I missed the discussion about this - but I do not understand
> why org-version is not loaded by org.el by default.  Really, this
> variable belongs into org.el, and if it is not there, org.el should
> require org-version.el.

The variable _is_ in org.el (currently by way of a defvaralias), but the
value is supplied by an autoload.  That seemed to be the cleanest way to
inject the version string from Git into it, especially considering that
the same code should be in Emacs and not look for a Git directory during
compilation or at runtime.  Currently, if you do not have the autoloads
generated, you don't get a version number — "make autoloads" is doing
that and I#ll have something ready for folks without make soon.  Looking
directly for a Git version number if and only if there is no autoload
definition present (using orgmode uncompiled) will be also solved, but
getting it to work correctly takes time.  I've just installed XEmacs to
be able to test it myself and unfortunately what is working in Emacs
23/24 can't be used directly in XEmacs, so I'll have to supply
compatibility functions or chose a different implementation.


Regards,
Achim.
-- 
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

SD adaptation for Waldorf microQ V2.22R2:
http://Synth.Stromeko.net/Downloads.html#WaldorfSDada




Re: [O] Bug in org-diary (Bad sexp)?

2012-04-28 Thread Bastien
Bastien  writes:

> Rafael  writes:
>
>> FWIW, using the tip from
>> http://lists.gnu.org/archive/html/emacs-orgmode/2012-04/msg00702.html to
>> go back to a previous state, I can confirm that commit
>> 3bd1c2e9bff539c94f92f1ec919f8f0f1640f8c0 is good and that commit
>> 973efcd9c9f5a29ffc9db2c317fab44112a97b07 introduced the error described
>> above. 
>
> I noticed the same problem, coming from the sticky-agenda merge.

Fixed.

-- 
 Bastien



Re: [O] Symbol's value as variable is void: org-version

2012-04-28 Thread Carsten Dominik
Dear all,

I am sure I missed the discussion about this - but I do not understand why
org-version is not loaded by org.el by default.  Really, this variable belongs 
into org.el, and if it is not there, org.el should require org-version.el.

My 5c, of course.

- Carsten

On 28.4.2012, at 19:59, Thomas S. Dye wrote:

> Aloha all,
> 
> In the last day or so, I started running into a problem with a variable,
> org-version.  
> 
> When I look at Org/Documentation/Show Version, I get:
> Org-mode version N/A (N/A @ /Users/dk/.emacs.d/src/org/lisp/org-install.el)
> 
> When I export to LaTeX with -Q and the appended initialization file,
> export fails with the error message in the subject line.
> 
> Here is the call:
> 
> /Applications/Emacs-23-4.app/Contents/MacOS/Emacs --batch -Q -l
> init-old.el sigproc-sp-org-new.org -f org-export-as-latex
> 
> The org file I'm exporting doesn't refer to org-version anywhere.
> 
> I don't know how to figure out what's going on.  Can someone help?
> 
> Thanks,
> Tom
> 
>  init-old.el
> (add-to-list 'load-path "~/.emacs.d/src/org/lisp") ;; <- adjust
> (add-to-list 'load-path "~/.emacs.d/src/org") ;; <- adjust
> 
> (require 'org-install)
> (require 'org-latex)
> 
> ;; this line only required until the upcomming Org-mode/Emacs24 sync
> (load "~/.emacs.d/src/org/lisp/org-exp-blocks.el")
> 
> 
> ;; Configure Babel to support all languages included in the manuscript
> (org-babel-do-load-languages
> 'org-babel-load-languages
> '((emacs-lisp . t)
>   (org. t)))
> (setq org-confirm-babel-evaluate nil)
> 
> ;; Configure Org-mode
>  (setq org-export-latex-hyperref-format "\\ref{%s}")
>  (setq org-entities-user '(("space" "\\ " nil " " " " " " " ")))
>  (setq org-latex-to-pdf-process '("texi2dvi --pdf --clean --verbose --batch 
> %f"))
> 
>  (require 'org-special-blocks)
>  (defun org-export-latex-no-toc (depth)  
>(when depth
>  (format "%% Org-mode is exporting headings to %s levels.\n"
>  depth)))
>  (setq org-export-latex-format-toc-function 'org-export-latex-no-toc)
>  (setq org-export-pdf-remove-logfiles nil)
> 
>  (add-to-list 'org-export-latex-classes
>   '("acm-proc-article-sp"
> "\\documentclass{acm_proc_article-sp}
>  [NO-DEFAULT-PACKAGES]
>  [EXTRA]"
> ("\\section{%s}" . "\\section*{%s}")
> ("\\subsection{%s}" . "\\subsection*{%s}")
> ("\\subsubsection{%s}" . "\\subsubsection*{%s}")
> ("\\paragraph{%s}" . "\\paragraph*{%s}")
> ("\\subparagraph{%s}" . "\\subparagraph*{%s}")))
> 
> -- 
> Thomas S. Dye
> http://www.tsdye.com
> 
> -- 
> Thomas S. Dye
> http://www.tsdye.com
> 




Re: [O] Symbol's value as variable is void: org-version

2012-04-28 Thread Thomas S. Dye
Martyn Jago  writes:

> Martyn Jago  writes:
>
>> Hi Thomas
>>
>> t...@tsdye.com (Thomas S. Dye) writes:
>>
>>
>>> Aloha all,
>>>
>>> In the last day or so, I started running into a problem with a variable,
>>> org-version.  
>>>
>>> When I look at Org/Documentation/Show Version, I get:
>>> Org-mode version N/A (N/A @ /Users/dk/.emacs.d/src/org/lisp/org-install.el)
>>
>> The quick answer - you can try make `autoloads'
>
> That should have been `make autoloads'
>
> Best, Martyn
>
>
>
Many thanks Martyn.  The build process is a mystery to me.  'make
autoloads' appears to have fixed the problem.

All the best,
Tom

-- 
Thomas S. Dye
http://www.tsdye.com



Re: [O] Symbol's value as variable is void: org-version

2012-04-28 Thread Martyn Jago
Martyn Jago  writes:

> Hi Thomas
>
> t...@tsdye.com (Thomas S. Dye) writes:
>
>
>> Aloha all,
>>
>> In the last day or so, I started running into a problem with a variable,
>> org-version.  
>>
>> When I look at Org/Documentation/Show Version, I get:
>> Org-mode version N/A (N/A @ /Users/dk/.emacs.d/src/org/lisp/org-install.el)
>
> The quick answer - you can try make `autoloads'

That should have been `make autoloads'

Best, Martyn




Re: [O] Symbol's value as variable is void: org-version

2012-04-28 Thread Martyn Jago
Hi Thomas

t...@tsdye.com (Thomas S. Dye) writes:


> Aloha all,
>
> In the last day or so, I started running into a problem with a variable,
> org-version.  
>
> When I look at Org/Documentation/Show Version, I get:
> Org-mode version N/A (N/A @ /Users/dk/.emacs.d/src/org/lisp/org-install.el)

The quick answer - you can try make `autoloads'

There have been recent threads about this problem.

Best, Martyn


[...]

> 
> -- 
> Thomas S. Dye
> http://www.tsdye.com




[O] Symbol's value as variable is void: org-version

2012-04-28 Thread Thomas S. Dye
Aloha all,

In the last day or so, I started running into a problem with a variable,
org-version.  

When I look at Org/Documentation/Show Version, I get:
Org-mode version N/A (N/A @ /Users/dk/.emacs.d/src/org/lisp/org-install.el)

When I export to LaTeX with -Q and the appended initialization file,
export fails with the error message in the subject line.

Here is the call:

/Applications/Emacs-23-4.app/Contents/MacOS/Emacs --batch -Q -l
init-old.el sigproc-sp-org-new.org -f org-export-as-latex

The org file I'm exporting doesn't refer to org-version anywhere.

I don't know how to figure out what's going on.  Can someone help?

Thanks,
Tom

 init-old.el
(add-to-list 'load-path "~/.emacs.d/src/org/lisp") ;; <- adjust
(add-to-list 'load-path "~/.emacs.d/src/org") ;; <- adjust

(require 'org-install)
(require 'org-latex)

;; this line only required until the upcomming Org-mode/Emacs24 sync
(load "~/.emacs.d/src/org/lisp/org-exp-blocks.el")


;; Configure Babel to support all languages included in the manuscript
(org-babel-do-load-languages
 'org-babel-load-languages
 '((emacs-lisp . t)
   (org. t)))
(setq org-confirm-babel-evaluate nil)

;; Configure Org-mode
  (setq org-export-latex-hyperref-format "\\ref{%s}")
  (setq org-entities-user '(("space" "\\ " nil " " " " " " " ")))
  (setq org-latex-to-pdf-process '("texi2dvi --pdf --clean --verbose --batch 
%f"))

  (require 'org-special-blocks)
  (defun org-export-latex-no-toc (depth)  
(when depth
  (format "%% Org-mode is exporting headings to %s levels.\n"
  depth)))
  (setq org-export-latex-format-toc-function 'org-export-latex-no-toc)
  (setq org-export-pdf-remove-logfiles nil)

  (add-to-list 'org-export-latex-classes
   '("acm-proc-article-sp"
 "\\documentclass{acm_proc_article-sp}
  [NO-DEFAULT-PACKAGES]
  [EXTRA]"
 ("\\section{%s}" . "\\section*{%s}")
 ("\\subsection{%s}" . "\\subsection*{%s}")
 ("\\subsubsection{%s}" . "\\subsubsection*{%s}")
 ("\\paragraph{%s}" . "\\paragraph*{%s}")
 ("\\subparagraph{%s}" . "\\subparagraph*{%s}")))

-- 
Thomas S. Dye
http://www.tsdye.com

-- 
Thomas S. Dye
http://www.tsdye.com



Re: [O] mail integration, advice?

2012-04-28 Thread Dirk-Jan C . Binnema

Stephen Eglen  writes:

> A relatively new emacs mailer, mu4e, is worth mentioning:
>
> http://www.djcbsoftware.nl/code/mu/mu4e.html
>
> I really like it so far + it has support for org mode links.

Thanks :)

If you're interested, in the guile/examples directory, there's a guile
script 'org2mu4e' that turns an arbitrary query into an org-mode file.

I.e., I am using this (from cron)

  org2mu4e --tag=mu4e "maildir:/todo" > /home/djcb/Documents/org/mu4e.org

where '/todo' is my folder of mails I need to do something with (think
'NextAction' in GTD terms).
  
I use it to make a block agenda (i.e., `org-agenda-custom-commands');
this gives me a list of my agenda for today, my todo list, e-mail that
require some action, and a list of co


("x" "Overview for today"
   ( (agenda ""
  ((org-agenda-ndays 1)))
 (todo "TODO"
   ((org-agenda-overriding-header "Tasks")
 (org-agenda-todo-ignore-timestamp 1)
 (org-agenda-todo-ignore-scheduled t)))
 (tags "+mu4e"
   ((org-agenda-overriding-header "E-mail")
 ;; ---> this is the mu/guile generated org-file
 
 (org-agenda-files '("/home/djcb/Documents/org/mu4e.org"))
 (org-agenda-filter-preset nil)
--- 
  

which gives me something like the below, a nice overview of the things
to work on. The e-mail entries links to the actual messages in mu4e.


Day-agenda (W17):
Saturday   28 April 2012
  misc:   Sched.13x:  APPT Get haircut
  weekly: Sched. 1x:  TODO Weekly Review [Link]
  birthday:   Kurt Gödel (106 years ago)

===
Tasks
  task:   TODO [#A] Fix bicycle  
  task:   TODO [#B] get rid of old monitor   
  task:   TODO [#C] visit dentist

===
E-mail
  mu4e:   "Can you endorse me?":mu4e::
  mu4e:   "Re: hi Dirk!"   :mu4e::
  mu4e:   "Hi!":mu4e::



Best wishes,
Dirk.

-- 
Dirk-Jan C. Binnema  Helsinki, Finland
e:d...@djcbsoftware.nl   w:www.djcbsoftware.nl
pgp: D09C E664 897D 7D39 5047 A178 E96A C7A1 017D DA3C



Re: [O] mail integration, advice?

2012-04-28 Thread Richard Riley
RC  writes:

> Eric Fraga  ucl.ac.uk> writes:
>> 
>> I used to use offline-imap + dovecot when I used wl and things worked
>> very well indeed.  When I moved to gnus, I used the gnus agent which
>> also now works very well (there was a period of instability a year or
>> two ago).  The gnus agent fully supports offline use (gnus-unplugged).
>> 
>
> Hi,
>  Would you mind sharing how you have the new version of gnus set up for email
> and integration with org. Most of what I could find online seems to be based 
> on
> earlier versions of gnus, and I found it difficult to extract the information 
> I
> needed from the comprehensive gnus manual.
> Thanks,
> RC

What kind of integration are you looking for?

The main things you would probably want is simple and is documented under org
links:-

http://orgmode.org/manual/Handling-links.html






Re: [O] mail integration, advice?

2012-04-28 Thread RC
Eric Fraga  ucl.ac.uk> writes:
> 
> I used to use offline-imap + dovecot when I used wl and things worked
> very well indeed.  When I moved to gnus, I used the gnus agent which
> also now works very well (there was a period of instability a year or
> two ago).  The gnus agent fully supports offline use (gnus-unplugged).
> 


Hi,
 Would you mind sharing how you have the new version of gnus set up for email
and integration with org. Most of what I could find online seems to be based on
earlier versions of gnus, and I found it difficult to extract the information I
needed from the comprehensive gnus manual.
Thanks,
RC




Re: [O] mail integration, advice?

2012-04-28 Thread Eric Fraga
Rasmus  writes:

> Eric Fraga  writes:
>
>> Rasmus  writes:
>
> As this is becoming somewhat of a dovecot thread I've got a question:
>
> Often, after resuming the computer from standby, say, Gnus looses the
> connection to Dovecot.  I have to press `g' three times it updates mail
> group and each time I must wait for it to time out. 
>
> Has anyone found a solution to this bothersome issue?
>
> Thanks,
> Rasmus

  Not sure but you could try going to the server list (^ from the Group
  buffer) and then hit O on the server you want to connect to?

  Alternatively, you might try (from the Group buffer) telling gnus to
  unplug (J j) and then plug back in (J j).

  I cannot verify that either of these will work as the problem might be
  with dovecot.  You could try asking on the gnus mailing list?
  
  HTH,
  eric

  PS - by the way, my lines are all indented because between yesterday
  and today, something has changed in either gnus or org!  Paragraph
  filling is working nicely in one sense but everything is indented more
  than I would like.  Haven't explored the cause yet...
  
-- 
: Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 24.1.50.1
: using Org release_7.8.09-414-gb3e8a8




[O] org-table-store-formulas bug

2012-04-28 Thread Matt Lundin
The following commit introduced a bug that prevents org-table from
evaluating formulas inserted into fields:

1c203d8d196aa9b46ea9a455cb891fefe2179d52

Steps to replicate:

1. Enter a simple table:

| 3 |
| 2 |
|---|
|   |

2. Add a formula:

| 3 |
| 2 |
|---|
| :=@1+@2 |

3. Press tab to evaluate:

Debugger entered--Lisp error: (wrong-type-argument char-or-string-p nil)
  org-table-store-formulas((("@3$1" . #("@1+@2" 0 5 (face org-formula fontified 
t)
  org-table-get-formula(#("@1+@2" 0 5 (face org-formula fontified t)) t)
  org-table-eval-formula((4) #("@1+@2" 0 5 (face org-formula fontified t)))
  org-table-maybe-eval-formula()
  org-table-next-field()
  call-interactively(org-table-next-field)
  org-cycle(nil)
  call-interactively(org-cycle nil nil)

The problem is the if statement in org-table-store-formulas:

(if (looking-at "\\([ \t]*\n\\)*[ \t]*\\(#\\+tblfm:\\)\\(.*\n?\\)")
(progn
  ;; don't overwrite TBLFM, we might use text properties to store stuff
  (goto-char (match-beginning 3))
  (delete-region (match-beginning 3) (match-end 0)))
  (org-indent-line-function)
  (insert (match-string 2)))

Notice the (insert (match-string 2)). This fails because if there is
no looking-at match, then there will be no (match-string 2).

Best,
Matt




[O] Bug: babel results: output wrong location [7.8.09]

2012-04-28 Thread Ista Zahn
Remember to cover the basics, that is, what you expected to happen and
what in fact did happen.  You don't know how to make a good report?  See

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

Your bug report will be posted to the Org-mode mailing list.


What happens:

When I set <:results output> to an R babel block that does not output
anything, two equals signs are inserted at column one of the next
non-empty line after the second evaluation.

Reproducible example:

Start with this simpel org file:

-- begin org --

* Test babel block

#+name: test1
#+begin_src R :results output
  x <- 1
#+end_src

* Next heading

-- end org --

After placing the point inside the test1 block and pressing C-c C-c the
buffer looks like this:

-- begin org --


* Test babel block

#+name: test1
#+begin_src R :results output
  x <- 1
#+end_src

#+RESULTS: test1


* Next heading

-- end org --

So far so good. But when I press C-c C-c a second time, the buffer looks
like this

-- begin org --

* Test babel block

#+name: test1
#+begin_src R :results output
  x <- 1
#+end_src

#+RESULTS: test1


==* Next heading

-- end org --

Now "Next heading" is no longer a heading (notice the "==" inserted at
the beginning of the "* Next heading" line).

What I expected to happen:

The second evaulation of the code block
should produce the same output as the first. The == text should not be
inserted!

Emacs  : GNU Emacs 24.1.50.2 (x86_64-unknown-linux-gnu, GTK+ Version 3.2.3)
 of 2012-04-15 on arch-desktop
Package: Org-mode version 7.8.09

current state:
==
(setq
 org-export-preprocess-before-selecting-backend-code-hook
'(org-beamer-select-beamer-code)
 org-tab-first-hook '(org-hide-block-toggle-maybe
org-src-native-tab-command-maybe org-babel-hide-result-toggle-maybe)
 org-speed-command-hook '(org-speed-command-default-hook
org-babel-speed-command-hook)
 org-occur-hook '(org-first-headline-recenter)
 org-metaup-hook '(org-babel-load-in-session-maybe)
 org-export-preprocess-before-normalizing-links-hook
'(org-remove-file-link-modifiers)
 org-confirm-shell-link-function 'yes-or-no-p
 org-export-latex-final-hook '(org-beamer-amend-header
org-beamer-fix-toc org-beamer-auto-fragile-frames
org-beamer-place-default-actions-for-lists)
 org-export-latex-after-initial-vars-hook '(org-beamer-after-initial-vars)
 org-after-todo-state-change-hook '(org-clock-out-if-current)
 org-src-mode-hook '(org-src-babel-configure-edit-buffer
org-src-mode-configure-edit-buffer)
 org-agenda-before-write-hook '(org-agenda-add-entry-text)
 org-babel-pre-tangle-hook '(save-buffer)
 org-mode-hook '(#[nil "\300\301\302\303\304$\207" [org-add-hook
change-major-mode-hook org-show-block-all append local] 5]
 #[nil "\300\301\302\303\304$\207" [org-add-hook
change-major-mode-hook org-babel-show-result-all append local] 5]
 org-babel-result-hide-spec org-babel-hide-all-hashes)
 org-ctrl-c-ctrl-c-hook '(org-babel-hash-at-point
org-babel-execute-safely-maybe)
 org-cycle-hook '(org-cycle-hide-archived-subtrees
org-cycle-hide-drawers org-cycle-show-empty-lines
org-optimize-window-after-visibility-change)
 org-export-latex-format-toc-function 'org-export-latex-format-toc-default
 org-export-blocks '((src org-babel-exp-src-block nil) (export-comment
org-export-blocks-format-comment t) (ditaa
org-export-blocks-format-ditaa nil)
 (dot org-export-blocks-format-dot nil))
 org-export-first-hook '(org-beamer-initialize-open-trackers)
 org-export-interblocks '((src org-babel-exp-non-block-elements))
 org-babel-tangle-lang-exts '(("python" . "py") ("perl" . "pl")
("latex" . "tex") ("emacs-lisp" . "el"))
 org-confirm-elisp-link-function 'yes-or-no-p
 org-metadown-hook '(org-babel-pop-to-session-maybe)
 org-babel-load-languages '((emacs-lisp . t) (sh . t) (R . t) (js . t)
(latex . t) (octave . t) (ditaa . t) (org . t) (perl . t) (python . t)
(matlab . t))
 org-clock-out-hook '(org-clock-remove-empty-clock-drawer)
 )



Re: [O] Org Clock Timer in Frame Title bug

2012-04-28 Thread George Kettleborough
On Sun, Apr 22 2012, Matt Lundin wrote:
> Mike McLean  writes:
>
>> It appears that there is a small problem with commit
>> 37fafb7b9e4e8e1eeb6b8faa76a1621c28970ef5 (Option for clock and timer to
>> be displayed in frame-title). The default value offrame-title-format in
>> my setup is t and this causes an error when clocking in/out.
>
> I can confirm this bug. The problem is that org-clock-out calls a delq
> on frame-title-format regardless of the value of
> org-clock-clocked-in-display. This is a problem because
> frame-title-format can be either a list or a string. Note: the same
> problem will occur when calling org-clock-in if the value of
> frame-title-format is a string and if org-clock-clocked-in-display is
> set to 'frame-title.

Checking (listp frame-title-format) ensures there will be no error when
calling delq, but it doesn't fix the feature.  If the user's
frame-title-format is not a list then the feature will not work for no
apparent reason.  The same thing goes for global-mode-string too, which
the current release of org-mode modifies.

For the clock and timer display features to work as intended both of
these variables need to be lists with either a string or a list as the
first element.  Note that simply being a list is not enough, it must
contain a string or list as first element.  This format causes the
elements of the list to be treated as mode-line-formats recursively.

The following in both org-clock.el and org-timer.el will ensure both
variables have the correct format to begin with:

(unless (and (listp frame-title-format)
 (or (stringp (first frame-title-format))
 (listp (first frame-title-format
  (setq frame-title-format (list "" frame-title-format)))

(unless (and (listp global-mode-string)
 (or (stringp (first global-mode-string))
 (listp (first global-mode-string
  (setq global-mode-string (list "" global-mode-string)))

It might be better to do this just once in org.el or org-install.el,
since maybe other modules might want to put stuff in the mode-line or
frame-title.

Of course the user or another mode might edit either of the variables to
something bad (like a symbol or string) afterwards.  Maybe this should
be done every time before clock-in/timer-start or any time we wish to
append stuff to either of these lists?

Thanks,

George.



Re: [O] mail integration, advice?

2012-04-28 Thread Rasmus
Eric Fraga  writes:

> Rasmus  writes:

As this is becoming somewhat of a dovecot thread I've got a question:

Often, after resuming the computer from standby, say, Gnus looses the
connection to Dovecot.  I have to press `g' three times it updates mail
group and each time I must wait for it to time out. 

Has anyone found a solution to this bothersome issue?

Thanks,
Rasmus

-- 
Hooray!




Re: [O] mail integration, advice?

2012-04-28 Thread Rasmus
Eric Schulte  writes:

> Myles English  writes:
>
>> Matt,
>>
 On Thu, 26 Apr 2012 09:47:40 -0400, Matt Price said:
>>   > So, I'm wondering what solutions other org users have settled
>>   > on.
>>
>> I use gnus, offline imap, dovecot, notmuch, msmtp, bbdb3.  And
>> org-mode
>> capture including links to emails works fine.
>>
>> The end result is very good and stable through updates (I am using
>> Arch
>> Linux too) but I have to say though it did take a LOT of
>> configurating.
>>
>
> As a long-time user of gnus with imap my only complaints are the
> inability to work offline and the relatively poor sorting rules of my
> web-mail imap servers.  It sounds like dovecot and offline-imap could
> solve both of these problems.
>
> Was the offline-imap/dovecot combo difficult to configure?

No.

> Are there perhaps online instructions to which you could direct me?


> FWIW I also use Arch as my OS.

bash> sudo pacman -S dovecot

in your mail config: 

#+begin_src emacs-lisp
  (setq my/imap-method
`(nnimap "mail"
 (nnimap-stream shell)
 (nnimap-shell-program "MAIL=maildir:$HOME/mail 
/usr/lib/dovecot/imap")))

  (setq gnus-select-method '(nnml ""))

  (add-to-list 'gnus-secondary-select-methods my/imap-method)
#+end_src

this is setup is robust to no internet connection. 

Correct $HOME/mail to the proper mail dir.

–Rasmus

-- 
Enought with the bla bla!




Re: [O] Per file customisation of sectioning structure in latex export

2012-04-28 Thread Eric Fraga
Vikas Rawal  writes:

> I would like to specify the correspondence between heading levels and
> sectioning structure for latex export in a specific file. Could
> somebody point me to the right method. I have checked
>  on
> worg. Isn't there a way by which I could specify this in the header.
>
> I am using latex class "article". Isn't it possible to the sectioning
> structure through #+LATEX_CLASS_OPTIONS?
>
> Vikas


You probably want to look at

,[ C-h v org-export-latex-classes RET ]
| org-export-latex-classes's value is shown below.
| 
| Documentation:
| Not documented as a variable.
| 
| Value: (("article" "\\documentclass{scrartcl}"
|   ("\\section{%s}" . "\\section*{%s}")
|   ("\\subsection{%s}" . "\\subsection*{%s}")
|   ("\\subsubsection{%s}" . "\\subsubsection*{%s}")
|   ("\\paragraph{%s}" . "\\paragraph*{%s}")
|   ("\\subparagraph{%s}" . "\\subparagraph*{%s}"))

[...]

|  ("book" "\\documentclass[11pt]{book}"
|   ("\\part{%s}" . "\\part*{%s}")
|   ("\\chapter{%s}" . "\\chapter*{%s}")
|   ("\\section{%s}" . "\\section*{%s}")
|   ("\\subsection{%s}" . "\\subsection*{%s}")
|   ("\\subsubsection{%s}" . "\\subsubsection*{%s}"))
|  ("beamer" "\\documentclass{beamer}" org-beamer-sectioning))
| 
| [back]
`

Each entry in the list is a list which has the name of the type of
document, the latex class command and then a list of latex commands to
use for the heading levels.  Each heading level is given two latex
commands, one for numbered headings and one for unnumbered.  The choice
of numbered vs unnumbered is through the num: option.  You can generate
a template in your org file with default options and other settings
using C-c C-e t.
  
-- 
: Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 24.1.50.1
: using Org release_7.8.09-414-gb3e8a8




Re: [O] mail integration, advice?

2012-04-28 Thread Eric Fraga
Stephen Eglen  writes:

> A relatively new emacs mailer, mu4e, is worth mentioning:
>
> http://www.djcbsoftware.nl/code/mu/mu4e.html

Somewhat surreal to bring up this page, look at the second screen shot
and see my name on the first line!  Not to mention the usual suspects
from the org mailing list as well ;-).
-- 
: Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 24.1.50.1
: using Org release_7.8.09-406-g0233eb




Re: [O] mail integration, advice?

2012-04-28 Thread Eric Fraga
Eric Schulte  writes:

> As a long-time user of gnus with imap my only complaints are the
> inability to work offline and the relatively poor sorting rules of my
> web-mail imap servers.  It sounds like dovecot and offline-imap could
> solve both of these problems.

I used to use offline-imap + dovecot when I used wl and things worked
very well indeed.  When I moved to gnus, I used the gnus agent which
also now works very well (there was a period of instability a year or
two ago).  The gnus agent fully supports offline use (gnus-unplugged).
  
-- 
: Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 24.1.50.1
: using Org-mode version 7.8.09 (release_7.8.09-406-g0233eb @ 
/home/ucecesf/git/org-mode/lisp/org-install.el)




Re: [O] mail integration, advice?

2012-04-28 Thread Eric Fraga
Rasmus  writes:

> Matt Price  writes:
>
>> I'd like to take one more shot at returning to text-based email within
>> emacs, mostly because I want to be able to integrate mail easily into
>> my org-mode workflow.  
   
> I used wl but switched to Gnus. 

ditto.

>
>> - wl causes emacs to freeze up when it checks or sends mail, and can
>> take quite a long while to complete these operations
>
> I know of no solution to this.  You could run a dedicated Gnus process
> if it bothers you.

This is what I do. I have two emacs instances running all times, one for
email and one for everything else.  The second one includes all org
related stuff.  As I do capture things in org from email (gnus), I do
have to make sure that I save my org files frequently.  There's no issue
in terms of getting stuff lost as org does lock any modified but not
saved files and the other emacs will prompt if you try to save something
to an org file that has not been saved in other emacs.
 
-- 
: Eric S Fraga (GnuPG: 0xC89193D8FFFCF67D) in Emacs 24.1.50.1
: using Org-mode version 7.8.09 (release_7.8.09-406-g0233eb @ 
/home/ucecesf/git/org-mode/lisp/org-install.el)