[Orgmode] Re: Project Planning Tutorial Using Org-Mode

2008-07-25 Thread rolf
Hallo Peter!

[snip]
>   git clone git://pmade.com/rc
>
> The file you want is:
>
>   emacs/emacs.d/pmade-org.el
>
What a clean and concise rc-setup! 

And,  thx for sharing!

--
rolf



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


[Orgmode] Infinite Loop with org-mode and speedbar with cc-mode

2008-11-18 Thread Rolf Unger
Hi,

I am using org-mode in version 6.09a and ran into a problem
with speedbar and cc-mode. And I don't want to drop one of
these modes, because all three of them are great tools and
essential for my daily work.

The emacs version that I am using is for win32:

GNU Emacs 22.3.1 (i386-mingw-nt5.0.2195)
 of 2008-09-06 on SOFT-MJASON

I can't navigate from the speedbar frame to functions or
methods in the source code file. In my case speedbar is based
on imenu, not on the TAGS file.

If I use imenu directly (M-x imenu and completion to find the
functions there is no problem), but when started from
speedbar, emacs eats up all the CPU resources and I need
to interrupt it with C-g.

If I enable debug-on-quit I get the attached backtraces
for a plain c-file and for a java file. I send them as
attachments for the sake of the linebreaks, because several
lines are rather long.

I am quite sure, that I am stuck in an infinite loop.

Other modes that are not based on cc-mode like perl-mode or
sql-mode don't show this behaviour. And I did my tests with
several kind of c source files, even a minimalistic hello-world
has this problem:

 plain.c --
#include 

int main( int argc, char *argv[])
{
   printf("Hello, World!\n");
   return 0;
}

my setup for org-mode is:

 (require 'org-install))

 (add-to-list 'auto-mode-alist '("\\.org$" . org-mode))
 (global-set-key "\C-cl" 'org-store-link)
 (global-set-key "\C-ca" 'org-agenda)
 (global-set-key "\C-ct" 'org-todo-list)

 (setq org-agenda-files (list "~/org"))
 (setq org-archive-location "done/%s::* Finished Tasks")

 (require 'remember)
 (org-remember-insinuate)
 (setq org-directory "~/org")
 (setq org-default-notes-file (concat org-directory "/notes.org"))
 (global-set-key "\C-cr" 'org-remember)
 (global-set-key "\C-cc" 'remember-clipboard)

Thanks, Rolf.

GNU Emacs 22.3.1 (i386-mingw-nt5.0.2195)
 of 2008-09-06 on SOFT-MJASON

org-mode version: 6.09a

Debugger entered--Lisp error: (quit)
  (if siblings-p (progn (org-show-siblings)))
  (when siblings-p (org-show-siblings))
  (while (and (condition-case nil ... ...) (not ...)) (org-flag-heading nil) 
(when siblings-p (org-show-siblings)))
  (save-excursion (while (and ... ...) (org-flag-heading nil) (when siblings-p 
...)))
  (progn (save-excursion (while ... ... ...)))
  (if hierarchy-p (progn (save-excursion ...)))
  (when hierarchy-p (save-excursion (while ... ... ...)))
  (catch (quote exit) (if (and heading-p ...) (org-flag-heading nil) (and ... 
...)) (when following-p (save-excursion ...)) (when siblings-p 
(org-show-siblings)) (when hierarchy-p (save-excursion ...)))
  (let ((heading-p ...) (hierarchy-p ...) (following-p ...) (entry-p ...) 
(siblings-p ...)) (catch (quote exit) (if ... ... ...) (when following-p ...) 
(when siblings-p ...) (when hierarchy-p ...)))
  org-show-context(org-goto)
  (lambda nil (org-show-context (quote org-goto)))()
  run-hooks(speedbar-visiting-tag-hook)
  speedbar-tag-find("cmSetFont" # 2)
  speedbar-do-function-pointer()
  speedbar-edit-line()
  call-interactively(speedbar-edit-line)

Debugger entered--Lisp error: (quit)
  outline-up-heading(1 t)
  (if (fboundp (quote outline-up-heading-all)) (outline-up-heading-all arg) 
(outline-up-heading arg t))
  org-up-heading-all(1)
  (progn (org-up-heading-all 1) t)
  (condition-case nil (progn (org-up-heading-all 1) t) (error nil))
  (and (condition-case nil (progn ... t) (error nil)) (not (bobp)))
  (while (and (condition-case nil ... ...) (not ...)) (org-flag-heading nil) 
(when siblings-p (org-show-siblings)))
  (save-excursion (while (and ... ...) (org-flag-heading nil) (when siblings-p 
...)))
  (progn (save-excursion (while ... ... ...)))
  (if hierarchy-p (progn (save-excursion ...)))
  (when hierarchy-p (save-excursion (while ... ... ...)))
  (catch (quote exit) (if (and heading-p ...) (org-flag-heading nil) (and ... 
...)) (when following-p (save-excursion ...)) (when siblings-p 
(org-show-siblings)) (when hierarchy-p (save-excursion ...)))
  (let ((heading-p ...) (hierarchy-p ...) (following-p ...) (entry-p ...) 
(siblings-p ...)) (catch (quote exit) (if ... ... ...) (when following-p ...) 
(when siblings-p ...) (when hierarchy-p ...)))
  org-show-context(org-goto)
  (lambda nil (org-show-context (quote org-goto)))()
  run-hooks(speedbar-visiting-tag-hook)
  speedbar-tag-find("MenuBar" # 1)
  speedbar-do-function-pointer()
  speedbar-edit-line()
  call-interactively(speedbar-edit-line)
___
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode


Re: [Orgmode] Infinite Loop with org-mode and speedbar with cc-mode

2008-11-18 Thread Rolf Unger
Okay Carsten,

thank you, this modification makes it work again.

I have posted this problem before to the gnu.emacs.help
mailing list, because initially I had no clue that it could
be related with org-mode.

I will add a comment there refering to the patch.

Thanks again especially for the impressive response time,

Rolf.

Carsten Dominik wrote:
> Hi Rolf,
> 
> does this patch help?
> 
> 
> Best wishes.
> 
> - Carsten Dominik
> 
> 
> 
> diff -u org.el.orig org.el
> --- org.el.orig 2008-11-18 14:54:12.0 +0100
> +++ org.el  2008-11-18 14:54:54.0 +0100
> @@ -14510,7 +14510,7 @@
>   (define-key speedbar-file-key-map ">"
> 'org-agenda-remove-restriction-lock)
>   (define-key speedbar-file-key-map "\C-c\C-x>"
> 'org-agenda-remove-restriction-lock)
>   (add-hook 'speedbar-visiting-tag-hook
> -  (lambda () (org-show-context 'org-goto)
> +  (lambda () (and (org-mode-p) (org-show-context
> 'org-goto))
> 
> 
>  ;;; Fixes and Hacks for problems with other packages
> ---
> 


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


Re: [O] Fwd: comment lines inside org tables

2016-09-30 Thread Rolf Sander

Hello Nicolas,


Then I don't understand what you really want. You want to comment a
row, but it's not clear wrt to what action.


I want to add a comment line into the file that does not disturb the
table. Like a "|---+---+---|" hline. I don't want any action. All
programming languages have the option to add comments to the source
code. The comment does not trigger any action, and the result of
executing the code is the same, whether with or without comment lines.
It would be nice if org-tbl would allow comment lines as well.


Anyway, in the general case, there is no way to comment a row.


Okay, so my question turns into a feature request now...

I have started to modify defun org-table-align. With the modification,
org-tbl now ignores all lines starting with "|-/". For me it works fine.
However, please let me know if you see any side-effects. You can
download the full defun here:

http://www.rolf-sander.net/tmp/org-table-align-new.el

And here is a diff to the original code:

***
diff -U 1 org-table-align-old.el org-table-align-new.el
@@ -63,4 +63,12 @@
 ;; At the same time, we remove trailing space.
+(setq lines0 (mapcar (lambda (l)
+  (cond ((string-match "^ *|-" l)
+ nil)
+((string-match "[ \t]+$" l)
+ (substring l 0 (match-beginning 0)))
+(t l))
+  )
+   lines))
 (setq lines (mapcar (lambda (l)
- (if (string-match "^ *|-" l)
+ (if (string-match "^ *|-\\($\\|[^/]\\)" l)
  nil
@@ -74,3 +82,3 @@
(org-split-string l " *| *"))
- (delq nil (copy-sequence lines
+  (delq nil (copy-sequence lines0
 ;; How many fields in the longest line?
@@ -164,5 +172,9 @@
   (lambda (l)
-(if l (apply 'format rfmt
- (append (pop fields) emptystrings))
-  hfmt))
+ (cond ((eq l nil)
+hfmt)
+   ((string-match "^ *|-/" l)
+(concat l "\n"))
+   (t
+(apply 'format rfmt
+   (append (pop fields) emptystrings)
   lines ""))
***

 Best regards
Rolf

--
---
  Rolf Sander  phone: [+49] 6131/305-4610
  Max-Planck Institute of Chemistryemail: rolf.san...@mpic.de
  PO Box 3060, 55020 Mainz, Germany homepage: www.rolf-sander.net
---
   www.atmospheric-chemistry-and-physics.net
www.geoscientific-model-development.net
---



Re: [O] Fwd: comment lines inside org tables

2016-10-03 Thread Rolf Sander

Hello Nicolas,


Allowing to comment anything is a can of worms I really don't want to
open.


Maybe you are misinterpreting what I wrote. I don't want to comment
"anything". All I want is that a table line starting with "|-/" is not
expanded to "|---+---+---|" on the next re-align. Instead, it should
remain unchanged.


It complicates a lot of code for little benefit.


Well, regarding the benefit we seem to have different opinions. The
table that I use for my work has 871 lines, 20 columns and a width of
234 characters. With such a big table, I would highly benefit from
comment lines.

Regarding the code, I already wrote a few lines for org-table-align
adding this feature and I don't think it is too complicated.


Sorry, but you're barely scratching the surface of the problem.


It is quite possible that you are right. Indeed, there is a possibility
that my addition has some negative side effects. To find out if this is
really the case, I have written to this email list, asking for advise.


Formulas don't handle these special lines, neither do exported tables.


I don't understand why you say this. I have tested formulas and
exporting, taking an example table from the manual and adding two
comment lines. Everything still works fine:

|---+-++++---+--|
|   | Student | Prob 1 | Prob 2 | Prob 3 | Total | Note |
|---+-++++---+--|
| ! | | P1 | P2 | P3 |   Tot |  |
| # | Maximum | 10 | 15 | 25 |50 | 10.0 |
| ^ | | m1 | m2 | m3 |mt |  |
|---+-++++---+--|
|-/ students in Mr Miller's class:
|---+-++++---+--|
| # | Peter   | 10 |  8 | 23 |41 |  8.2 |
| # | Sam |  2 |  4 |  3 | 9 |  1.8 |
|---+-++++---+--|
|-/ students in Mr Smith's class:
|---+-++++---+--|
| # | Tom | 16 |  8 | 28 |52 | 10.4 |
| # | Andy|  8 |  4 |  3 |15 |  3.0 |
|---+-++++---+--|
|   | Average ||||  25.0 |  |
| ^ | ||||at |  |
| $ | max=50  ||||   |  |
|---+-++++---+--|
#+TBLFM: $6=vsum($P1..$P3)::$7=10*$Tot/$max;%.1f::$at=vmean(@-II..@-I);%.1f

So I'm asking again: Does anyone see any negative side effects when my
modification is introduced? It only prevents that a table line starting
with "|-/" is expanded to "|---+---+---|" on a re-align.

As mentioned in a previous post, if you want to test my modification,
you can find it here:

http://www.rolf-sander.net/tmp/org-table-align-new.el

 Best regards
Rolf

--
---
 www.rolf-sander.net
---



[O] Fwd: comment lines inside org tables

2016-09-27 Thread Rolf Sander (MPI)

Hello,

I need to put comments inside a very big table which then should
basically looks like this:

|+---+|
| animal | size  | number |
|+---+|
| gnus   | big   |  3 |
# don't forget to add elephants here:
| gnats  | small |   1000 |
|+---+|

However, if I simply add a line in the middle of the table, org-tbl
splits it into separate tables with different column widths:

|+--+|
| animal | size | number |
|+--+|
| gnus   | big  |  3 |
# don't forget to add elephants here:
| gnats | small | 1000 |
|---+---+--|

If I start the comment line with "|", the comment becomes an active part
of the table and goes into the first column:

|-+---+|
| animal  | size  | number |
|-+---+|
| gnus| big   |  3 |
| don't forget to add elephants here: |   ||
| gnats   | small |   1000 |
|-+---+|

If I start the comment with "|-", it turns into a line separator and the
comment text disappears.

Any suggestions?

  Best regards
 Rolf

--
---
   Rolf Sander  phone: [+49] 6131/305-4610
   Max-Planck Institute of Chemistryemail: rolf.san...@mpic.de
   PO Box 3060, 55020 Mainz, Germany homepage: www.rolf-sander.net
---
www.atmospheric-chemistry-and-physics.net
 www.geoscientific-model-development.net
---



[O] Fwd: Re: Fwd: comment lines inside org tables

2016-09-27 Thread Rolf Sander (MPI)

Hello John,


Use a footnote? It's just a temporary reminder right?


No. Even though there are a few temporary reminders, most of the comment
lines are permanent. They describe different blocks of lines.

Sorry if my example was oversimplified. I thought presenting the full
table (currently 871 lines, 20 columns and a width of 234 characters)
would be too confusing. Maybe the following example is better:

|---++|
| animal| size   | number |
|---++|
# mammals (see also https://en.wikipedia.org/wiki/Mammal):
| gnus  | big|  3 |
| elephants | very big   |  1 |
# insects (see also https://en.wikipedia.org/wiki/Insect):
| gnats | small  |   1000 |
| flies | also small |   2000 |
# other:
| python| long   | 2.7.12 |
|---++|

Is there a way to tell org-tbl to simply ignore a line, without
converting it into |--+--+--| ?

I'm flexible with respect to the comment character. In the example I
chose "#" but anything else would be fine as well, for example "//" or
"|#" or whatever...

Best regards
Rolf

--
---
   Rolf Sander  phone: [+49] 6131/305-4610
   Max-Planck Institute of Chemistryemail: rolf.san...@mpic.de
   PO Box 3060, 55020 Mainz, Germany homepage: www.rolf-sander.net
---
www.atmospheric-chemistry-and-physics.net
 www.geoscientific-model-development.net
---



Re: [O] Fwd: comment lines inside org tables

2016-09-27 Thread Rolf Sander (MPI)

Hello Nicolas,


Try
|   | animal  | size  | number |
| / | don't forget to add elephants here: |   ||


Thanks for the suggestion. However, this won't help me very much. Even
with the "/", the width of the "animal" column is expanded to the width
of the comment, which can be very long. I could add a narrowing marker
but I want to see the comments, not hide them.

 Best regards
Rolf

--
---
  Rolf Sander  phone: [+49] 6131/305-4610
  Max-Planck Institute of Chemistryemail: rolf.san...@mpic.de
  PO Box 3060, 55020 Mainz, Germany homepage: www.rolf-sander.net
---
   www.atmospheric-chemistry-and-physics.net
www.geoscientific-model-development.net
---



[O] comment lines inside org tables

2016-10-01 Thread Rolf Sander (MPI)

Hello,

I need to put comments inside a very big table which then should
basically looks like this:

|+---+|
| animal | size  | number |
|+---+|
| gnus   | big   |  3 |
# don't forget to add elephants here:
| gnats  | small |   1000 |
|+---+|

However, if I simply add a line in the middle of the table, org-tbl
splits it into separate tables with different column widths:

|+--+|
| animal | size | number |
|+--+|
| gnus   | big  |  3 |
# don't forget to add elephants here:
| gnats | small | 1000 |
|---+---+--|

If I start the comment line with "|", the comment becomes an active part
of the table and goes into the first column:

|-+---+|
| animal  | size  | number |
|-+---+|
| gnus| big   |  3 |
| don't forget to add elephants here: |   ||
| gnats   | small |   1000 |
|-+---+|

If I start the comment with "|-", it turns into a line separator and the
comment text disappears.

Any suggestions?

 Best regards
Rolf

--
---
  Rolf Sander  phone: [+49] 6131/305-4610
  Max-Planck Institute of Chemistryemail: rolf.san...@mpic.de
  PO Box 3060, 55020 Mainz, Germany homepage: www.rolf-sander.net
---
   www.atmospheric-chemistry-and-physics.net
www.geoscientific-model-development.net
---




Re: [O] Fwd: comment lines inside org tables

2016-10-03 Thread Rolf Sander (MPI)

Hello Nicolas,


Allowing to comment anything is a can of worms I really don't want to
open.


Maybe you are misinterpreting what I wrote. I don't want to comment
"anything". All I want is that a table line starting with "|-/" is not
expanded to "|---+---+---|" on the next re-align. Instead, it should
remain unchanged.


It complicates a lot of code for little benefit.


Well, regarding the benefit we seem to have different opinions. The
table that I use for my work has 871 lines, 20 columns and a width of
234 characters. With such a big table, I would highly benefit from
comment lines.

Regarding the code, I already wrote a few lines for org-table-align
adding this feature and I don't think it is too complicated.


Sorry, but you're barely scratching the surface of the problem.


It is quite possible that you are right. Indeed, there is a possibility
that my addition has some negative side effects. To find out if this is
really the case, I have written to this email list, asking for advise.


Formulas don't handle these special lines, neither do exported tables.


I don't understand why you say this. I have tested formulas and
exporting, taking an example table from the manual and adding two
comment lines. Everything still works fine:

|---+-++++---+--|
|   | Student | Prob 1 | Prob 2 | Prob 3 | Total | Note |
|---+-++++---+--|
| ! | | P1 | P2 | P3 |   Tot |  |
| # | Maximum | 10 | 15 | 25 |50 | 10.0 |
| ^ | | m1 | m2 | m3 |mt |  |
|---+-++++---+--|
|-/ students in Mr Miller's class:
|---+-++++---+--|
| # | Peter   | 10 |  8 | 23 |41 |  8.2 |
| # | Sam |  2 |  4 |  3 | 9 |  1.8 |
|---+-++++---+--|
|-/ students in Mr Smith's class:
|---+-++++---+--|
| # | Tom | 16 |  8 | 28 |52 | 10.4 |
| # | Andy|  8 |  4 |  3 |15 |  3.0 |
|---+-++++---+--|
|   | Average ||||  25.0 |  |
| ^ | ||||at |  |
| $ | max=50  ||||   |  |
|---+-++++---+--|
#+TBLFM: $6=vsum($P1..$P3)::$7=10*$Tot/$max;%.1f::$at=vmean(@-II..@-I);%.1f

So I'm asking again: Does anyone see any negative side effects when my
modification is introduced? It only prevents that a table line starting
with "|-/" is expanded to "|---+---+---|" on a re-align.

As mentioned in a previous post, if you want to test my modification,
you can find it here:

http://www.rolf-sander.net/tmp/org-table-align-new.el

  Best regards
 Rolf

--
---
  www.rolf-sander.net
---



Re: [O] Fwd: comment lines inside org tables

2016-10-05 Thread Rolf Sander (MPI)

Hello Eric,


could you not simply use the / label and then have a comment in one of
the existing columns, a column that is width restricted so that a
large amount of text doesn't affect alignent? You can then use the
special edit mode (C-c `) for long entries to see the full comment.


Thanks for the suggestion. Yes, I could do this and see something like
this in emacs:

|---+--+---+|
|   | <12> |   ||
|   | animal   | size  | number |
|---+--+---+|
|   | gnus | big   |  3 |
| / | don't forg=> |   ||
|   | gnats| small |   1000 |
|---+--+---+|

The real contents of the file, however, would look very different:

|---+--+---+|
|   | <12> |   ||
|   | animal   | size  | number |
|---+--+---+|
|   | gnus | big   |  3 |
| / | don't forget to add elephants here: |   ||
|   | gnats| small |   1000 |
|---+--+---+|

Since I am sharing my table with several colleagues at work, it is
important that the columns are really aligned in the file (not only when
viewing the file in org-mode). Unfortunately, not all of my colleagues
are using emacs...

I am still waiting for an answer to my question if the solution with
"|-/" comments that I have proposed has any negative side effects...

 Best regards
Rolf

--
---
  Rolf Sander  phone: [+49] 6131/305-4610
  Max-Planck Institute of Chemistryemail: rolf.san...@mpic.de
  PO Box 3060, 55020 Mainz, Germany homepage: www.rolf-sander.net
---
   www.atmospheric-chemistry-and-physics.net
www.geoscientific-model-development.net
---



Re: [O] Fwd: comment lines inside org tables

2016-10-05 Thread Rolf Sander (MPI)

Hello Nicolas and everyone else,

I'm sorry to say this but this email list has been the most
disappointing experience for me. I asked a simple question and even
provided the code for a possible solution. The answers I received
included phrases like "can of worms", "little benefit" and "barely
scratching the surface of the problem". And now you even wrote:


I am still waiting for an answer to my question if the solution with
"|-/" comments that I have proposed has any negative side effects...



I already answered to that question, but you discarded my answer.


This is not true! You did not answer my question! Without testing, you
just _speculated_ that you expect problems with formulas and export. So
I tested it myself. In my tests I did _not_ experience any problems with
formulas and export. Why do you claim that I discarded your answer?

I still think orgmode is great code and I would have loved to
participate. However, given the way that you treat me here, I lost my
motivation to work with you. Instead, I will have to modify my own *.el
files.

Good bye...
Rolf

--
---
  Rolf Sander  phone: [+49] 6131/305-4610
  Max-Planck Institute of Chemistryemail: rolf.san...@mpic.de
  PO Box 3060, 55020 Mainz, Germany homepage: www.rolf-sander.net
---
   www.atmospheric-chemistry-and-physics.net
www.geoscientific-model-development.net
---