Re: [O] [PATCH] doc/org.texi: Fix two typos in Agenda commands

2012-04-04 Thread Bastien
Hi Ippei,

Ippei FURUHASHI  writes:

> There seems to be typos about keybindings to move next/previous line
> in Agenda commands.
> Could you have a look at this patch please?

Applied, thanks for the well-formatted patch.

-- 
 Bastien



Re: [O] Google Summer of Code 2012 Student Application

2012-04-04 Thread Bastien
Hi Andrew,

Andrew Young  writes:

> My name is Andrew Young, and I would like to participate in an Org-Mode
> project for GSoC 2012.  My application for the project 'Git merge tool for
> Org files' can be found
> here.

Great!

>  I would appreciate as much feedback and criticism as possible.

First of all, make sure someone can co-mentor this project.  I'm willing
to mentor this (as the current maintainer it makes sense, especially for
people judging the project from the outside), but having Carsten as a
co-mentor would be a great win.  Make sure Carsten (cc'ed) is okay.

Carsten, being a co-mentor involves mainly three things:

1. registering on google-melange.com

2. from there, requesting to be a mentor for the GNU project

3. during the project, help the student and have IRC/phone meetings,
   at least when I'm not here (I expect to be off for 2-3 weeks this
   summer, I will tell when ASAP)

> I used the generic GNU Project student application template, which can be
> found here .

1. First things thing: you should rewrite the "summary" section to
   remove the "I believe" and other informal writing from Carsten's 
   prose.  Make it yours, make it a real summary.

2. Refer to org-element.el when you mention the Data representation.
   org-element.el will be key in representing data and diffs between 
   data (at any level.)

3. Add a documentation section, explaining what doc you will write and
   how you you will write/host it (worg is fine.)

> I have some specific questions:
> 1.  There is no implementation details or decisions in my application, just
> a basic plan of what needs to be done.  Should I start researching
> implementation details for my application?

You can look at org-element.el for the data representation.

> 2.  I would like to post my application on the community site Worg.  If
> this is appropriate, what is the proper channel to request GIT access?

Send me your public key.

> If this mailing list is not the appropriate place to discuss my
> application, please let me know and then feel free to email me directly.  I
> will also be spending as much time as possible on freenode #org-mode as
> Pwyl.

This mailing list *is* the appropriate place, no worry.

Thanks again for your proposal, this would be a great plus for Org!

Best,

-- 
 Bastien



Re: [O] Problem with exporting TAB key

2012-04-04 Thread Vladimir Lomov
Hello,
** Olaf Meeuwissen [2012-04-05 14:01:37 +0900]:

> Vladimir Lomov  writes:

>> Hello,
>> ** Nick Dokos [2012-04-05 00:13:10 -0400]:

>>> Vladimir Lomov  wrote:

 #+TITLE: Problem with exporting TAB key
 #+AUTHOR: Vladimir Lomov

 * How to make TAB key to be exported from ORG document?

 Consider the following example:
 #+name: ex1
 #+BEGIN_SRC sh :exports code
 sort -t "  " -k 3 -o file2 file1
 sort -t "  " -k 3 -o file3 file
 #+END_SRC

 How I inserting the TAB key in example: for first line I use =C-q
 C-I=, for second line I use =C-q TAB=, but in tangled file and in
 exported HTML document it is NOT a TAB just spaces.

> Just a thought but can't you use "\t"?

That would be to simple :D.

P.S. I wouldn't bother with  and ^I if "\t" just work, it is much
simple to type "\t" than ~C-q ~ or ~C-q ^I~, and portable.

$ sort --version
sort (GNU coreutils) 8.16
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later .
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by Mike Haertel and Paul Eggert.

---
WBR, Vladimir Lomov

-- 
Burnt Sienna.  That's the best thing that ever happened to Crayolas.
-- Ken Weaver



Re: [O] org-babel-C-ensure-main-wrap fails unless I add exit(0)

2012-04-04 Thread Dov Grobgeld
Oops. I sawthat  I wrote "do not get any error" though I meant "do not get
any resulting output".

On Wed, Apr 4, 2012 at 11:13, Dov Grobgeld  wrote:

> When running a babel C session under Linux/gcc I do not get any error
> unless I add exit(0) as part of the C-code snippet. For some to me not
> understood reason my program exits with error code=4, which is caught by
> org-babel-eval and the printed output is not inserted into my buffer . I
> solved this by adding `#include ` and `exit(0);` as part of
> org-babel-C-ensure-main-wrap .
>
> Should I prepare this as patch?
>
> Regards,
> Dov
>
>


Re: [O] Problem with exporting TAB key

2012-04-04 Thread Olaf Meeuwissen
Vladimir Lomov  writes:

> Hello,
> ** Nick Dokos [2012-04-05 00:13:10 -0400]:
>
>> Vladimir Lomov  wrote:
>
>>> #+TITLE: Problem with exporting TAB key
>>> #+AUTHOR: Vladimir Lomov
>
>>> * How to make TAB key to be exported from ORG document?
>
>>> Consider the following example:
>>> #+name: ex1
>>> #+BEGIN_SRC sh :exports code
>>> sort -t "   " -k 3 -o file2 file1
>>> sort -t "   " -k 3 -o file3 file
>>> #+END_SRC
>
>>> How I inserting the TAB key in example: for first line I use =C-q
>>> C-I=, for second line I use =C-q TAB=, but in tangled file and in
>>> exported HTML document it is NOT a TAB just spaces.

Just a thought but can't you use "\t"?
-- 
Olaf Meeuwissen, LPIC-2   FLOSS Engineer -- AVASYS CORPORATION
FSF Associate Member #1962   Help support software freedom
 http://www.fsf.org/jf?referrer=1962



Re: [O] Problem with exporting TAB key

2012-04-04 Thread Vladimir Lomov
Hello,
** Nick Dokos [2012-04-05 00:13:10 -0400]:

> Vladimir Lomov  wrote:

>> #+TITLE: Problem with exporting TAB key
>> #+AUTHOR: Vladimir Lomov

>> * How to make TAB key to be exported from ORG document?

>> Consider the following example:
>> #+name: ex1
>> #+BEGIN_SRC sh :exports code
>> sort -t "" -k 3 -o file2 file1
>> sort -t "" -k 3 -o file3 file
>> #+END_SRC

>> How I inserting the TAB key in example: for first line I use =C-q
>> C-I=, for second line I use =C-q TAB=, but in tangled file and in
>> exported HTML document it is NOT a TAB just spaces.

>> How to force export and tangle functions not to convert TAB to spaces?


> You can't: org-export-preprocess-string (in lisp/org-exp.el) contains a
> call to untabify:

>   (untabify (point-min) (point-max))

Now I understand why I get such results.

> which converts tabs to spaces, no questions asked. I don't know why that
> is, so maybe Bastien or Carsten can tell us the reason.

I would be glad to hear the reason.

> If you are feeling adventurous, you might want to try commenting out
> that call and see what, if anything, breaks.

I can do other thing: use another symbol to separate fields (I'm writing
a script using literate programming approach and ORG, so it is a matter
of taste what to use as separator), but I'll try your suggestion also.

> Nick

Thanks Nick.

>> * COMMENT

>> #+BEGIN_SRC sh :tangle ex.sh :shebang "#!/bin/bash" :noweb yes
>> <>
>> #+END_SRC

P.S. I noticed that you send message to my e-mail directly and CC to
mailing list. Is it "good practice" or just a habit? I thought that
answering to ML only is enough.

---
WBR, Vladimir Lomov

-- 
Why use Windows, since there is a door?
(By fac...@galileo.rhein-neckar.de, Andre Fachat)



[O] Google Summer of Code 2012 Student Application

2012-04-04 Thread Andrew Young
Hello Org-Mode mailing list,

My name is Andrew Young, and I would like to participate in an Org-Mode
project for GSoC 2012.  My application for the project 'Git merge tool for
Org files' can be found
here.
 I would appreciate as much feedback and criticism as possible.

I used the generic GNU Project student application template, which can be
found here .

I have some specific questions:
1.  There is no implementation details or decisions in my application, just
a basic plan of what needs to be done.  Should I start researching
implementation details for my application?
2.  I would like to post my application on the community site Worg.  If
this is appropriate, what is the proper channel to request GIT access?

If this mailing list is not the appropriate place to discuss my
application, please let me know and then feel free to email me directly.  I
will also be spending as much time as possible on freenode #org-mode as
Pwyl.

Regards,
Andrew Young
younga...@gmail.com


Re: [O] Problem with exporting TAB key

2012-04-04 Thread Nick Dokos
Vladimir Lomov  wrote:

> #+TITLE: Problem with exporting TAB key
> #+AUTHOR: Vladimir Lomov
> 
> * How to make TAB key to be exported from ORG document?
> 
> Consider the following example:
> #+name: ex1
> #+BEGIN_SRC sh :exports code
> sort -t " " -k 3 -o file2 file1
> sort -t " " -k 3 -o file3 file
> #+END_SRC
> 
> How I inserting the TAB key in example: for first line I use =C-q
> C-I=, for second line I use =C-q TAB=, but in tangled file and in
> exported HTML document it is NOT a TAB just spaces.
> 
> How to force export and tangle functions not to convert TAB to spaces?
> 

You can't: org-export-preprocess-string (in lisp/org-exp.el) contains a
call to untabify:

  (untabify (point-min) (point-max))

which converts tabs to spaces, no questions asked. I don't know why that
is, so maybe Bastien or Carsten can tell us the reason.

If you are feeling adventurous, you might want to try commenting out
that call and see what, if anything, breaks.

Nick

> * COMMENT
> 
> #+BEGIN_SRC sh :tangle ex.sh :shebang "#!/bin/bash" :noweb yes
> <>
> #+END_SRC
> 




Re: [O] MobileOrg setup

2012-04-04 Thread John Hendy
Well, I've made progress. I just turned off the webdav user/password
stuff and it worked fine. I'm not really worried about that, as it's
within the corporate firewall, but it still puzzles me that a browser
on the tablet could access the path with a user and password prompt
but MobileOrg couldn't, despite being setup with the same information.

Thanks for any suggestions,
John

On Wed, Apr 4, 2012 at 7:49 PM, John Hendy  wrote:
> I've configured a local WebDAV server on my machine at 
> http://localhost/dav/org.
>
> I'm new to mobile org as I just got my first mobile device. To be
> honest, I didn't find the setup instructions that intuitive, but I'm
> also no apache/WebDAV expert either! I any case, I used the Arch Linux
> wiki to setup apache and WebDAV, mounted my server at /mnt/dav,
> created /mnt/dav/org and changed permissions to my username and the
> "users" group and used org-mobile-push to push to it. Everything seems
> to be working nicely.
>
> I can visit http://localhost/dav/org and see the structure with all my
> files, agenda.org, index.org, and checksums.dat.
>
> When I use mobile org, I get the error:
> -
> Error occurred during sync: An error occurred attempting to fetch the
> url http://ip-address/dav/org/checksums.dat: invalid username or
> password.
> -
>
> If I enter the same username and password from a browser... it works.
> And that's true either of my computer or the tablet. I can view
> checksums.dat in a browser on the tablet.
>
> What am I missing?
>
>
> Thanks!
> John



[O] Problem with exporting TAB key

2012-04-04 Thread Vladimir Lomov
#+TITLE: Problem with exporting TAB key
#+AUTHOR: Vladimir Lomov

* How to make TAB key to be exported from ORG document?

Consider the following example:
#+name: ex1
#+BEGIN_SRC sh :exports code
sort -t "   " -k 3 -o file2 file1
sort -t "   " -k 3 -o file3 file
#+END_SRC

How I inserting the TAB key in example: for first line I use =C-q
C-I=, for second line I use =C-q TAB=, but in tangled file and in
exported HTML document it is NOT a TAB just spaces.

How to force export and tangle functions not to convert TAB to spaces?

* COMMENT

#+BEGIN_SRC sh :tangle ex.sh :shebang "#!/bin/bash" :noweb yes
<>
#+END_SRC



---
WBR, Vladimir Lomov



[O] MobileOrg setup

2012-04-04 Thread John Hendy
I've configured a local WebDAV server on my machine at http://localhost/dav/org.

I'm new to mobile org as I just got my first mobile device. To be
honest, I didn't find the setup instructions that intuitive, but I'm
also no apache/WebDAV expert either! I any case, I used the Arch Linux
wiki to setup apache and WebDAV, mounted my server at /mnt/dav,
created /mnt/dav/org and changed permissions to my username and the
"users" group and used org-mobile-push to push to it. Everything seems
to be working nicely.

I can visit http://localhost/dav/org and see the structure with all my
files, agenda.org, index.org, and checksums.dat.

When I use mobile org, I get the error:
-
Error occurred during sync: An error occurred attempting to fetch the
url http://ip-address/dav/org/checksums.dat: invalid username or
password.
-

If I enter the same username and password from a browser... it works.
And that's true either of my computer or the tablet. I can view
checksums.dat in a browser on the tablet.

What am I missing?


Thanks!
John



Re: [O] Table cell refs with @0 or $0 are broken

2012-04-04 Thread James Harkins
At Wed, 04 Apr 2012 13:17:54 -0400,
Nick Dokos wrote:
> Did this ever work? I've spot-checked back to 6.36c and I cannot find
> a release where it actually worked: assuming I haven't made a mistake,
> it seems to be an implementation oversight, rather than some patch
> specifically breaking the functionality. 

Thanks, by the way, to all for the quick attention to this! It's some relief, 
at least, to know that I wasn't grossly misreading the manual :)

James


--
James Harkins /// dewdrop world
jamshar...@dewdrop-world.net
http://www.dewdrop-world.net

"Come said the Muse,
Sing me a song no poet has yet chanted,
Sing me the universal."  -- Whitman

blog: http://www.dewdrop-world.net/words
audio clips: http://www.dewdrop-world.net/audio
more audio: http://soundcloud.com/dewdrop_world/tracks



Re: [O] Table cell refs with @0 or $0 are broken

2012-04-04 Thread Nick Dokos
Christian Moe  wrote:

> On 4/4/12 11:05 PM, Nick Dokos wrote:
> (...)
> >> #+TBLFM: @2$2..@>$>=@0;%.3f
> >>
> >> Try substituting `$0' for `@0', it works the same. @0 designates the
> >> current row, and the current column is taken as implied. Ditto when $0
> >> designates the current column. However, `@0$0' will not work.
> >>
> >
> > Ah, OK - I'm blind: on rereading it, and retrying it, I see that it just
> > pushes everything down to 0.000 - but that looks like a different bug to
> > me, no?
> >
> > Nick
> 
> That's what I'm getting, and you're right, it does look different.
> 

Ah, you shouldn't listen to me: even though it looks different, a patch that
I was trying out to fix James's problem seems to fix this problem too - so
they must be the same after all.

I just added a couple of sanity checks to org-table-get-range so that c1 and
c2 are set to a sane value not only when they are nil but also when they are
0 (around line 2666 or so in org-table.el):

   ...
   (if (not c1) (setq c1 col))
   (if (not c2) (setq c2 col))
   (if (= c1 0) (setq c1 col))
   (if (= c2 0) (setq c2 col))
   ...

Nick




[O] Problems syncing from MobileOrg 0.8.5 (Android) via SD card

2012-04-04 Thread Brian van den Broek
Hi all,

I have an Android phone and I am taking another go at setting up
MobileOrg for android (the matburt version at
 and
).

I don't want to use dropbox and at present cannot set up my own SSH or
WebDAV server; I'm happy to use the SD card for syncing.

Following the directions at
https://github.com/matburt/mobileorg-android/wiki/Documentation I have
the desired org files on my desktop syncing to MobileOrg on the phone
just fine. I also have items syncing with my phone's calendar. This is
all most excellent.

I have created some captured items with MobileOrg, have used it to
change the TODO state of extant items, and have created new child
nodes with it, too. (So, I've been able to create changes on the phone
in multiple ways that I would expect to be brought over to the desktop
by syncing.) However, when I mount the phone's SD card and run M-x
org-mobile-pull, I get the message "No new items."

As far as I can figure out, I've done what I ought to do to bring
changes from MobileOrg to my desktop. I by no means, however, exclude
the possibility that I am doing something daft. Any pointers for how I
can further investigate the issue?

Some relevant details:

My phone is a Samsung GT-B7510 running Android 2.2.2. I have MobileOrg
version 0.8.5 installed.

M-x emacs-version yields: GNU Emacs 23.2.1 (x86_64-pc-linux-gnu, GTK+
Version 2.20.1) of 2010-12-11 on brahms, modified by Debian
M-x org-version yields: Org-mode version 7.8.08

My .emacs contains the following:
(setq org-mobile-inbox-for-pull "/home/brian/docs/org/from-mobile.org")
(setq org-mobile-directory "/media/ANDROIDSD/mobileorg")

All other values revealed by M-x customize-group org-mobile are at
their default settings.

Relevant MobileOrg settings on the phone are:
Synchronizarion Mode: SDCard
Index Path: /sdcard/mobileorg/index.org
Background Sync is disabled

I have tried running org-mobile-pull both with and without an empty
file /home/brian/docs/org/from-mobile.org (with read and write
permissions) present. I have also tried with a filename lacking the
`-' character.

For sake of completeness, I did try enabling background sync and
waiting for it to run before mounting the SD card and running M-x
org-mobile-pull.

One other possibly relevant fact: I've put the MobilOrg TODO widget on
my phone's desktop. On rebooting the phone, it displays something like
`Widget text' (it flashes by pretty quick), and otherwise never
displays anything. Clicking on it serves only to take me directly to
the MobileOrg capture interface.

Thanks for any suggestions,

Brian vdB



Re: [O] Table cell refs with @0 or $0 are broken

2012-04-04 Thread Christian Moe

On 4/4/12 11:05 PM, Nick Dokos wrote:
(...)

#+TBLFM: @2$2..@>$>=@0;%.3f

Try substituting `$0' for `@0', it works the same. @0 designates the
current row, and the current column is taken as implied. Ditto when $0
designates the current column. However, `@0$0' will not work.



Ah, OK - I'm blind: on rereading it, and retrying it, I see that it just
pushes everything down to 0.000 - but that looks like a different bug to
me, no?

Nick


That's what I'm getting, and you're right, it does look different.

Yours,
Christian




Re: [O] Table cell refs with @0 or $0 are broken

2012-04-04 Thread Nick Dokos
Christian Moe  wrote:

> 
> 
> On 4/4/12 7:17 PM, Nick Dokos wrote:
> > James Harkins  wrote:
> >
> >> Don't know if this is fixed in a later org update, but -- the online
> >> org manual says that you can refer to table cells in the current row
> >> or column using @0 and $0 respectively, but that's definitely not
> >> working on my machine.
> (...)
> >> ** Broken: "Not in table data field"
> >> | 1.0 |
> >> | 2.0 |
> >> | |
> >> #+TBLFM: @>$1=vsum(@1$0..@2$0)
> (...)
> > Did this ever work? I've spot-checked back to 6.36c and I cannot find
> > a release where it actually worked: assuming I haven't made a mistake,
> > it seems to be an implementation oversight, rather than some patch
> > specifically breaking the functionality.
> >
> > Nick
> >
> 
> I find that zero references do work, albeit not quite as one might be 
> led to believe by the manual.
> 
> Agreed, it does not work in James' example. And agreed, the manual 
> seems to me to suggest, to the contrary, that `@1$0' should work. 
> Though it does also make clear that the `$0' is superfluous and can be 
> omitted, because when only the row is given, the current column is 
> taken as implied. So we all agree `@1' works.
> 
> But consider the following example, which also works. Here is some 
> output from fitting a linear trend in Org-Babel/R. (I've shaved off 
> some decimals to fit this in an email.) Computing the TBLFM will round 
> the number in each cell to three decimal places.
> 
> #+results:
> | Record   |Slope |ConfLower |ConfUpper |
> |--+--+--+--|
> | GISTEMP  | 0.0173837600 | 0.0133209130 | 0.0214466060 |
> | HadCrut3 | 0.0158602890 | 0.0118664610 | 0.0198541180 |
> #+TBLFM: @2$2..@>$>=@0;%.3f
> 
> Try substituting `$0' for `@0', it works the same. @0 designates the 
> current row, and the current column is taken as implied. Ditto when $0 
> designates the current column. However, `@0$0' will not work.
> 

Ah, OK - I'm blind: on rereading it, and retrying it, I see that it just
pushes everything down to 0.000 - but that looks like a different bug to
me, no?

Nick

> It would seem that either one of $0 and @0 on its own in practice 
> designates "the current cell".
> 
> Also, I can't think of a situation where either would be needed to 
> designate a whole column or row respectively.
> 
> 
> Yours,
> Christian
> 
> 
> 



Re: [O] Table cell refs with @0 or $0 are broken

2012-04-04 Thread Nick Dokos
Christian Moe  wrote:

> 
> 
> On 4/4/12 7:17 PM, Nick Dokos wrote:
> > James Harkins  wrote:
> >
> >> Don't know if this is fixed in a later org update, but -- the online
> >> org manual says that you can refer to table cells in the current row
> >> or column using @0 and $0 respectively, but that's definitely not
> >> working on my machine.
> (...)
> >> ** Broken: "Not in table data field"
> >> | 1.0 |
> >> | 2.0 |
> >> | |
> >> #+TBLFM: @>$1=vsum(@1$0..@2$0)
> (...)
> > Did this ever work? I've spot-checked back to 6.36c and I cannot find
> > a release where it actually worked: assuming I haven't made a mistake,
> > it seems to be an implementation oversight, rather than some patch
> > specifically breaking the functionality.
> >
> > Nick
> >
> 
> I find that zero references do work, albeit not quite as one might be 
> led to believe by the manual.
> 
> Agreed, it does not work in James' example. And agreed, the manual 
> seems to me to suggest, to the contrary, that `@1$0' should work. 
> Though it does also make clear that the `$0' is superfluous and can be 
> omitted, because when only the row is given, the current column is 
> taken as implied. So we all agree `@1' works.
> 
> But consider the following example, which also works. Here is some 
> output from fitting a linear trend in Org-Babel/R. (I've shaved off 
> some decimals to fit this in an email.) Computing the TBLFM will round 
> the number in each cell to three decimal places.
> 
> #+results:
> | Record   |Slope |ConfLower |ConfUpper |
> |--+--+--+--|
> | GISTEMP  | 0.0173837600 | 0.0133209130 | 0.0214466060 |
> | HadCrut3 | 0.0158602890 | 0.0118664610 | 0.0198541180 |
> #+TBLFM: @2$2..@>$>=@0;%.3f
> 
> Try substituting `$0' for `@0', it works the same. @0 designates the 
> current row, and the current column is taken as implied. Ditto when $0 
> designates the current column. However, `@0$0' will not work.
> 

It seems to work for me - although I've been juggling branches and
I may be lost in the forest at this point.

I (think I) am using Org-mode version 7.8.08 (release_7.8.07.206.g76e7b)
and I get no error with James's first example, the "Not in table data
field" error with James' second examples and *no* error with your
example in any of the three cases: $0, @0 or @0$0.

Nick

> It would seem that either one of $0 and @0 on its own in practice 
> designates "the current cell".
> 
> Also, I can't think of a situation where either would be needed to 
> designate a whole column or row respectively.
> 




[O] Filtering agenda by the "top" category

2012-04-04 Thread John Wiegley
I discovered the < key in the agenda yesterday (by accident!), which filters
the Agenda down to entries having the same category.

However, I use both *categories* and *projects*.  For example:

  * Work
:CATEGORY: Work
:OVERLAY:  (face (:background "#fdfdeb"))
  ** PROJECT Foo
:CATEGORY: Foo

I use :CATEGORY: for my project here so it shows up in the leftmost column of
my agenda.  I don't want every project displaying as just "Work".  I use the
:OVERLAY: so that all Work items have the same background color, which is a
better way of seeing at a glance which *category* every item falls into.

What this means is that although I can use < to filter by *project*, I can't
filter down to the "Work" *category*.  So that's what the code below does.  I
bind it to >, since I wasn't using what that binding does.

Also, I found a bug: passing a prefix argument to < doesn't have any effect.
The code doesn't use that argument in any meaningful way.

John

(define-key org-agenda-mode-map ">" 'org-agenda-filter-by-top-category)

(defun org-find-top-category (&optional pos)
  (save-excursion
(with-current-buffer (if pos (marker-buffer pos) (current-buffer))
 (if pos (goto-char pos))
 ;; Skip up to the topmost parent
 (while (ignore-errors (outline-up-heading 1) t))
 (ignore-errors
   (nth 4 (org-heading-components))

(defvar org-agenda-filtered-by-top-category nil)

(defun org-agenda-filter-by-top-category (strip)
  "Keep only those lines in the agenda buffer that have a specific category.
The category is that of the current line."
  (interactive "P")
  (if org-agenda-filtered-by-top-category
  (progn
(setq org-agenda-filtered-by-top-category nil)
(org-agenda-filter-show-all-cat))
(let ((cat (org-find-top-category (org-get-at-bol 'org-hd-marker
  (if cat (org-agenda-filter-top-category-apply cat)
(error "No top-level category at point")

(defun org-agenda-filter-top-category-apply (category)
  "Set FILTER as the new agenda filter and apply it."
  (org-agenda-set-mode-name)
  (save-excursion
(goto-char (point-min))
(while (not (eobp))
  (let* ((pos (org-get-at-bol 'org-hd-marker))
 (topcat (and pos (org-find-top-category pos
(if (and topcat (not (string= category topcat)))
(org-agenda-filter-hide-line 'category)))
  (beginning-of-line 2)))
  (if (get-char-property (point) 'invisible)
  (org-agenda-previous-line))
  (setq org-agenda-filtered-by-top-category t))




Re: [O] Table cell refs with @0 or $0 are broken

2012-04-04 Thread Christian Moe



On 4/4/12 7:17 PM, Nick Dokos wrote:

James Harkins  wrote:


Don't know if this is fixed in a later org update, but -- the online
org manual says that you can refer to table cells in the current row
or column using @0 and $0 respectively, but that's definitely not
working on my machine.

(...)

** Broken: "Not in table data field"
| 1.0 |
| 2.0 |
| |
#+TBLFM: @>$1=vsum(@1$0..@2$0)

(...)

Did this ever work? I've spot-checked back to 6.36c and I cannot find
a release where it actually worked: assuming I haven't made a mistake,
it seems to be an implementation oversight, rather than some patch
specifically breaking the functionality.

Nick



I find that zero references do work, albeit not quite as one might be 
led to believe by the manual.


Agreed, it does not work in James' example. And agreed, the manual 
seems to me to suggest, to the contrary, that `@1$0' should work. 
Though it does also make clear that the `$0' is superfluous and can be 
omitted, because when only the row is given, the current column is 
taken as implied. So we all agree `@1' works.


But consider the following example, which also works. Here is some 
output from fitting a linear trend in Org-Babel/R. (I've shaved off 
some decimals to fit this in an email.) Computing the TBLFM will round 
the number in each cell to three decimal places.


#+results:
| Record   |Slope |ConfLower |ConfUpper |
|--+--+--+--|
| GISTEMP  | 0.0173837600 | 0.0133209130 | 0.0214466060 |
| HadCrut3 | 0.0158602890 | 0.0118664610 | 0.0198541180 |
#+TBLFM: @2$2..@>$>=@0;%.3f

Try substituting `$0' for `@0', it works the same. @0 designates the 
current row, and the current column is taken as implied. Ditto when $0 
designates the current column. However, `@0$0' will not work.


It would seem that either one of $0 and @0 on its own in practice 
designates "the current cell".


Also, I can't think of a situation where either would be needed to 
designate a whole column or row respectively.



Yours,
Christian





Re: [O] Org release 7.8.08 (BUGFIX-only release)

2012-04-04 Thread Achim Gratz
Bastien writes:
> Not sure I understand: the tag release_7.8.08 *is* on the server and was
> pushed from the maint branch (see http://orgmode.org/w/org-mode.git).  

Git has two types of tags: lightweight, which really aren't much more
than a different way to mark the head of a tree without actually
creating a branch at that point.  The second kind is the annotated one,
which is more like a commit - it comes with a description like a commit,
just not with a change set.

> Do you mean I need to annotate it?  (I will do.)

Yes, from the git-tag man page:

  By default (without --all or --tags) git describe only shows annotated
  tags. For more information about creating annotated tags see the -a
  and -s options to git-tag(1).

This is a peculiar choice, but it makes much sense when considering that
release tags would almost always be annotated ones (they could carry the
changelog between releases for instance).  Now if you use only
lightweight tags for keeping track of various points in you Git history
by name, git describe will still pick up the release tags and not your
nilly-willy ones.


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] org-mode fontification error [6 times]

2012-04-04 Thread Nick Dokos
Henning Redestig  wrote:

> Better now but still some issues here, now if I start a new org buffer and 
> type
> 
>  
> to complete the source block, I get org-mode fontification error again.


Probably more off-by-1 errors - the backtrace shows:

,
| 
| Debugger entered--Lisp error: (args-out-of-range 15 25)
|   add-text-properties(25 15 (face org-block-end-line))
|   (progn (setq end (match-end 0) end1 ))
|   (if (re-search-forward (concat "^[  ]*#\\+end" (match-string 4) "\\>.*") 
nil t) (progn (setq end (match-end 0) end1 ...)))
|   (when (re-search-forward (concat "^[]*#\\+end" (match-string 4) 
"\\>.*") nil t) (setq end (match-end 0) end1 ...)))
|   ...
|   org-fontify-meta-lines-and-blocks-1(24)
|   (condition-case nil (org-fontify-meta-lines-and-blocks-1 limit) ((debug 
error) (message "org-mode fontification error")))
|   org-fontify-meta-lines-and-blocks(24)
|   font-lock-fontify-keywords-region(1 24 nil)
|   font-lock-default-fontify-region(1 24 nil)
|   font-lock-fontify-region(1 24)
|   run-hook-with-args(font-lock-fontify-region 1 24)
|   byte-code("\302\303#\207" [start next run-hook-with-args 
jit-lock-functions] 4)
|   jit-lock-fontify-now(1 501)
|   jit-lock-function(1)
`

so this code is probably at fault:


,
|...
|  (quoting
|   (add-text-properties beg1 (min (point-max) (1+ end1))
|'(face org-block))) ; end of source block
|  ((not org-fontify-quote-and-verse-blocks))
|  ((string= block-type "quote")
|   (add-text-properties beg1 (1+ end1) '(face org-quote)))
|  ((string= block-type "verse")
|   (add-text-properties beg1 (1+ end1) '(face org-verse
| (add-text-properties beg beg1 '(face 
org-block-begin-line))
| (add-text-properties (1+ end) (1+ end1) '(face 
org-block-end-line))  
|   ...
`

In this case, adding 1 to end1 seems to be correct, but adding 1 to end
does not.  However, I'm getting more and more worried that fixing things
in this instance might break other situations.

Also, as you can see there are more (1+ end1) instances, which will
probably cause similar problems in other situations: this whole function
could do with a review.

And another point: even though these changes apparently fix these
problems, if there are *other* problems (e.g. the wrong thing fontified,
particularly if the "wrong" thing is displaced one char from the "right"
thing), then these changes are probably wrong and will need some more
complicated solution, perhaps along the lines of Bastien's suggestion
below. So keep an eye out not only for the fontification error message,
but also for wrong fontification in the buffer.

Nick

PS. BTW, here's a debugging hint: getting a backtrace from inside a
condition-case that eats the error required two things: setting
debug-on-error to t and modifying 

--8<---cut here---start->8---
(defun org-fontify-meta-lines-and-blocks (limit)
  (condition-case nil
  (org-fontify-meta-lines-and-blocks-1 limit)
((debug error) (message "org-mode fontification error"
--8<---cut here---end--->8---

to add that debug cookie - see the doc for condition-case: C-h f
condition-case RET.

> 
> 2012/4/4 Bastien :
> > Hi Nick,
> >
> > Nick Dokos  writes:
> >
> >> Confirmed. It only happens when you start typing into an empty buffer.
> >> Looks like an off-by-one error in 
> >> org.el:org-fontify-meta-lines-and-blocks-1,
> >> aroung line 5487:
> >>
> >> ,
> >> |         ;; just any other in-buffer setting, but not indented
> >> |         (add-text-properties
> >> |          beg (1+ (match-end 0))
> >> |          '(font-lock-fontified t face org-meta-line))
> >> `
> >>
> >> The second arg should probably be just (match-end 0).
> >
> > That's correct.  I first thought (min (point-max) (1+ (match-end 0)))
> > would have been safer, but I really don't see why the 1+.
> >
> > Please confirm this is fixed.
> >
> > Thanks,
> >
> > --
> >  Bastien
> 
> 
> 
> -- 
> /Henning
> 



Re: [O] [patch] Re: meaning of body-only in org-export-as-html

2012-04-04 Thread Chris Gray
Bastien  writes:
>> By the way, I am in the "Processing" section in the list of people who
>> have signed papers on Worg.  However, I received confirmation that my
>> papers went through a long time ago.  Should I correct Worg on this?
>
> Let me know when this is done.

I did this yesterday.  It turned out that I was listed in two places:
once with my full name and once with the short name that I go by.  I
just removed my short name from the list.

Cheers,
Chris



[O] [PATCH] doc/org.texi: Fix two typos in Agenda commands

2012-04-04 Thread Ippei FURUHASHI
Dear org-mode maintainer,

There seems to be typos about keybindings to move next/previous line
in Agenda commands.
Could you have a look at this patch please?

Best regards,
IP


0001-doc-org.texi-Fix-two-typos-in-Agenda-commands.patch
Description: Binary data


Re: [O] org-mode fontification error [6 times]

2012-04-04 Thread Henning Redestig
Better now but still some issues here, now if I start a new org buffer and type

:
> Hi Nick,
>
> Nick Dokos  writes:
>
>> Confirmed. It only happens when you start typing into an empty buffer.
>> Looks like an off-by-one error in org.el:org-fontify-meta-lines-and-blocks-1,
>> aroung line 5487:
>>
>> ,
>> |         ;; just any other in-buffer setting, but not indented
>> |         (add-text-properties
>> |          beg (1+ (match-end 0))
>> |          '(font-lock-fontified t face org-meta-line))
>> `
>>
>> The second arg should probably be just (match-end 0).
>
> That's correct.  I first thought (min (point-max) (1+ (match-end 0)))
> would have been safer, but I really don't see why the 1+.
>
> Please confirm this is fixed.
>
> Thanks,
>
> --
>  Bastien



-- 
/Henning



Re: [O] Bug: Tag Completion Not Prompting for all tags

2012-04-04 Thread Mike McLean
FYI

I saw the other thread related to org-tag-fast-selection and Ido mode, so I
just re tested my minimal example below. I get the same error with:

release_7.8.07-207-g5d9c
Org-mode version 7.8.08 (release_7.8.07.207.g5d9c)

This version includes the April 3 commit e48d67ed6 that mentions "bug when
gathering tag completion options"

Mike

On Tuesday, April 3, 2012, Mike McLean wrote:

> OK - sorry, it took an extra day. Here is the new (third, and hopefully
> last) test case.
> 1 Steps to Reproduce:
> 1.1 Start Emacs clean
>
> /Applications/Emacs.app/Contents/MacOS/Emacs -Q
>
> 1.1.1 Note: Emacs Version
>
> M-x emacs-version 
> GNU Emacs 24.0.95.1 (x86_64-apple-darwin, NS apple-appkit-1038.36) of 
> 2012-04-03 on bob.porkrind.org
>
> 1.2 Clone Git HEAD Org-Mode (to get the new commit)
>
> $ git clone git://orgmode.org/org-mode.git
>
> 1.3 Load Cloned version of org-mode
>
> Evaluate the following Lisp in *scratch*
>
> (require 'ido)
> (ido-mode t)
>
> (setq load-path (cons "~/tmp/new-new-new/org-mode/lisp" load-path))
> (setq load-path (cons "~/tmp/new-new-new/org-mode/contrib/lisp" load-path))
> (require 'org-install)
> (setq org-completion-use-ido t)
> (setq org-tag-alist (quote (
> (:startgroup)
> ("tag_a" . ?a)
> ("tag_b" . ?b)
> (:endgroup)
> ("tag_c" . ?c)
> )))
>
> 1.4 Open the following org-mode file
>
> * Header 1
> ** Header 1.1
> * Header 2
>   :Personal:
>
> 1.4.1 Note: Org-Version
>
> M-x org-version 
> release_7.8.07-201-g72d9
> Org-mode version 7.8.08 (release_7.8.07.201.g72d9)
>
> 1.5 Point should be on the first asterisk for “Header 1”
> 1.6 Type C-c C-q to bring up Tag selection
>
> The expected result is the fast tag selection window-split; this works
> 1.7 Type  to enter free tag selection
>
> The expected result is that the Minibuffer prompts with Tag: and the ido 
> completion
> (this works)
> 1.8 Type t to begin to ido select one of the tags
>
> The expected result is the ido completion narrowing the choices; the
> result
>
> Error in post-command-hook (ido-exhibit): (wrong-type-argument sequencep 97)
>
> Note that M-x toggle-debug-on-error doesn’t show anything different than
> the above.
>
> On Apr 2, 2012, at 11:50 AM, Bastien wrote:
>
> Hi Mike,
>
> Mike McLean  'mike.mcl...@pobox.com');>> writes:
>
> The dangers of minimal testing setups is rearing its ugly head.
>
>
> You bet :)
>
> I can
>
> confirm that your latest patch does fix the minimal example that I
>
> provided. It does not, sadly, fix a similar case where the
>
> org-tag-alist variable includes the :startgroup and :endgroup tokens.
>
> If you can my most recent steps to reproduce, step 1.3, and add those
>
> tokens, the error is "Wrong type argument: stringp, :endgroup"
>
>
> Can you resubmit the full test case?
>
> Thank you for you patience :)
>
>
> Thanks for your collaboration :)
>
> --
> Bastien
>
>
>


Re: [O] Table cell refs with @0 or $0 are broken

2012-04-04 Thread Nick Dokos
James Harkins  wrote:

> Don't know if this is fixed in a later org update, but -- the online
> org manual says that you can refer to table cells in the current row
> or column using @0 and $0 respectively, but that's definitely not
> working on my machine.
> 
> ** Works
> | 1.0 |
> | 2.0 |
> |  3. |
> #+TBLFM: @>$1=vsum(@1..@2)
> 
> ** Broken: "Not in table data field"
> | 1.0 |
> | 2.0 |
> | |
> #+TBLFM: @>$1=vsum(@1$0..@2$0)
> 
> It's not a critical issue because it does work to omit $0 -- so my
> immediate problem is solved (getting the sum to calculate). But it
> costs a little extra time because either a/ the manual is wrong or b/
> $0 is supposed to work and there's a bug.
> 

Did this ever work? I've spot-checked back to 6.36c and I cannot find
a release where it actually worked: assuming I haven't made a mistake,
it seems to be an implementation oversight, rather than some patch
specifically breaking the functionality. 

Nick



[O] Combining font commands

2012-04-04 Thread YurB
Dear list,

Is there any way to have both bold and italic font on the same word like
*/this/* somehow? Neither */this/* nor /*this*/ seems to work for me.



Re: [O] [PATCH] - Fix org-fast-tag-selection

2012-04-04 Thread Nick Dokos
Bernt Hansen  wrote:

> Bastien  writes:
> 
> > Hi Nick,
> >
> > Nick Dokos  writes:
> >
> >> With completing-read, I do C-c C-q  and get a prompt in the
> >> minibuffer "Tag: " with no options given. So I press another  and
> >> get the following error:
> >
> > This should have been fixed already -- can you confirm?
> 

> This error is gone ...

Confirmed.

Nick




Re: [O] [PATCH] - Fix org-fast-tag-selection

2012-04-04 Thread Bernt Hansen
Bastien  writes:

> Hi Nick,
>
> Nick Dokos  writes:
>
>> With completing-read, I do C-c C-q  and get a prompt in the
>> minibuffer "Tag: " with no options given. So I press another  and
>> get the following error:
>
> This should have been fixed already -- can you confirm?

Hi Bastien,

This error is gone but I see other problems.

When completing tags with C-c C-q TAB and selecting a tag that is part
of a group which are supposed to be mutually exclusive it doesn't
remove other existing tags in that group.

ie.

* DONE Test   :@home:

with

(setq org-tag-alist (quote ((:startgroup)
("@errand" . ?e)
("@office" . ?o)
("@home" . ?H)
("@farm" . ?f)
(:endgroup)
("PHONE" . ?p)
("WAITING" . ?w)
("HOLD" . ?h)
("PERSONAL" . ?P)
("WORK" . ?W)
("FARM" . ?F)
("ORG" . ?O)
("NORANG" . ?N)
("crypt" . ?E)
("MARK" . ?M)
("NOTE" . ?n)
("BZFLAG" . ?B)
("CANCELLED" . ?c)
("FLAGGED" . ??
if I do C-c C-q f
then @home changes to @farm as it should

But if I instead complete the tag with

C-C C-q TAB @farm RET

then I get BOTH tags on the line which is wrong.

* DONE Test :@farm:@home:

Org-mode version 7.8.08 (release_7.8.07.206.g76e7b)

Also my IDO completion of tags doesn't work (but I'm not sure if that
ever did).  I can't to C-c C-q TAB home RET and get the @home tag -- I
need to enter the @ for it to work.  Without the @ I get errors like
this:

Error in post-command-hook: (wrong-type-argument sequencep 104)

when what I enter doesn't match my tag list.

Regards,
Bernt



[O] Table cell refs with @0 or $0 are broken

2012-04-04 Thread James Harkins
Don't know if this is fixed in a later org update, but -- the online org manual 
says that you can refer to table cells in the current row or column using @0 
and $0 respectively, but that's definitely not working on my machine.

** Works
| 1.0 |
| 2.0 |
|  3. |
#+TBLFM: @>$1=vsum(@1..@2)

** Broken: "Not in table data field"
| 1.0 |
| 2.0 |
| |
#+TBLFM: @>$1=vsum(@1$0..@2$0)

It's not a critical issue because it does work to omit $0 -- so my immediate 
problem is solved (getting the sum to calculate). But it costs a little extra 
time because either a/ the manual is wrong or b/ $0 is supposed to work and 
there's a bug.

Thanks,
James


--
James Harkins /// dewdrop world
jamshar...@dewdrop-world.net
http://www.dewdrop-world.net

"Come said the Muse,
Sing me a song no poet has yet chanted,
Sing me the universal."  -- Whitman

blog: http://www.dewdrop-world.net/words
audio clips: http://www.dewdrop-world.net/audio
more audio: http://soundcloud.com/dewdrop_world/tracks



[O] org-babel-C-ensure-main-wrap fails unless I add exit(0)

2012-04-04 Thread Dov Grobgeld
When running a babel C session under Linux/gcc I do not get any error
unless I add exit(0) as part of the C-code snippet. For some to me not
understood reason my program exits with error code=4, which is caught by
org-babel-eval and the printed output is not inserted into my buffer . I
solved this by adding `#include ` and `exit(0);` as part of
org-babel-C-ensure-main-wrap .

Should I prepare this as patch?

Regards,
Dov


Re: [O] Problems with (defvar foo) and Emacs 23

2012-04-04 Thread Bastien
Achim Gratz  writes:

> Bastien writes:
>> 1. one about `buffer-substring-filters'
>> We should write a compatibility function to get rid of the first
>> warning.
>
> Actually it is a variable and it "just" needs to be aliased suitably,
> depending on which Emacs version it encounters.  

I'm afraid this is not that straightforward, because the use of
`filter-buffer-substring-functions' and `buffer-substring-filters'
differ.

> This should be done
> with a macro in org-compat.el (which doesn't exist yet, see my attempt
> at such a macro in another thread), then org can use the aliased name
> only.  In general I'd say org-compat.el is in need of some love.

Make yourself at home there :)
>
>> 2. one about `entry' not having a prefix
>> Prefixing `entry' is not straightforward but should be possible.
>
> I don't know enough about its uses to help here.

No problem.

>> 3. one about `date', `annotation', 'initial' not having a prefix
>> As for the last warnings, I think we'll have to live with it,
>> but chasing down places where *some* instance can be prefixed
>> (or renamed with a more explicit name) could be good.  Not a
>> high priority though.
>
> I think one could also alias these (the prefix should be that of the
> package where they come from), so that all uses within org use that
> prefix.  That would probably leave one warning at the point where the
> alias is defined, which could be wrapped into with-no-warning.

Good idea.  When you have time for a patch to testing this solution, 
let me know.

Thanks!

-- 
 Bastien



Re: [O] small typo in docstring for org-icalendar.el

2012-04-04 Thread Bastien
Hi Stephen,

Stephen Eglen  writes:

> org-icalendar-timezone: doc string fix

Applied to master, thanks!

-- 
 Bastien



Re: [O] small typo in docstring for org-icalendar.el

2012-04-04 Thread Stephen Eglen
oops, sorry Bastien, old (ediff) habits die hard!

org-icalendar-timezone: doc string fix

* lisp/org-icalendar.el (org-icalendar-timezone): Fix typo and clarify
meaning.

Small typo (of -> or); clarify meaning of how timezone is calculated if
this variable is left as nil.

TINYCHANGE

diff --git a/lisp/org-icalendar.el b/lisp/org-icalendar.el
index d73a619..ac6a661 100644
--- a/lisp/org-icalendar.el
+++ b/lisp/org-icalendar.el
@@ -194,7 +194,7 @@ or if they are only using it locally."
 
 (defcustom org-icalendar-timezone (getenv "TZ")
   "The time zone string for iCalendar export.
-When nil of the empty string, use the abbreviation retrieved from Emacs."
+When nil or the empty string, use output from \(current-time-zone\)."
   :group 'org-export-icalendar
   :type '(choice
  (const :tag "Unspecified" nil)



Re: [O] [patch] Re: meaning of body-only in org-export-as-html

2012-04-04 Thread Bastien
Hi Chris,

Chris Gray  writes:

> Bastien  writes:
>> I'm ready to apply this patch, but can you add a proper Emacs 
>> ChangeLog?
>
> Updated patch attached.

Applied, thanks for the effort in formatting/documenting it.

> By the way, I am in the "Processing" section in the list of people who
> have signed papers on Worg.  However, I received confirmation that my
> papers went through a long time ago.  Should I correct Worg on this?

Let me know when this is done.

Best,

-- 
 Bastien



Re: [O] Org release 7.8.08 (BUGFIX-only release)

2012-04-04 Thread Bastien
Achim Gratz  writes:

> Bastien writes:
>> Chris Randle  writes:
>>
>>> org-version reports 7.8.07
>>
>> Fixed.
>
> I think you've either not pushed the fixed (annotated) tag to the server
> yet or it has rejected the push (in this case you must delete the tag on
> the server first and then push it again).

Not sure I understand: the tag release_7.8.08 *is* on the server and was
pushed from the maint branch (see http://orgmode.org/w/org-mode.git).  

Do you mean I need to annotate it?  (I will do.)

-- 
 Bastien