Re: [Orgmode] Re: "No link found" error during export of source block when headline has link

2010-10-04 Thread Michael Brand
>> * [[http://www.example.com][example]]

There is an other issue with this, let me name it issue2: It is not yet
possible to link to such a heading with something like e. g.

[[*%5b%5bhttp://www.example.com%5d%5bexample%5d%5d][example]]

although I think the syntax is not ambiguous and allows to do this or am I
wrong here?

CUSTOM_ID could be used in this case but for me it would only be a
workaround. I tried to fix issue2 by changing org-link-re-with-space3 but
all my trials that solved issue2 introduced new issues with other link
types. Can someone please help? Am I on the wrong path with
org-link-re-with-space3?

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


Re: [Orgmode] Re: "No link found" error during export of source block when headline has link

2010-10-07 Thread Michael Brand
On Wed, Oct 6, 2010 at 16:52, Eric Schulte  wrote:
> This issue should now be fixed.

I can confirm for the issue with the export, thanks.

issue2 is not resolved yet.

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


[Orgmode] question: how to refile labeled with origin?

2010-10-15 Thread Michael Brand
Hi all

How can items from different parents be merged into a single parent so
that the old context from where these items came from is still
available?

before org-refile:

#+STARTUP: odd
* most important tasks
* project a
*** subject 1
blabla 1
* project b
*** subject 2
blabla 2


after org-refile, e. g. by adding `project a: ', `project b ':

#+STARTUP: odd
* most important tasks
*** project a: subject 1
blabla 1
*** project b: subject 2
blabla 2
* project a
* project b


A use case for this is reading subjects from several RSS/atom news
feeds timely sorted with the nice org-sort.

Michael

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


Re: [Orgmode] VISIBILITY property and C-u C-u

2010-10-23 Thread Michael Brand
> On Oct 17, 2010, at 5:41 PM, Gez wrote:
>> C-u C-u TAB also cycles when it's repeated.

I have also noticed this buglet and have used a workaround until now.

On Fri, Oct 22, 2010 at 18:14, Carsten Dominik
 wrote:
> I believe I have fixed this, please verify.

Thank you for this, it resolves both `C-u C-u TAB' and
`C-u C-u C-u TAB' except for the special case with the variable
org-cycle-global-at-bob. For this special case I suggest additionally:


--- a/lisp/org.el
+++ b/lisp/org.el
@@ -5772,7 +5772,8 @@ in special contexts.
   `org-cycle-emulate-tab' for details.

 - Special case: if point is at the beginning of the buffer and there is
-  no headline in line 1, this function will act as if called with prefix arg.
+  no headline in line 1, this function will act as if called with prefix arg
+  (C-u TAB, same as S-TAB) also when called without prefix arg.
   But only if also the variable `org-cycle-global-at-bob' is t."
   (interactive "P")
   (org-load-modules-maybe)
@@ -5798,7 +5799,7 @@ in special contexts.
  (if nstars (format "\\{1,%d\\}" nstars) "+")
  " \\|\\([ \t]*\\)\\([-+*]\\|[0-9]+[.)]\\) \\)"))
 (t (concat "\\*" (if nstars (format "\\{1,%d\\} " nstars) "+ ")))
-  (bob-special (and org-cycle-global-at-bob (bobp)
+  (bob-special (and org-cycle-global-at-bob (not arg) (bobp)
 (not (looking-at outline-regexp
   (org-cycle-hook
(if bob-special


Michael

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


[Orgmode] update of snapshot release broken?

2010-10-24 Thread Michael Brand
Hi all

I just noticed that both
http://orgmode.org/org-latest.zip
and
http://orgmode.org/org-latest.tar.gz
provide old files like e. g. org.el from mid of October

Currently I misuse this snapshot to install the exactly same version
at home and at work. I did not find out in reasonable time how to use
git to get the same version again later that was the most recent at
the time of the upgrade on the first machine. I hope there are others
that would also appreciate if someone would add how to do this use
case with git to
http://orgmode.org/worg/org-faq.php#keeping-current-with-Org-mode-development

Michael

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


[Orgmode] Re: update of snapshot release broken?

2010-10-24 Thread Michael Brand
On Sun, Oct 24, 2010 at 12:41, Jambunathan K  wrote:
> 1. Look for snapshot links in
>   - http://repo.or.cz/w/org-mode.git.

I'm sorry, I was not able to find such links there.

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


[Orgmode] Re: update of snapshot release broken?

2010-10-24 Thread Michael Brand
On Sun, Oct 24, 2010 at 13:09, Jambunathan K  wrote:
> git archive --format=tar --prefix=project/ HEAD | gzip >latest.tar.gz

Thanks, that helps me already to install the currently very latest
version to a different machine at some time later. But even better for
me would be to git-pull the very latest version on one machine, get
its SHA1 and then do a git-whatever with the same SHA1 at some time
later on another machine to get the same version again.

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


[Orgmode] Re: update of snapshot release broken?

2010-10-24 Thread Michael Brand
On Sun, Oct 24, 2010 at 15:58, Bernt Hansen  wrote:
> git pull on one machine
> git describe to get short SHA1
> git checkout SHA1 on other machine
> should give you exactly the same codebase on each.
> [...]
> HTH,

Yes, exactly what I have been looking for, thank you for the description.

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


Re: [Orgmode] VISIBILITY property and C-u C-u

2010-10-24 Thread Michael Brand
On Sun, Oct 24, 2010 at 18:09, Gez  wrote:
> I'm still getting the same behaviour (i.e. not fixed), using org-latest.zip

I guess only because this snapshot is not recent enough because its
update is broken. If the download contains old files like e. g. org.el
from mid of October you might read here:
http://thread.gmane.org/gmane.emacs.orgmode/32427

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


[Orgmode] Re: update of snapshot release broken?

2010-10-24 Thread Michael Brand
On Sun, Oct 24, 2010 at 17:05, Jambunathan K  wrote:
> Michael Brand  writes:
>> On Sun, Oct 24, 2010 at 12:41, Jambunathan K  wrote:
>>> 1. Look for snapshot links in
>>>   - http://repo.or.cz/w/org-mode.git.
>> I'm sorry, I was not able to find such links there.
>
> Not sure why it is so.
>
> Base URL: http://repo.or.cz/w/org-mode.git/snapshot
>
> 1. HEAD: ./d600831eb70a0c87fca493f1e367193b88844137.tar.gz
> 2. PARENT: ./987beb627715c7645be1055c055e001283f866dc.tar.gz
> 3. GRANDPARENT: ./94f2f59a9379814b0235826c1c19ceb4bc698f49.tar.gz
>
> Good thing is that you can see what magic number contains the latest fix
> that you are currently interested in. All this without issuing a single
> git command.

Ah, now I see. The links at most right on each row of the shortlog.
Thank you for the explanation, this is really useful if git is not
available.

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


Re: [Orgmode] VISIBILITY property and C-u C-u

2010-10-24 Thread Michael Brand
On Sun, Oct 24, 2010 at 18:09, Gez  wrote:
>> Would you like to make a patch?
> I would like to and I
> read http://orgmode.org/worg/org-contribute.php#sec-3 but I don't have git.

If you would like to this can also be hacked without git. For the
first few patches on only one or two files I just downloaded the most
recent version of the file(s) to be changed like e. g. doc/org.texi or
lisp/org.el starting from
http://repo.or.cz/w/org-mode.git/tree
with the right most link `raw', made a copy of the file, changed the
copy and after that made a `diff -up file_original file_changed'. To
make this diff look like it came from git-diff I manually hacked the
lines with --- and +++ to look like the commitdiff that can be seen in
the history of the files on the above links and then posted this
modified patch.

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


[Orgmode] Stack overflow in regexp matcher

2010-11-20 Thread Michael Brand
Hi all

Here is an issue for the quite common work flow of copy pasting some
table columns in a whole from a spreadsheet application into Org
table. For this situation I suggest to provide a better user
information than only the current error message "Stack overflow in
regexp matcher". Reproduce like this:

in a spreadsheet application like OpenOffice.org Calc or Excel:
- create a 1x2 table with two columns A and B
- fill out the fields A1 and B1 with some simple content
- select the columns A and B and copy to clipboard

in a new Org buffer:
- paste from clipboard
- select the line with A1 and B1
- convert the selection to Org table: C-c |
- change A1 to the assignment `=1'
- try to update Org table: C-c C-c

This will produce the above mentioned error message. The reason are
the 65535 lines with a TAB following the Org table that have been
copied when selecting the two first columns A and B in the spreadsheet
application. It can be quite annoying to find this out with only the
current error message and with TABs not made visible so I thought it
would be helpful to point this out in the hope of someone finding a
better user guidance. I'd like to provide a patch by myself but in
this case I don't understand more than to find out that the many TABs
are the problem and have to be removed or to be not copied.

Michael

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


Re: [Orgmode] Bastien is going to become the maintainer of Org mode in January

2010-11-20 Thread Michael Brand
Hi Carsten, hi Bastien

On Mon, Nov 15, 2010 at 12:51, Carsten Dominik
 wrote:
> after 7 years of responsibility for Org-mode, it is time for
> me to let go and step down as the maintainer of Org-mode.

Carsten, thank you so much for the tremendous dedication and amount of
work you have given to the community. I am looking forward that you
will still be available for Org-mode.

> I am very excited that I have found  Guerry willing
> to take over.

Bastien, thank you very much for taking over as the new maintainer of
Org-mode, I wish you all the best.

Michael

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


Re: [Orgmode] [PATCH] Change C-' behaviour on #+TBLFM: line

2010-11-20 Thread Michael Brand
Hi Torsten

On Fri, Nov 19, 2010 at 09:49, Torsten Wagner  wrote:
> If even more people believe this is confusing, I would suggest to switch
> the behaviour. C-c' on a #+TBLFM: line should open up the formular buffer.

Yes, thank you for this change, just a few days ago I also stumbled
exactly upon this detail.

Michael

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


Re: [Orgmode] Acknowledgements

2010-11-26 Thread Michael Brand
On Fri, Nov 26, 2010 at 08:50, Carsten Dominik
 wrote:
>  * Christian Egli converted the documentation into Texinfo format,
>    patched CSS formatting into the HTML exporter, and inspired the
>    agenda.

Christian Egli also created the export to TaskJuggler.

Michael

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


Re: [Orgmode] template to auto complete the imdb entry address.

2010-11-27 Thread Michael Brand
On Sun, Nov 28, 2010 at 00:43, Alin Soare  wrote:
> | Domicile conjugal      | tt0065651 | 20 | 1970 | France     |
> I wish to have a link to imdb web page, and to see only its id (as now).

Would link abbreviations help?
http://orgmode.org/manual/Link-abbreviations.html
e. g. the inline version:

#+LINK: imdb http://www.imdb.com/title/
| Domicile conjugal | [[imdb:tt0065651]] | 20 | 1970 | France |
| Douze hommes en colère | [[imdb:tt0050083]] | 20 | 1957 | Etats Unis |

Michael

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


Re: [Orgmode] Problem with tables

2010-11-29 Thread Michael Brand
On Mon, Nov 29, 2010 at 17:58, Gaspaio  wrote:
> I'm a newbie at org-mode (and emacs BTW), and i can't seem to use a few 
> commands like table-delete-row, table-insert-row and so on. I systematically 
> get a "Table not found" error.
> Also, some of the Shift commands don't seem to work, like using S-UP/Down to 
> navigate between headers. I tried toggle the org-support-shift-select, but 
> nothing.

Be aware of the two table formats:

table-delete-row, table-insert-row are for tables in the "table.el" format like
+--+
|User Visible Entry Points |
+---+--+
|   Function|   Description|
+---+--+

S-Up/Down are only for tables on the orgtbl format like
| x | y |
|---+---|
| 1 | 2 |
| 3 | 4 |

Michael

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


Re: [Orgmode] Problem with tables

2010-11-29 Thread Michael Brand
On Mon, Nov 29, 2010 at 18:43, Gaspaio  wrote:
> When i do S-UP/DOWN i get the normal emacs region expanding
> behavior

For Org tables it is either M-Up/Down/Left/Right to move or
S-M-Up/Down/Left/Right to delete/insert.

Michael

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


Re: [Orgmode] Shift-arrow and M-arrow bindings in OSX port of Emacs 23

2010-12-01 Thread Michael Brand
On Tue, Nov 30, 2010 at 17:19, Gaspaio  wrote:
> Has any of you  manage to remove de MacUser-friendly custom bindings included 
> in the emacs.app version available with Port ?

If this means an Emacs version that has the variables
ns-*-modifier for Cocoa then you can use these, if not then maybe
the variables mac-*-modifier.

With Mac OS X I use Cocoa Emacs and this

(when (eq system-type 'darwin)
  ;; * modifier keys
  ;;   - key `command': mapped to Emacs Meta
  (setq ns-command-modifier 'meta)
  ;;   - key `option': ignored by Emacs to let the OS do AltGr
  (setq ns-option-modifier 'none))

Michael

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


Re: [Orgmode] Shift-arrow and M-arrow bindings in OSX port of Emacs 23

2010-12-01 Thread Michael Brand
On Wed, Dec 1, 2010 at 12:00, Gaspaio  wrote:
> When i set 'shift-select-mode' to nil, i still don't have access to these 
> commands, and i think its because  is being translated to , etc.
> How can i stop this translation ? Or should I simply remap the 
> org-shiftup/down ... commands to something line  ?

Can you try what `C-h c S-up' tells in an Org buffer of an Emacs
started without any config? A Cocoa Emacs 23.2 tells ` runs
the command org-shiftup', both with shift-select-mode set to t or
nil.

Michael

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


Re: [Orgmode] spreadsheet sum a column

2010-12-02 Thread Michael Brand
On Thu, Dec 2, 2010 at 11:29, Antony  wrote:
> I have table like
>
> | foo       | amount |
> |---+|
> |           |    <5> |
> | hello     |    100 |
> | again     |    200 |
> | once more |    300 |
> |           |        |
> |           |        |
>
> I need to be able sum those numbers and say 600 somewhere (I am ok if it
> does in the same table or outside of it)
>
> When I add a new row, say
>
> | foo       | amount |
> |---+|
> |           |    <5> |
> | hello     |    100 |
> | again     |    200 |
> | once more |    300 |
> | qqq       |    100 |
> |           |        |
>
> Now I need to be able to change the 600 to 700 (by pressing C-c C-c
> somewhere)
>
> I am finding it hard to figure out how to do this.

Press C-c C-c on the TBLFM line after every change:
| foo   | amount |
|---+|
| hello |100 |
| again |200 |
| once more |300 |
|---+|
|   |600 |
#+TBLFM: $LR2 = vsum(@i$...@-1$2)

I don't think `<5>' is of any use in this case.

Michael

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


Re: [Orgmode] [OT] recutils

2010-12-03 Thread Michael Brand
On Fri, Dec 3, 2010 at 22:16, Jose E. Marchesi  wrote:
> I apologize in advance for the off-topic, but this could be of interest
> to people liking to "organize their life" in plain text.  This is about
> "storing your data" in plain text :D
>
> I just made the first release of the GNU recutils, a set of tools and
> libraries to access human-editable, text-based databases called
> recfiles.  The data is stored as a sequence of records, each record
> containing an arbitrary number of named fields.  Advanced capabilities
> usually found in other data storage systems are supported by GNU
> recutils: data types, data integrity (keys, mandatory fields, etc) as
> well as the ability of records to refer to other records (sort of
> foreign keys).  Despite its simplicity, recfiles can be used to store
> medium-sized databases.
>
> I have been using org-mode for years and it rocks.  In some way it
> changed my life.  It is perfect to store all kind of hierarchical data.
> At some point I though about applying a similar philosophy to
> "sequential" repetitive data with relationships.  Data that we would
> store in a relational database.  A nice complement to org.  The recutils
> are the result of those thoughts.
>
> I would highly appreciate any comment or suggestion on improving the
> format, the utilities, or whatever.

Hi Jose

Wow! The ability to have a _relational_ database with foreign keys in
a simple text file is so great news for me. A dream I had for many
years now. Or is it lack of knowledge from my side about already
existing solutions before recutils? Thank you a lot for your work,
sharing it to the community, posting it also on this list here and for
asking for suggestions which I would like to give at the end.

I was thinking about using sqlite from the command line and together
with shell scripts for stuff like my collection of music with
recordings, MIDI files, scores and so on. Because at least for me
editing a text file is by far simpler, more interactive and more
convenient than editing with SQL I will prefer recutils over sqlite.

But since recfiles, the text files of recutils, are not hierarchically
organized I am still considering to use only Org for the case of my
collection of music. Org would have the advantages of outlining,
hyperlinks, column view, todo, tags, agenda view, export for
publishing and many others.

Thus my wish for the file format would be to somehow keep in mind Org
to potentially
- convert the files bidirectionally between the format of recfiles and
  Org, with or without something like "literate programming" of
  org-babel
- use recutils as a language extension to org-babel, recutils reading
  data streamed to its stdin from org-babel and piping back to into
  org-babel result (no writing by recutils to the file)
- as an imagination: run recutils on a file in the format of Org, only
  reading or even read/write.

I will follow up with an example of what I plan to do for my
collection of music, the database table relations squeezed
hierarchically into Org as a first attempt.

Michael

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


Re: [Orgmode] Date calculations in spreadsheet

2010-12-04 Thread Michael Brand
On Sun, Dec 5, 2010 at 01:56, Nick Dokos  wrote:
> Ethan Ligon  wrote:
>> |--+--|
>> | Date             | Days elapsed |
>> |--+--|
>> | [2009-12-03 Thu] |              |
>> | [2010-12-03 Fri] |          365 |
>> | [2010-12-06 Mon] |            3 |
>> |--+--|
> |--+--+--|
> | Date  start      | Date end         | Days elapsed |
> |--+--+--|
> | [2009-12-03 Thu] | [2010-12-03 Fri] |          365 |
> | [2010-12-03 Fri] | [2010-12-06 Mon] |            3 |
> #+TBLFM: $3 = date(<$2>) - date(<$1>)

and then
|--+--|
| Date  start  | Days elapsed |
|--+--|
| [2009-12-03 Thu] |  |
| [2010-12-03 Fri] |  365 |
| [2010-12-06 Mon] |3 |
#+TBLFM: $2 = date(<$1>) - date(<@-1$1>) :: @2$2 = string("")

Michael

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


Re: [Orgmode] [OT] recutils

2010-12-05 Thread Michael Brand
Hi Jose

On Sat, Dec 4, 2010 at 13:28, Jose E. Marchesi  wrote:
> But note that the "relational" characteristics in
> recutils are not very sophisticated.
>
> The rule here is: if you need something more complex then you probably
> should be using a real relational dbms instead :)

Ok, maybe I expected a bit too much for the initial version 1.0. But
is it already possible or planned to allow recsel deliver field values
from two tables, joined together with a foreign key or what does the
manual mean with "the ability of records to refer to other records
(sort of foreign keys)"?

Michael

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


Re: [Orgmode] What is the proper way to set the time span for a diary-float appointment?

2010-12-09 Thread Michael Brand
Hi Robert

On Wed, Dec 8, 2010 at 16:29, Robert Horn  wrote:
> I wanted to set up a regular meeting that would appear in the agenda
> grid.  I discovered that the following works:
>
> ... Regular Meeting 13:00-14:00
> <%%(diary-float t 2 1)>
>
> This creates a first tuesday of each month meeting, from 1300h to 1400h.
> This works because the default for the
> org-agenda-search-headline-for-time is t.
>
> Is there a better way to do this?  It seems odd to split the date from
> the time.  I didn't find anything that combines the date rules of
> diary-float with the ability to also specify a time interval.

One possibility is
* Regular Meeting
  SCHEDULED: <%%(diary-float t 2 1) 13:00-14:00>

Michael

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


Re: [Orgmode] [OT] recutils

2010-12-20 Thread Michael Brand
On Mon, Dec 13, 2010 at 13:33, Jean-Marie Gaillourdet
 wrote:
> You might be interested to hear about txt-sushi [1], a command line
> utility to apply SQL statements on a set of csv files, each of which
> represents one table.
>
> [1] http://keithsheppard.name/txt-sushi/

Thank you for pointing this out. And there in the link section is also
mentioned "You can now use CSV files as the storage backend for
MySQL":
http://dev.mysql.com/tech-resources/articles/csv-storage-engine.html

Michael

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


Re: [Orgmode] @# not working

2010-12-23 Thread Michael Brand
Hi Longzhu

On Thu, Dec 23, 2010 at 22:35, Longzhu  wrote:
>  #+TBLFM: $1=if(@# % 2, $#, string(""))
> [...]
> Error:  Expected a number

I hope this is only because the org-version is too old to support this
feature added 2010-03-14. Check M-x org-version.

Michael

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


Re: [Orgmode] org-mode keybinding conflicts with user keybinding : C-tab

2010-12-26 Thread Michael Brand
Hi Michel Briand

On Sun, Dec 26, 2010 at 17:22, Michel Briand  wrote:
> for many years I'm using C-tab bounded to 'other-window.
>
> Org-mode binds this key (control tab), however I would like to keep my
> own binding for this key.
>
> I've investigated in "Org Disputed Keys", enabling
> org-replace-disputed-keys and adding :
>
> ([(control tab)] . [(meta control tab)])

This is most likely not the smartest solution but at least I expect it
to do what you want:
(org-defkey org-mode-map (kbd "") 'other-window)
(org-defkey org-mode-map (kbd "") 'org-force-cycle-archived)

Michael Brand

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


Re: [Orgmode] Display of time/date ranges in the agenda

2011-01-05 Thread Michael Brand
On Wed, Jan 5, 2011 at 13:58, Tassilo Horn  wrote:
> --8<---cut here---start->8---
> Monday 17 January 2011 W03
>  uni:12:00.. (1/2):  Statustreffen (Bad Homburg)
> Tuesday18 January 2011
>  uni:..13:30 (2/2):  Statustreffen (Bad Homburg)
> --8<---cut here---end--->8---

I am missing this functionality too.

Until now I have used a weak workaround that shows at least the end
time but that has several other disadvantages: one of them is not
showing the start time, one is that the start day as a whole is shown
only if the current day in the agenda is 2010-01-17 itself:
DEADLINE: <2011-01-18 Tue 13:30 -1d>
And adding a
SCHEDULED: <2011-01-17 Mon 12:00>
would result in a `Sched. 2x:' in the agenda on 2011-01-18 which I don't like.

Michael

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


Re: [Orgmode] Viper-mode + orgmode + emacs 23.xx on OSX, slowness in insert-mode

2011-01-10 Thread Michael Brand
Hi Marcelo, hi all

I think I have drilled down this slowness to be related with
viper-mode color settings but now I can not help more. Since it seems
to be a problem only in org-mode I hope that someone with a Mac OS X
Cocoa Emacs 23 here on the list can analyze this further.

On Mon, Jan 10, 2011 at 03:26, Marcelo de Moraes Serpa
 wrote:
> Has anyone tried to use this combo? I find that viper is too slow when
> in insert mode (when typing, actually), but only when in a buffer
> where orgmode is activated. Any ideas ?

I noticed only now that I have this slowness when I start a Mac OS X
Cocoa Emacs 23.2.1 with -q. With my settings it happened only
sporadically every few weeks or months and disappeared I think after
closing the buffer and reopening the file.

Now I drilled down the slowness to be related with my color setting.
When I have no or an empty ~/.emacs and a ~/.viper with this content:

(setq viper-inhibit-startup-message 't)
(setq viper-expert-level '3)
(setq viper-vi-state-cursor-color "sea green")
(setq viper-insert-state-cursor-color "sea green")

and enter viper-mode before or after opening a file in org-mode the
slowness disappears. When I uncomment only one of the two lines above
with the viper-*-state-cursor-color and restart Emacs the slowness is
back. When I stay in the buffer and change its major mode from
org-mode to fundamental-mode the slowness disappears again.

In a Linux GNU Emacs 23.2.1 I can not observe such slowness.

Michael

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


Re: [Orgmode] Viper-mode + orgmode + emacs 23.xx on OSX, slowness in insert-mode

2011-01-11 Thread Michael Brand
On Tue, Jan 11, 2011 at 21:47, Filippo A. Salustri  wrote:
> I haven't tried viper yet, but there's another version of emacs for OSX,
> Aquamacs.  Has anyone tried to check slowness in Aquamacs?

I expected Aquamacs just to be too different to Cocoa Emacs, but now I
am surprised: In a Mac OS X Aquamacs-Emacs-2.1 there is also exactly
the same viper insert slowness when in org-mode, disappearing with
fundamental-mode or with the ~/.viper from my last post.

In a Mac OS X Carbon Emacs 22.3.1, the last Mac OS X Carbon I think, I
can not observe such slowness. Possibly because it is not Mac OS X
Cocoa and/or it is not Emacs 23.

Michael

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


Re: [Orgmode] Hiding deadlines for completed (but not DONE) tasks

2011-01-12 Thread Michael Brand
Hi Giorgio

On Wed, Jan 12, 2011 at 17:25, Giorgio Valoti  wrote:
> by default, a task with a deadline shows up in the agenda until is marked 
> DONE. Reading the docs it seems there’s no way to specify other statuses to 
> ignore. I use some other states, like CANCELLED or CLOSED that I’d like to 
> hide as well. Is there a way to do this?

I guess you need to configure your todo keywords with the vertical bar, see
http://orgmode.org/manual/Workflow-states.html#Workflow-states

Michael

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


Re: [Orgmode] Hiding deadlines for completed (but not DONE) tasks

2011-01-12 Thread Michael Brand
On Wed, Jan 12, 2011 at 19:06, Giorgio Valoti  wrote:
> mmmh, maybe there’s just something wrong with my conf:
>
> (setq org-todo-keywords (quote ((sequence "TODO(t)" "STARTED(n)" "|" 
> "DONE(d!/!)")
>  (sequence "WAITING(w@/!)" "SOMEDAY(s!)" "|" "CANCELLED(c@/!)")
>  (sequence "APPT(a!)" "ERRAND(e!)" "ONSITE(o!)" "|" "HOME(h!/!)")
>  (sequence "APERTO(f!)" "|" "CHIUSO(F!/!)")
>  (sequence "QUOTE(q!)" "QUOTED(Q!)" "|" "APPROVED(A@)" "EXPIRED(E@)" 
> "REJECTED(R@)"
>
> When I tag an item as CANCELLED, the agenda hides it; when I tag it as CHIUSO 
> it still shows up.

I can not see anything wrong with this configuration and I hope that
someone else can tell more.

Michael

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


Re: [Orgmode] org-agenda-show-current-time-in-grid and automatic refresh

2011-01-12 Thread Michael Brand
On Thu, Jan 13, 2011 at 05:56, Kiwon Um  wrote:
> ;; refresh agenda view regurally
> (defun kiwon/org-agenda-redo-in-other-window ()
>  "Call org-agenda-redo function even in the non-agenda buffer."
>  (interactive)
>  (let ((agenda-window (get-buffer-window org-agenda-buffer-name t)))
>(when agenda-window
>  (with-selected-window agenda-window (org-agenda-redo)
> (run-at-time nil 300 'kiwon/org-agenda-redo-in-other-window)

I must admit that I would like and use a less simple solution where
only the line with the current time would be updated and if necessary
also moved within the time grid once every minute. I would like it
even additionally to the clock on the OS desktop because the agenda
view current time does not only show the current time itself but also
the current time position within the time grid.

For me it would not be desirable to update also all other agenda view
contents like above without request from the user with `g'. On one
side because it can collide badly with the user while manipulating (e.
g. shift-right several times on an entry) or only moving in the agenda
view and on one side because an overall update can take an
unpredictably large amount of CPU time for a larger set of larger
agenda files.

Michael

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


Re: [Orgmode] [OT] Have you also got hooked by Vim?

2011-01-12 Thread Michael Brand
Hi Marcelo

On Thu, Jan 13, 2011 at 07:09, Marcelo de Moraes Serpa
 wrote:
> So, how many of you here also use Vim? :)

I also started with Emacs and later got hooked by the modal user
interface of vi for editing. Now I use vi/Vim for simple editing tasks
like config files while in a shell or on a machine where Emacs is not
available and Emacs with viper-mode for all other tasks, also as my
only IDE for developing C in large projects.

Michael

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


Re: [Orgmode] Re: [OT] Have you also got hooked by Vim?

2011-01-13 Thread Michael Brand
Hi Detlef

On Thu, Jan 13, 2011 at 08:32, Detlef Steuer  wrote:
> I would be interested to hear about difficulties you face when using
> org-mode together with viper. Or aren't there any?

If not programming I use Org together with viper almost all the time
when in Emacs and I know only of two small difficulties:

1) With the wrong configuration when using Mac OS X Cocoa Emacs or
Aquamacs there can be slowness in vi/viper insert mode. In a Linux GNU
Emacs 23.2.1 I can not observe such slowness. For a workaround and
more see
http://thread.gmane.org/gmane.emacs.orgmode/35916

2) Often in a Org table the vi/viper change commands like `ce' do not
replace but insert. I use workarounds like `dei'. In other places than
Org table this issue never happened to me.

I can recommend viper very much with Org and also generally in Emacs
to have the best of both worlds of vi/Vim and Emacs together in one
place. Just for fun I imagine it being a vi with one mode additional
as an extension to the native vi modes like command mode, insert mode,
replace mode: the "Emacs mode". viper shows the letter V, I, R or E
for these four viper modes in the Emacs mode line.

Michael

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


Re: [Orgmode] [OT] Have you also got hooked by Vim?

2011-01-13 Thread Michael Brand
Hi Andrew

On Thu, Jan 13, 2011 at 13:27, Andrew J. Korty  wrote:
> I've tried several times to use Viper, but I always give up.  The usual
> showstopper is read-only Emacs modes with single-character key bindings,
> like MH-E.  The d key deletes a message in an MH folder, but in vi, d
> deletes text to a target.  So the obvious thing to do is turn Viper mode off
> in folder buffers.  But I'd like to use the vi keys for motion (h, j, k, l)
> -- I can't get used to using them in some buffers and not others.  So unless
> I'm unaware of some trick, I have to build my own keymap almost for each of
> these modes.

I hope I understand you right and this helps: I use C-z for this with
viper level 3 to have C-z bound to Emacs. When I open e. g. dired then
the viper state in this buffer that is shown in the mode line is 
meaning Emacs. In this mode the Emacs keys are active like e. g. `f'
to open the file in a new buffer or p/n to go up/down. Back in dired
and after C-z the viper state changes to  meaning viper. In this
mode the vi keys are active like e. g. `f' to find a certain character
or k/j to go up/down. C-z at any time toggles again to .

Michael

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


[Orgmode] outline path in links

2011-01-13 Thread Michael Brand
Hi all

What do you think about having _outline path in links_ as described in
the following?

I have seen that an outline path like `Bach/Prelude' can be used to
refile notes into a heading `Prelude' that has a parent heading named
`Bach'. An outline path like `Chopin/Prelude' refiles into a different
heading with the same name `Prelude' but with a different parent
heading named `Chopin'.

Now I wondered if the link type [[*Bach/Prelude]] could be used to
_link_ to the first outline path above. This link type would be even
_plainer plain text_ and easier to add to a Org buffer than the link
type [[#Bach/Prelude]] because the latter requires to manually add the
property `:CUSTOM_ID: Bach/Prelude'

I think that such an outline path in links could be possible even
without the need of adding a new variable org-link-use-outline-path
similar to the existing variable org-refile-use-outline-path: Like
today the link [[*Orchestersuite/Ouverture]] would still match a
heading named `Orchestersuite/Ouverture' (both words on the same
heading level with a literal slash as part of the heading name) but
additionally the link [[*Bach/Orchestersuite/Ouverture]] then would
match this heading only if it has a parent heading named `Bach'. This
would not be the simplest way to implement but in my opinion the
priority should be to have as less config variables as possible. Even
better if the code that gives this flexibility could also be used for
refiling with outline path and the variable
org-refile-use-outline-path could be dropped.

Michael

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


[Orgmode] Re: `C-u 2 S-Tab' with `#+STARTUP: odd'

2009-10-12 Thread Michael Brand

Thank you for the fix of the function org-shifttab in org-version 6.31a.

I wonder how the function org-outline-level is intended to work. Should it show 
the outline level or count the stars like in org-version 6.31a and one has to 
take into account `odd' himself to get the outline level when implementing own 
stuff which use e. g. the function org-shifttab?



yes, I agree it would be consistent to adapt the interpretation
of the prefix arg when using odd-levels.

I have fixed this, it is available in git now, and will be in
the next release (6.31).

Thanks!

- Carsten

On Sep 10, 2009, at 1:48 PM, Michael Brand wrote:


I like the org-indent-mode with the soft-indentation but even more I
like the hard-indentation with `#+STARTUP: odd hidestars' instead for
which I have a question.

This is the content of the example file oddeven:
-*- mode: org -*-
#+STARTUP: oddeven hidestars content
* 1 Org Mode
** 1.1 Introduction
*** 1.1.1 Installation

This is the content of the example file odd:
-*- mode: org -*-
#+STARTUP: odd hidestars content
* 1 Org Mode
*** 1.1 Introduction
* 1.1.1 Installation

The different _Emacs-faces_ (colors) for the heading levels are the  same
when comparing the two files. This Emacs-internal adaptation I
appreciate a lot.

C-u 2 S-Tab shows _two_ levels with the file oddeven but only _one_  with
the file odd. Is this how it is intended to work for the file odd?


org-version is 6.30e.



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


[Orgmode] Re: `C-u 2 S-Tab' with `#+STARTUP: odd'

2009-10-12 Thread Michael Brand
I wonder how the function org-outline-level is intended to work. 
Should it show the outline level or count the stars like in 
org-version 6.31a and one has to take into account `odd' himself to 
get the outline level when implementing own stuff which use e. g. the 
function org-shifttab?


org-outline-level shows the number of stars, independently of 
org-odd-levels


Use

   (org-reduced-level (org-outline-level))

to get normalized levels.

Inside org, you need to check which function works with what kind
of level, this is unfortunately not entirely abstracted.

HTH

- Carsten


Thank you, exactly what I have missed. Allow me to mention that I would like 
this hint to be added to the Help documentation of org-outline-level where I 
looked before.

There is something more with org-outline-level in org-version 6.31a which I 
still don't understand because I am not aware of some functions used in its 
implementation. I drilled down the quite special situation to the following 
file content. I hope that the indentation of x by three spaces does not get 
lost in the mailing list archive:

-*- eval: (org-mode) -*-
  x

After opening this file and confirming `eval', org-outline-level reports `3' 
(changes when changing the indentation of x) but I expect it to report someting 
like `0', `1000' or `1001' or similar like it does with variations like e. g.

-*- mode: org -*-
  x


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


[Orgmode] Re: `C-u 2 S-Tab' with `#+STARTUP: odd'

2009-10-13 Thread Michael Brand
There is something more with org-outline-level in org-version 6.31a 
which I still don't understand because I am not aware of some 
functions used in its implementation. I drilled down the quite special 
situation to the following file content. I hope that the indentation 
of x by three spaces does not get lost in the mailing list archive:


-*- eval: (org-mode) -*-
 x

After opening this file and confirming `eval', org-outline-level 
reports `3' (changes when changing the indentation of x) but I expect 
it to report someting like `0', `1000' or `1001' or similar like it 
does with variations like e. g.


-*- mode: org -*-
 x


The function assumes that the cursor is located at the beginning


Ok. I found out that (save-excursion (beginning-of-line) (org-outline-level)) 
can compensate.


of an outline heading. If it is not, it will return garbage.


Here I am lost and would like some help. I was not able to find out how to 
determine if the cursor is on a line with an outline heading or not.


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


[Orgmode] Re: `C-u 2 S-Tab' with `#+STARTUP: odd'

2009-10-14 Thread Michael Brand

Here I am lost and would like some help. I was not able to find out
how to determine if the cursor is on a line with an outline heading or
not.


I think you can use the function org-on-heading-p to determine if you
are on a heading or not.


Thank you, exactly what I have missed.


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


[Orgmode] Re: suggestion: simplify depth stepping of document structure (outline) visibility

2009-10-14 Thread Michael Brand

Hi all,

One reply is not that much feedback yet..., maybe I tried to be detailed but 
was not clear enough? Ok, I thought after having submitted a few bug reports 
before, it would be good to contribute in a way a bit more constructive this 
time ;-) and implemented what I have described in my previous post for headings 
(not for list elements).

For those who are interested in trying it out:
First you will have to upgrade to org-version 6.31a or newer (or take into 
account
http://thread.gmane.org/gmane.emacs.orgmode/17441)
and then put the code at the end of this post e. g. into your .emacs file and start a 
new Emacs. Use `C->' and `C-<' repeatedly back and forth on your files that 
have at least a few heading levels and tell how useful you find it.

I find the usage of my-orgstruct-dive very intuitive in contrast to the 
complicated look of both the description in my previous post and my 
implementation here. As a nice side effect this function also brings two 
functionalities from outline-mode to org-mode which I am missing in org-mode: 
outline-mode-`C-c C-q' (hide everything lower than heading level at point 
(cursor)) and outline-mode-`C-c C-i' (show direct subheadings but not body of 
heading at point).


(global-set-key (kbd "C->") 'my-orgstruct-dive)
(global-set-key (kbd "C-<") 'my-orgstruct-dive-out)
(defvar my-orgstruct-dive-level 0)
(defun my-orgstruct-dive-out ()
 "Wrapper to simplify comparison with last-command in my-orgstruct-dive"
 (interactive)
 (my-orgstruct-dive t))
(defun my-orgstruct-dive (&optional dive-out)
 "Make visible one heading level more or less.
return value: undefined.
dive-out: If nil dive in, else dive out."
 (interactive)
 ;; determine new level
 (if (or (eq last-command 'my-orgstruct-dive)
 (eq last-command 'my-orgstruct-dive-out))
 ;; command repetition, increase/decrease level
 (setq my-orgstruct-dive-level
   (+ my-orgstruct-dive-level (if dive-out '-1 '1)))
   ;; init level to that of point
   (setq my-orgstruct-dive-level
 (if (outline-on-heading-p)
 (org-reduced-level
  (save-excursion (beginning-of-line) (org-outline-level)))
   '0)))
 ;; update heading visibility
 (when (or (<= my-orgstruct-dive-level 0) (<= 1000 my-orgstruct-dive-level))
   (setq my-orgstruct-dive-level 1))
 (org-shifttab my-orgstruct-dive-level))



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


[Orgmode] Re: `C-u 2 S-Tab' with `#+STARTUP: odd'

2009-10-14 Thread Michael Brand

I have troube understanding what you mean.

An outline heading looks like this

*** heading

If the cursor is at the first character of that line, org-outline-level 
will return 3.


I want `3' _independently_ of on which column the cursor is on that line and 
therefore use (save-excursion (beginning-of-line) (org-outline-level)).

If the line looks different, the return value will be badly 
determined (governed by the most recent match of a regular expression 
anywhere in Emacs, might be anything).


To cover this I use (outline-on-heading-p), without the optional parameter in 
my case.

If you need to find out, in a lisp program, if you are at the beginning 
of a headline, use


 (and (org-at-heading-p t) (bolp))


The matter is that within any one line I rather want to _ignore_ the column 
than to _know_ on which column the cursor is.

With all discussed here in this thread combined together I use
(if (outline-on-heading-p)
   (org-reduced-level
(save-excursion (beginning-of-line) (org-outline-level)))
 '0)))
for my suggestion of heading visibility depth stepping described here
http://thread.gmane.org/gmane.emacs.orgmode/17581/focus=18392


___
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] directory tree size browsing with column view

2009-10-24 Thread Michael Brand

Hi all,

I would like to use the column view for browsing a hierarchical tree with a 
summed up property like e. g. the directory sizes (inclusive cluster waste and 
subdirectories from `du -sk`) of a directory tree. Just similar (only unsorted) 
to the upper left pane of this GUI screenshot of WinDirStat here
http://windirstat.info/images/windirstat.jpg

Let me make an example how I think to do the same with column view when given a 
directory with the two shell outputs


$ ls -lR dir_node
total 16
drwxr-xr-x  2 usr  grp  136 Oct 24 12:00 a
drwxr-xr-x  2 usr  grp  102 Oct 24 12:00 b
-rw-r--r--  1 usr  grp 9070 Oct 24 13:00 t.txt

dir_node/a:
total 2400
-rw-r--r--  1 usr  grp 4535 Oct 24 12:00 x.txt
-rw-r--r--  1 usr  grp  1217312 Oct 24 12:00 y.txt

dir_node/b:
total 16
-rw-r--r--  1 usr  grp 4535 Oct 24 12:00 z.txt



$ find dir_node -type d -exec du -sk {} \;
1220dir_node
1200dir_node/a
8   dir_node/b


For this I would like to have `some software' which uses the path to this 
directory `dir_node' as input and produces the following output file


-*- mode: org; eval: (org-columns) -*-
#+STARTUP: odd hidestars
#+PROPERTY: size
#+COLUMNS: %20ITEM %size{+}

* dir_node
*** a
   :PROPERTIES:
   :size: 1200
   :END:
   -rw-r--r--  1 usr  grp 4535 Oct 24 12:00 x.txt
   -rw-r--r--  1 usr  grp  1217312 Oct 24 12:00 y.txt
*** b
   :PROPERTIES:
   :size: 8
   :END:
   -rw-r--r--  1 usr  grp 4535 Oct 24 12:00 z.txt
*** .
   :PROPERTIES:
   :size: 12
   :END:
   -rw-r--r--  1 usr  grp 9070 Oct 24 13:00 t.txt


Opening this file in org-mode using column view now is comfortable to browse 
and can look e. g. like here


ITEM | size |
* dir_node   | 1220 |
*** a| 1200 |
   :PROPERTIES:...
   -rw-r--r--  1 usr  grp 4535 Oct 24 12:00 x.txt
   -rw-r--r--  1 usr  grp  1217312 Oct 24 12:00 y.txt
*** b| 8|...
*** .| 12   |...


where all not of interest can be left hidden and one can see easily that
 - the directory `a' is by far the largest
 - most of the disk usage is caused only by the file dir_node/a/y.txt.
 - etc

I would be able to implement this `some software' in a shell script (if I would 
take the necessary time some day) but not within Emacs itself which would be 
easier to use and IMHO would not be concerned that much with portability issues.

What do you think?


___
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] directory tree size browsing with column view

2009-10-25 Thread Michael Brand

OK, I have added support for including file attributes as properties to
org-fstree. You will need to use the merge_jtd_smiths_patch branch.

Once you have loaded org-fstree put the following in an orgfile and fill in the
directory name.

--8<---cut here---start->8---
* Disk usage
  :PROPERTIES:
  :COLUMNS: %80ITEM %size{+}
  :END:
#+BEGIN: fstree :dir "" :file-attributes (size)
#+END:
--8<---cut here---end--->8---

Hit C-c C-c on the #+BEGIN line to fill in the file details.


Thanks a lot for org-fstree, that's the column view directory tree browser I 
have been looking for. And also thanks for the related change to combine the 
Emacs function file-attributes with org-fstree which I just have tried out.


___
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] Precision setting for spreadsheet calculation

2010-02-26 Thread Michael Brand

Hi all,


1) I tried to set the precision for the spreadsheet calculation to p20 like 
mentioned in the Org info manual "3.5.2 Formula syntax for Calc":

I got

| 0.1667 |
#+TBLFM: $1 = 1 / 2 * 3; %.16f p20

but I expect

| 0.1667 |
#+TBLFM: $1 = 1 / 2 * 3; %.16f p20

What am I missing? org-version is the current 6.34c, GNU Emacs version is 21.1.1


Thanks,
Michael


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


Re: [Orgmode] Precision setting for spreadsheet calculation

2010-02-26 Thread Michael Brand

Carsten Dominik wrote:

You need p20f20

p20 is for internal computation, f20 for youput, and the table
gets the value through output.  Confusing, yes


| 0.1667 |
#+TBLFM: $1 = 1 / 2 * 3; %.16f p20 f20

like expected. But instead of

| 0.10 |
#+TBLFM: $1 = 1 / 2 * 3; %.18f p20 f20

which I get I would expect

| 0.17 |
#+TBLFM: $1 = 1 / 2 * 3; %.18f p20 f20


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


Re: [Orgmode] Precision setting for spreadsheet calculation

2010-02-26 Thread Michael Brand

Carsten Dominik wrote:

these are the internals of calc, about which I cannot do much.


But

| 0.1667 |
#+TBLFM: $1 = 1 / 2 * 3; p20 f20

shows that the internals of calc are ok, isn't it?


Michael Brand wrote:

But instead of

| 0.10 |
#+TBLFM: $1 = 1 / 2 * 3; %.18f p20 f20

which I get I would expect

| 0.17 |
#+TBLFM: $1 = 1 / 2 * 3; %.18f p20 f20



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


Re: [Orgmode] Precision setting for spreadsheet calculation

2010-02-27 Thread Michael Brand

Carsten Dominik wrote:
> when using a printf format specifier, the number
> is first converted into a Lisp number, which is
> a double, with 16 significant digits
Thanks for the clarification.


Maybe you find this interesting enough so that I can
persuade you to write a FAQ entry about these issues? :-)
Yes, within a few days I will come back with this and/or a texinfo patch for 
the Org info manual, at least chapter "3.5.2 Formula syntax for Calc".



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


Re: [Orgmode] Precision setting for spreadsheet calculation

2010-03-02 Thread Michael Brand

Hi Carsten

Michael Brand wrote:
Yes, within a few days I will come back with this and/or a texinfo patch 
for the Org info manual, at least chapter "3.5.2 Formula syntax for Calc".


The patch below is my proposal for the manual. Please feel free to improve it.

I also played around quite a bit with the precision settings and will put the 
resulting examples into the Worg FAQ. But I would like to postpone my Worg 
FAQ update because its link to the manual would be confusing before the 
manual update itself will have been made.


Is there a small issue with the behavior of the section link
http://orgmode.org/manual/index.html#Top ?
With Firefox 3.0.5 it sometimes jumps to where the html source fragment

lies like expected but sometimes it jumps to where the html source fragment

lies which could be annoying.

Michael


patch for org.texi, `---' file was taken from org-version 6.34c:
=
--- a/doc/org.texi  2010-01-18 00:10:46.0 +0100
+++ b/doc/org.texi  2010-03-02 20:00:00.0 +0100
@@ -2128,8 +2128,11 @@
 @code{org-calc-default-modes}.

 @example
-p20   @r{switch the internal precision to 20 digits}
-n3 s3 e2 f4   @r{normal, scientific, engineering, or fixed display format}
+p20   @r{set the internal Calc calculation precision to 20 digits}
+n3 s3 e2 f4   @r{Normal, scientific, engineering, or fixed}
+  @r{format of the result of Calc passed back to Org.}
+  @r{Calc formatting is unlimited in precision as}
+  @r{long as the Calc calculation precision is greater.}
 D R   @r{angle modes: degrees, radians}
 F S   @r{fraction and symbolic modes}
 N @r{interpret all fields as numbers, use 0 for non-numbers}
@@ -2139,8 +2142,16 @@
 @end example

 @noindent
-In addition, you may provide a @code{printf} format specifier to
-reformat the final result.  A few examples:
+Unless you use large integer numbers or high-precision-calculation
+and -display for floating point numbers you may alternatively provide a
+...@code{printf} format specifier to reformat the Calc result after it has been
+passed back to Org instead of letting Calc already do the
+formatt...@footnote{the @code{printf} reformatting is limited in precision
+because the value passed to it is converted into an @code{integer} or
+...@code{double}.  The @code{integer} is limited in size by truncating the
+signed value to 32 bits.  The @code{double} is limited in precision to 64
+bits overall which leaves approximately 16 significant decimal digits.}.
+A few examples:

 @example
 $1+$2@r{Sum of first and second field}
=



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


Re: [Orgmode] Precision setting for spreadsheet calculation

2010-03-11 Thread Michael Brand

Eric S Fraga wrote:

Either destination within index.html is obviously fine (at least to
me!).  I guess Michael's query must have been due to the fact that
depending on where you click from, you get placed in a different place
in the index.html file?


Almost yes. Even the _same_ section_link can take you to different places at 
different times. Only now I found the probably easiest way to reproduce: 
start with

http://orgmode.org/manual/index.html
and repeat these two steps as many times as you like

1) click `1 Introduction' (or any other first level node) in the frame on the 
left side
2) click any `Top' (`1 Introduction' has two of them) in the frame on the 
right side or `Org Mode Manual' in the frame on the left side


Every second time doing these steps I am taken to the info_node_navigation
`Next: Introduction, Previous: (dir), Up: (dir)'
This is what I expect since following a `Top' from a info_node_navigation 
should take you simply to a info_node_navigation again in my opinion.

But every other second time I am taken to
`The Org Manual'
This is only the very top of the whole page but not the HTML_anchor



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


[Orgmode] new spreadsheet features: field coordinates, multi line TBLFM with comments

2010-03-13 Thread Michael Brand

Hi Carsten, hi all

1) field coordinates:
As a proposal I implemented the following to cover one of my spreadsheet use 
cases: Why not let `...@#' and `$#' in Calc formulas (works also for Lisp 
formulas) be substituted to the row or column number of the formula result 
field?. The traditional Lisp formula equivalents are org-table-current-dline 
and org-table-current-column. I believe it does not break the TBLFM syntax 
for any other use.


My use case is an overview with the average annual relative changes of a time 
series. Here is an example with averages for a history of 1 year up to 4 years:

| year | quote |   1 a |   2 a |   3 a |   4 a |
|--+---+---+---+---+---|
| 2005 |10 |   |   |   |   |
| 2006 |12 | 0.200 |   |   |   |
| 2007 |14 | 0.167 | 0.183 |   |   |
| 2008 |16 | 0.143 | 0.155 | 0.170 |   |
| 2009 |18 | 0.125 | 0.134 | 0.145 | 0.158 |
#+TBLFM: $3 = if(@# + 1 > $#, ($2 / subscr(@-i$...@+i$2, @# + 1 - $#)) ^ (1 / 
($# - 2)) - 1, string("")); f3 :: $4 = if(@# + 1 > $#, ($2 / 
subscr(@-i$...@+i$2, @# + 1 - $#)) ^ (1 / ($# - 2)) - 1, string("")); f3 :: 
$5 = if(@# + 1 > $#, ($2 / subscr(@-i$...@+i$2, @# + 1 - $#)) ^ (1 / ($# - 
2)) - 1, string("")); f3 :: $6 = if(@# + 1 > $#, ($2 / subscr(@-i$...@+i$2, 
@# + 1 - $#)) ^ (1 / ($# - 2)) - 1, string("")); f3


The patch (the files with `---' were taken from org-version 6.34c):
==
--- a/doc/org.texi
+++ b/doc/org.texi
@@ -2098,6 +2098,21 @@ table in that entry.  REF is an absolute
 described above for example @code{@@3$3} or @code{$somename}, valid in the
 referenced table.

+...@subsubheading Field coordinates
+...@cindex field coordinates
+...@cindex coordinates, of field
+...@cindex row, of field coordinates
+...@cindex column, of field coordinates
+
+For Calc formulas and Lisp formulas @code{@@#} and @code{$#} can be used to
+get the row or column number of the field where the formula result goes.
+The traditional Lisp formula equivalents are @code{org-table-current-dline}
+and @code{org-table-current-column}.  Example:
+
+...@example
+if(@@# % 2, $#, string(""))  @r{column number on odd lines only}
+...@end example
+
 @node Formula syntax for Calc, Formula syntax for Lisp, References, The 
spreadsheet

 @subsection Formula syntax for Calc
 @cindex formula syntax, Calc
--- a/lisp/org-table.el
+++ b/lisp/org-table.el
@@ -2243,6 +2243,21 @@ not overwrite the stored one."
(setq form (copy-sequence formula)
  lispp (and (> (length form) 2)(equal (substring form 0 2) "'(")))
(if (and lispp literal) (setq lispp 'literal))
+
+   ;; Insert row number of formula result field
+   (while (string-match "\...@#" form)
+ (setq form
+   (replace-match
+(save-match-data
+  (format "%d" (org-table-current-dline)))
+t t form)))
+   ;; Insert column number of formula result field
+   (while (string-match "\\$#" form)
+ (setq form
+   (replace-match
+(save-match-data
+  (format "%d" (org-table-current-column)))
+t t form)))
;; Check for old vertical references
(setq form (org-table-rewrite-old-row-references form))
;; Insert remote references
==

2) self-edited multi line TBLFM with comments:
For me it would be great to have the now missing option to hack all the 
formulas myself just directly, but rather into a multi line TBLFM with 
comments than into the one line #+TBLFM:. For the use case above this would 
look like:


[...]
| 2009 |18 | 0.125 | 0.134 | 0.145 | 0.158 |
#+BEGIN_TBLFM
$3 = if(@# + 1 > $#, ($2 / subscr(@-i$...@+i$2, @# + 1 - $#)) ^
(1 / ($# - 2)) - 1, string("")); f3 :: # rel. change for 1 year
$4 = if(@# + 1 > $#, ($2 / subscr(@-i$...@+i$2, @# + 1 - $#)) ^
(1 / ($# - 2)) - 1, string("")); f3 :: # average for 2 years
$5 = if(@# + 1 > $#, ($2 / subscr(@-i$...@+i$2, @# + 1 - $#)) ^
(1 / ($# - 2)) - 1, string("")); f3 :: # average for 3 years
$6 = if(@# + 1 > $#, ($2 / subscr(@-i$...@+i$2, @# + 1 - $#)) ^
(1 / ($# - 2)) - 1, string("")); f3# average for 4 years
#+END_TBLFM

I suggest to leave the one line #+TBLFM without the comment possibility to 
avoid issues with the very nice write back to #+TBLFM when editing with e. g. 
`C-c =' or moving rows and columns. In favor of a complexity reduction and to 
avoid confusion I suggest to leave the #+BEGIN_TBLFM option without write 
back and to unconditionally reject a trial to do it. Similar to the nice 
reject when trying to edit column 1 with `C-c =' in the following example, 
where #+TBLFM has been upset by self-editing it:

| 0 |
#+TBLFM: $1 = 0 :: $1 = 0

This way the implementation for the multi line TBLFM with comments could on 
evaluati

[Orgmode] Re: new spreadsheet features: field coordinates, multi line TBLFM with comments

2010-03-14 Thread Michael Brand

Carsten Dominik wrote:

1) field coordinates:
 [...]
+...@subsubheading Field coordinates
[...]


That does look reasonable, and I am going to take that patch.


Thank you. Maybe this change of the above would make it clearer:
+...@subsubheading Field coordinates in formulas



2) self-edited multi line TBLFM with comments:


Before looking further, I would like to find out if you are aware
of the existence of the formula editior, invoked the command
C-c ' (that is C-c followed by the single quote) while the
cursor is in a table.

The formula editor does not have comments, but otherwise it is more 
powerful than what you propose.


Much more powerful, really great and well designed! Most of all the 
highlighting of fields and ranges. I prefer that much over my proposal and 
abandon comments inside. I knew the manual heading but since I stuck on the 
word `debugging' and _underestimated_ the word `Editing', at least when 
already editing in a org-mode buffer, I thought there is no need to read as 
long as my formulas work... Not only for this reason but mostly because of 
the great value I think it is more than worth mentioning it in the 
spreadsheet summary in the manual somehow like this:


==
--- org.texi.orig.texi  Sat Mar 13 15:41:20 2010
+++ org.texiSun Mar 14 12:39:07 2010
@@ -1931,7 +1931,9 @@ derive fields from other fields.  While
 implementation is not identical to other spreadsheets.  For example,
 Org knows the concept of a @emph{column formula} that will be
 applied to all non-header fields in a column without having to copy the
-formula to each relevant field.
+formula to each relevant field.  There is a special formula editor with
+features for highlighting fields in the table corresponding to the
+references at the point in the formula, moving these references by
+arrow keys and a formula debugger.

 @menu
 * References::  How to refer to another field or range
=


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


[Orgmode] spreadsheet: column width behavior(s)

2010-03-25 Thread Michael Brand

Hi Carsten, hi all

Are there reasons to only narrow but not to widen columns?

I would like the behavior `fixed width' like

| year | boss  | facility management assistant  |
|  | <30>  | <30>   |
|--+---+|
| 2009 | Alice | Bob|

but with the current implementation get

| year | boss  | facility management assistant |
|  | <30>  | <30>  |
|--+---+---|
| 2009 | Alice | Bob   |

which widens the column only if there is too less space left for the column 
content.


As a comparison I can imagine four variants:
<..40>   : `maximum width' (what <40> is today)
<30> : `fixed width'
<20..>   : `minimum width' (no narrowing)
<20..40> : `width range' (minimum 20, up to 40, narrowing if even longer)

The most commonly used spreadsheet applications offer just one single variant 
out of the above four (right?) and it is `fixed width'. My vote for org-table 
would be the same: That it should support `fixed width' and that this is 
sufficient as the only variant. What is the opinion of other users?


- Michael


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


Re: [Orgmode] spreadsheet: column width behavior(s)

2010-03-27 Thread Michael Brand

Are there reasons to only narrow but not to widen columns?


I think this is really the only thing that makes sense.  Why would
you want it any wider, given the limited amount of screen real
estate we have here?  I don't think it would be difficult to make
it behave the way you request, but I don't think I would ever
use widening fields.  When would you want to use this?


I see, there _are_ reasons for `maximum width' (and other variants would be 
only additional if ever).


The variant `fixed width' can be useful for the following timetable. Here it 
is achieved with the field content

`<=  widen'
in the last row.

several columns with the same width:

|---+---+---+---+---+---|
|   | Mon   | Tue   | Wed   | Thu   | Fri   |
|---+---+---+---+---+---|
|  8:15 | Math  | Compute=> | - | Math  | Compute=> |
| 13:15 | - | Math  | Compute=> | - | Math  |
|---+---+---+---+---+---|
| / | <9>   | <9>   | <9>   | <9>   | <9>   |
| / | <= => | <= => | <= => | <= => | <= => |

instead of:

|---+--+--+--+--+--|
|   | Mon  | Tue  | Wed  | Thu  | Fri  |
|---+--+--+--+--+--|
|  8:15 | Math | Computer S=> | -| Math | Computer S=> |
| 13:15 | -| Math | Computer S=> | -| Math |
|---+--+--+--+--+--|
| / |  | <12> | <12> |  | <12> |

or even:

| Mon |  8:15 | Math |
| Tue |  8:15 | Computer Science |
| Tue | 13:15 | Math |
| Wed | 13:15 | Computer Science |
| Thu |  8:15 | Math |
| Fri |  8:15 | Computer Science |
| Fri | 13:15 | Math |


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


Re: [Orgmode] spreadsheet: column width behavior(s)

2010-03-27 Thread Michael Brand
Yes, thinking more about it, I do agree that a fixed width makes a lot 
of sense as the application of .  It does now work like this.


Thank you for changing.  And if someone wants `maximum width' I hope that it 
will be implemented with the syntax <..N> as a _variant_ _additional_ to the 
existing .


Comparison of four variants (the last two rather useless apart from showing 
the completeness of the syntax):

<30> : `fixed width'   (the only variant implemented now)
<..40>   : `maximum width' (as wide as necessary but max. 40)
<20..>   : `minimum width' (as wide as necessary but min. 20)
<20..40> : `width range'   (min. 20, then up to 40, narrow only if > 40)


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


Re: [Orgmode] Re: Can't import a remote reference to a whole column in orgtbl

2010-04-04 Thread Michael Brand

Carsten Dominik wrote:

but being able to import whole rows/columns
would be incredibly useful.


There is actually now a way to do tis - even though it is inefficient.  
To copy column 2 from table FOO into column 3 of the current table, use


 #+TBLFM: $3=remote(FOO,@@#$2)

This is now possible due to a patch by Michael Brand:
http://thread.gmane.org/gmane.emacs.orgmode/22930

It works well, but it is inefficient because this formula will
parse the FOO table again for each field to be copied.


Very nice use case for `...@#'. How about a doc update somehow like this?

=
--- a/doc/org.texi
+++ b/doc/org.texi
@@ -2061,10 +2061,15 @@ see the @samp{E} mode switch below).  If
 For Calc formulas and Lisp formulas @code{@@#} and @code{$#} can be used to
 get the row or column number of the field where the formula result goes.
 The traditional Lisp formula equivalents are @code{org-table-current-dline}
-and @code{org-table-current-column}.  Example:
+and @code{org-table-current-column}.  Examples:

 @example
-if(@@# % 2, $#, string(""))  @r{column number on odd lines only}
+if(@@# % 2, $#, string(""))   @r{column number on odd lines only}
+$3 = remote(FOO, #$2)  @r{copy column 2 from table FOO into}
+ @r{column 3 of the current ta...@footnote{both
+tables must have the same count of rows.  Inefficient for a large count N of
+rows with a time complexity of O(N^2) because all rows of the FOO table will
+be parsed again for each field to be copied.}}
 @end example

 @subsubheading Named references
=


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


Re: [Orgmode] Re: Can't import a remote reference to a whole column in orgtbl

2010-04-04 Thread Michael Brand

Carsten Dominik wrote:

Applied, thanks.


Thank you. Looking forward to 6.35 I am watching Changes.org and have seen a 
typo which I think is worth to be pointed out:


==
--- a/ORGWEBPAGE/Changes.org
+++ b/ORGWEBPAGE/Changes.org
@@ -437,7 +437,7 @@ respectively.  These can be useful in so
 example, to sequentially number the fields in a column, use
 ~...@#~ as column equation.

-One application is to copy a copy from a different table.  See
+One application is to copy a column from a different table.  See
 the manual for details.

 Thanks to Michael Brand for this feature.
==


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


Re: [Orgmode] Re: Can't import a remote reference to a whole column in orgtbl

2010-04-05 Thread Michael Brand

Carsten Dominik wrote:
Sometimes I would like to rewrite the entire table editior for more 
structural clarity in the sode, so that it would be easier to implement 
more fancy stuff :-)


Possibly one of these fancy things: Some time ago I thought about transposing 
a table. But only now I realized that there is no additional implementation 
required any more because it can be done with the new field coordinates in 
formulas, `...@#' and `$#':


For example to transpose this 4x7 table FOO

#+TBLNAME: FOO
| year | 2004 | 2005 | 2006 | 2007 | 2008 | 2009 |
|--+--+--+--+--+--+--|
| min  |  401 |  501 |  601 |  701 |  801 |  901 |
| avg  |  402 |  502 |  602 |  702 |  802 |  902 |
| max  |  403 |  503 |  603 |  703 |  803 |  903 |

start with the following 7x4 table without any horizontal line and yet empty 
and then update the table with the TBLFM that simply takes the row number 
`...@$#' from the column number `$#' and the column number `...@#' from the row 
number `...@#' for each field.


the transposed copy of FOO:
| year | min | avg | max |
| 2004 | 401 | 402 | 403 |
| 2005 | 501 | 502 | 503 |
| 2006 | 601 | 602 | 603 |
| 2007 | 701 | 702 | 703 |
| 2008 | 801 | 802 | 803 |
| 2009 | 901 | 902 | 903 |
#+TBLFM: $1 = remote(FOO, @$...@#) :: $2 = remote(FOO, @$...@#) :: $3 = 
remote(FOO, @$...@#) :: $4 = remote(FOO, @$...@#)


Possible field formulas from the remote table will have to be transferred 
manually. Since there are no row formulas yet to be transferred to column 
formulas or vice versa there is not much need yet to transfer formulas 
automatically.


There could be a hint in the doc somehow like in the following patch. I 
didn't understand why the `must have at least as many' but anyhow tried to 
precise, so please check.


==
--- a/doc/org.texi
+++ b/doc/org.texi
@@ -2065,14 +2065,19 @@ and @code{org-table-current-column}.  Ex

 @example
 if(@@# % 2, $#, string(""))   @r{column number on odd lines only}
-$3 = remote(FOO, #$2)  @r{copy column 2 from table FOO into}
- @r{column 3 of the current table}
+$3 = remote(FOO, #$2)  @r{copy column 2 from table FOO}
+ @r{into column 3 of the current table}
+$1 = remote(FOO, @@$#$@@#) @r{copy row 1 from table FOO transposed}
+ @r{into column 1 of the current table}
 @end example

-...@noindent For the second example, table FOO must have at least as many rows
-as the current table.  ineffici...@footnote{the computation time scales as
-O(N^2) because table FOO is parsed for each field to be copied.} for large
-number of rows.
+...@noindent For the second example, table FOO should have at least as many 
rows
+as the current table to avoid orphaned fields.  ineffici...@footnote{the
+computation time scales as O(N^2) because table FOO is parsed for each field
+to be copied.} for large number of rows.  For the third example, table FOO
+should have at least as many columns as the current table has rows to avoid
+orphaned fields.  By applying this column formula to each column an entire
+table can be transposed.  Inefficient in the same way as the second example.

 @subsubheading Named references
 @cindex named references
--- a/ORGWEBPAGE/Changes.org
+++ b/ORGWEBPAGE/Changes.org
@@ -437,8 +437,10 @@ respectively.  These can be useful in so
 example, to sequentially number the fields in a column, use
 ~...@#~ as column equation.

-One application is to copy a column from a different table.  See
-the manual for details.
+Other applications are to copy a column from a different table to a
+column, to copy a row from a different table transposed to a column
+or to copy an entire table while transposing it.  See the manual for
+details.

 Thanks to Michael Brand for this feature.

==


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


Re: [Orgmode] feature request: transpose a table

2010-04-07 Thread Michael Brand

Hi zwz,

> I do not know if I can do org-plot on rows instead of columns.
> But today after I finished a table, I found I have to transpose the
> table by hand so that I can plot it as I want.
> Here is original table:
> |  x  | y  | x  | y  | ... |
> |-++++-|
> |   1 |  2 |  3 |  4 | |
> |   5 |  6 |  7 |  8 | |
> |   9 |  0 |  1 |  2 | |
> | ... |||| |
> And I have to convert it into:
> |   x | y | x | y | x | y | ... |
> |-+---+---+---+---+---+-|
> |   1 | 2 | 5 | 6 | 9 | 0 | |
> |   3 | 4 | 7 | 8 | 1 | 2 | |
> | ... |   |   |   |   |   | |
>
> so that every two columns stand for a line.

If someone had trouble to understand like me first, maybe looking also at the 
last table below with the column groups `<>' could help.


This use case seems quite funny and well suited to be solved with the `field 
coordinates in formulas' for which I proposed a patch some time ago that is 
included in org-mode now. Since org-version 6.35 you could try this hack:


step 1) Remove the header and use column editing from Emacs
http://www.gnu.org/software/emacs/manual/html_node/emacs/Rectangles.html
to change your original version of the table

| x | y | x | y |
|---+---+---+---|
| 1 | 2 | 3 | 4 |
| 5 | 6 | 7 | 8 |
| 9 | 0 | 1 | 2 |

to this 3x2 table with Calc vectors in short notation:

#+TBLNAME: FOO
| [1 2] | [3 4] |
| [5 6] | [7 8] |
| [9 0] | [1 2] |

step 2) Transpose the table like described here
http://orgmode.org/worg/org-hacks.php
in the section `Transpose a table', currently with this numbering
http://orgmode.org/worg/org-hacks.php#sec-17.2.3
to this 2x3 table with the same Calc vectors in the default notation:

| [1, 2] | [5, 6] | [9, 0] |
| [3, 4] | [7, 8] | [1, 2] |
#+TBLFM: $1 = remote(FOO, @$...@#) :: $2 = remote(FOO, @$...@#) :: $3 = 
remote(FOO, @$...@#)


step 3) query-replace `['->`', `]'->`', `,'->`|' and add the header manually 
to get finally this:


|   | x | f.a(x) | x | f.b(x) | x | f.c(x) |
| / | < |  > | < |  > | < |  > |
|---+---++---++---+|
|   | 1 |  2 | 5 |  6 | 9 |  0 |
|   | 3 |  4 | 7 |  8 | 1 |  2 |

> I also wonder how do you guys draw multiple lines in one image, since
> here there are multiple inds.

I guess you want a xy graph something like this with three lines a, b and c 
for f.a, f.b and f.c:


  f.n(x)
   ^
08 |  b
07 | b
06 |b
05 |
04 |  a
03 | a
02 |*c
01 |  c
00 +---cc--> x
   0011
   012345678901

see
http://thread.gmane.org/gmane.emacs.orgmode/21979

I assume that this could be done also with org-babel together with R
http://en.wikipedia.org/wiki/R_%28programming_language%29
possibly even with your original version of the table...

- Michael


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


Re: [Orgmode] Re: Can't import a remote reference to a whole column in orgtbl

2010-04-07 Thread Michael Brand

Carsten Dominik wrote:
this is neat, but still kind of hard to do, because you have to put all 
these formulas there by hand.  I am skipping this for the manual - maybe 
you'd like to put this into org-hacks, or into the FAQ on Worg?


Ok, I have put it into Worg org-hacks.org:
http://orgmode.org/worg/org-hacks.php
in the section `Field coordinates in formulas', currently with this numbering
http://orgmode.org/worg/org-hacks.php#sec-17.2

And only now I have seen and answered this thread:
`feature request: transpose a table'
started here
http://thread.gmane.org/gmane.emacs.orgmode/17453
and continued here
http://thread.gmane.org/gmane.emacs.orgmode/23809


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


Re: [Orgmode] Precision setting for spreadsheet calculation

2010-04-18 Thread Michael Brand

On 10-03-02 9:15 PM, Michael Brand wrote:

I also played around quite a bit with the precision settings and will
put the resulting examples into the Worg FAQ. But I would like to
postpone my Worg FAQ update because its link to the manual would be
confusing before the manual update itself will have been made.


I added
http://orgmode.org/worg/org-faq.php#table-high-precision
and
http://orgmode.org/worg/org-faq.php#table-float-fraction


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


[Orgmode] Vim folding/syntax highlighting?

2010-04-29 Thread Michael Brand

Hi Nathan

Does it matter for you if the modal (i/ESC etc.) editor with the vi key 
bindings that you like to use is run by Vim or Emacs? If not, then you can 
use Emacs with viper-mode as a minor mode for the emulation of the vi key 
bindings together with org-mode as the major mode. This is how I use Emacs 
and it feels just like a Vim that would have the full implementation of the 
org-mode and more.


See also here:
http://www.gnu.org/software/emacs/manual/html_node/viper/index.html
http://thread.gmane.org/gmane.emacs.orgmode/17508

Michael


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


[Orgmode] doc about Link abbreviations

2010-05-18 Thread Michael Brand

Hi Carsten

In the doc about Link abbreviations the limitation for the first linkword 
char is missing which I stumbled upon when I used #+LINK. I suggest to sync 
the doc more with the docstring of the variable org-link-abbrev-alist like this:



--- a/doc/org.texi
+++ b/doc/org.texi
@@ -3088,8 +3088,9 @@ abbreviated link looks like this

 @noindent
 @vindex org-link-abbrev-alist
-where the tag is optional.  The @i{linkword} must be a word; letter, numbers,
-...@samp{-}, and @samp{_} are allowed here.  Abbreviations are resolved
+where the tag is optional.
+The @i{linkword} must be a word, starting with a letter, followed by
+letters, numbers, @samp{-}, and @samp{_}.  Abbreviations are resolved
 according to the information in the variable @code{org-link-abbrev-alist}
 that relates the linkwords to replacement text.  Here is an example:



Michael

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


[Orgmode] export of emphasized link

2010-05-30 Thread Michael Brand

Hi all,

An org-mode line with an emphasized link like that one taken from current Worg:
--
*Drop an email to [[mailto:bzg%20AT%20altern%20DOT%20org][Bastien]]* 
mentioning your username on repo.or.cz

--
shows the bold face in the Emacs Org buffer like expected. But it does not 
convert the emphasis and still shows `*' when exported to some formats:

- HTML: not converted
- LaTeX: could not check because of a missing setup on my side,
   from the source code I guess that it converts
- DocBook: not converted
- ...: don't know about other formats and what they should support

After removing org-bracket-link-regexp from org-html-expand and 
org-docbook-expand the HTML and DocBook exports _are_ converted and look 
similar to the highlighting in the Emacs Org buffer. But the doc string of 
both functions tell:

"If there are links in the string, don't modify these."
Why should links be modified in org-mode but not in HTML or DocBook?

If there will be any change I would also like this:
--
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -3285,6 +3285,7 @@ example *bold*, _underlined_ and /italic/.  This variable
 characters, the face to be used by font-lock for highlighting in Org-mode
 Emacs buffers, and the HTML tags to be used for this.
 For LaTeX export, see the variable `org-export-latex-emphasis-alist'.
+For DocBook export, see the variable `org-export-docbook-emphasis-alist'.
 Use customize to modify this, or restart Emacs after changing it."
   :group 'org-appearance
   :set 'org-set-emph-re
--

And: wouldn't it be nice for maintenance to have only one function for some 
sets of functions like

- org-html-expand, org-docbook-expand and possibly more
- org-html-do-expand, org-docbook-do-expand and possibly more
- org-export-html-convert-emphasize, org-export-docbook-convert-emphasize and 
possibly more
- org-export-html-convert-sub-super, org-export-docbook-convert-sub-super and 
possibly more

- possibly more
because they have almost all code in common.

Michael

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


Re: [Orgmode] export of emphasized link

2010-06-01 Thread Michael Brand

On 10-06-01 09:44 , Carsten Dominik wrote:

After removing org-bracket-link-regexp from org-html-expand


What do you mean by this sentence? What exactly did you do?


To understand the implementation I tried the following temporary
change (the line prefix `:' will bypass the nice patch extract
http://patchwork.newartisans.com/project/org-mode/list
for this time I hope):

:--- a/lisp/org-html.el
:+++ b/lisp/org-html.el
:@@ -2025,8 +2025,7 @@ that uses these same face definitions."
: (defun org-html-expand (string)
:   "Prepare STRING for HTML export.  Applies all active conversions.
: If there are links in the string, don't modify these."
:-  (let* ((re (concat org-bracket-link-regexp "\\|"
:-(org-re "[ \t]+\\(:[[:alnum:]_@:]+:\\)[ \t]*$")))
:+  (let* ((re (org-re "[ \t]+\\(:[[:alnum:]_@:]+:\\)[ \t]*$"))
: m s l res)
: (if (string-match "^[ \t]*\\+-[-+]*\\+[ \t]*$" string)
:string


With this trial the export to HTML of emphasized links is supported.
But this should not happen as I understand the doc string of
org-html-expand and org-docbook-expand:
"If there are links in the string, don't modify these."
Why should emphasized links not be supported for the export to HTML
and DocBook (and maybe more export formats?) while the org-mode
buffer display (and maybe some export formats?) supports them?

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


Re: [Orgmode] automatic line wrap

2010-06-05 Thread Michael Brand

On 10-06-05 10:11 , Ivanov Dmitry wrote:

I found the solution:

(add-hook 'org-mode-hook
(lambda ()
(toggle-truncate-lines)))


For the case of org-mode I would recommend this instead:
(setq org-startup-truncated nil)

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


[Orgmode] org-feed XML entities and character encoding

2010-08-10 Thread Michael Brand

Hi all,

org-feed is becoming very useful for me, so far to manage the
episodes of podcasts. Now I have a patch and a request for help.

1. patch for an issue with XML entities
===

I found that some XML entities in my feeds are not substituted. The
comments of two recent org-feed.el commits by David Maus
http://repo.or.cz/w/org-mode.git/commitdiff/6875716e76acfbe1084a47e59d18a30a933d92b6
and
http://repo.or.cz/w/org-mode.git/commitdiff/6875716e76acfbe1084a47e59d18a30a933d92b6
lead me to the thread
http://thread.gmane.org/gmane.emacs.orgmode/26352
and invited me to replace org-feed-unescape with xml-substitute-special
which converts more XML entities. The resulting patch below helps for
me but of course I would like it to be reviewed by an experienced elisp
programmer and org-feed user before being applied.

2. request for help about an issue with multibyte character encoding


There is an issue with multibyte characters that appear in the input
as unescaped, multibyte encoded characters (not as XML entities, as XML
entities multibyte characters are simply substituted correctly). I
looked for an example with a character encoding specified in the first
line of the XML feed like

and found one here:
http://www.openscreencast.de/blog/rss.xml

The W3C validator
http://validator.w3.org
seems to be happy with this feed but when fed into a feeds.org the
unescaped, multibyte encoded characters e. g. of the title `Screencast
076 [...]' get upset, even with `coding: utf-8-unix' in the first line
of the file feeds.org. Can someone please help to get this issue
resolved? If easily possible, like I expect it to be, generally for
all character encodings supported by Emacs? I would even like if
UTF-8 feeds like
http://pod.drs.ch/world_music_special_mpx.xml
that do not have the character encoding specified would work too.

Thanks

- Michael


--- a/lisp/org-feed.el
+++ b/lisp/org-feed.el
@@ -99,6 +99,7 @@
 (declare-function xml-get-children "xml" (node child-name))
 (declare-function xml-get-attribute "xml" (node attribute))
 (declare-function xml-get-attribute-or-nil "xml" (node attribute))
+(declare-function xml-substitute-special "xml" (string))
 (defvar xml-entity-alist)

 (defgroup org-feed  nil
@@ -269,17 +270,6 @@
 (defvar org-feed-buffer "*Org feed*"
   "The buffer used to retrieve a feed.")

-(defun org-feed-unescape (s)
-  "Unescape protected entities in S."
-  (require 'xml)
-  (let ((re (concat "&\\("
-   (mapconcat 'car xml-entity-alist "\\|")
-   "\\);")))
-(while (string-match re s)
-  (setq s (replace-match
-  (cdr (assoc (match-string 1 s) xml-entity-alist)) nil nil s)))
-s))
-
 ;;;###autoload
 (defun org-feed-update-all ()
   "Get inbox items from all feeds in `org-feed-alist'."
@@ -613,6 +603,7 @@

 (defun org-feed-parse-rss-entry (entry)
   "Parse the `:item-full-text' field for xml tags and create new properties."
+  (require 'xml)
   (with-temp-buffer
 (insert (plist-get entry :item-full-text))
 (goto-char (point-min))
@@ -620,7 +611,7 @@
  nil t)
   (setq entry (plist-put entry
 (intern (concat ":" (match-string 1)))
-(org-feed-unescape (match-string 2)
+(xml-substitute-special (match-string 2)
 (goto-char (point-min))
 (unless (re-search-forward "isPermaLink[ \t]*=[ \t]*\"false\"" nil t)
   (setq entry (plist-put entry :guid-permalink t
@@ -633,7 +624,6 @@

 The `:item-full-text' property actually contains the sexp
 formatted as a string, not the original XML data."
-  (require 'xml)
   (with-current-buffer buffer
 (widen)
 (let ((feed (car (xml-parse-region (point-min) (point-max)
@@ -654,7 +644,7 @@
'href)))
 ;; Add  as :title.
 (setq entry (plist-put entry :title
-  (org-feed-unescape
+  (xml-substitute-special
(car (xml-node-children
  (car (xml-get-children xml 'title)))
 (let* ((content (car (xml-get-children xml 'content)))
@@ -664,12 +654,12 @@
 ((string= type "text")
  ;; We like plain text.
  (setq entry (plist-put entry :description
-(org-feed-unescape
+(xml-substitute-special
  (car (xml-node-children content))
 ((string= type "html")
  ;; TODO: convert HTML to Org markup.
  (setq entry (plist-put entry :description
-(org-feed-unescape
+(xml-substitute-special
  (car (xml-node-children content))
 ((string= type "x

[Orgmode] Re: org-feed XML entities and character encoding

2010-08-13 Thread Michael Brand

Hi David

On 10-08-13 17:59 , David Maus wrote:

2. request for help about an issue with multibyte character encoding


There is an issue with multibyte characters that appear in the input
as unescaped, multibyte encoded characters (not as XML entities, as XML
entities multibyte characters are simply substituted correctly). I
looked for an example with a character encoding specified in the first
line of the XML feed like

and found one here:
http://www.openscreencast.de/blog/rss.xml
[...]


The problem with this feed is, that it contains raw unicode characters
that must be converted to utf-8 before they can be properly inserted
in the target buffer.

Attached patch does this by explicitely decoding new entries according
to their detected character encoding.

Btw.: Helpful introduction to the topic gives

The Absolute Minimum Every Software Developer Absolutely, Positively
Must Know About Unicode and Character Sets (No Excuses!)

by Joel Spolsky

http://www.joelonsoftware.com/articles/Unicode.html


Thank you very much for your patch, it resolves this issue with
org-feed.el like expected. I tested your patch with the two feeds
http://www.openscreencast.de/blog/rss.xml  (declared utf-8)
and
http://pod.drs.ch/world_music_special_mpx.xml  (not declared utf-8)
described more by me earlier and a dozen other feeds, all with
character encoding utf-8.

Michael

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


Re: [Orgmode] how to show all subheadings of "current level +1", then all of "current level +2" etc.

2010-08-17 Thread Michael Brand
Hi Rainer

On Fri, Aug 6, 2010 at 11:56, Rainer Stengele  wrote:
> As already said, I can achieve this with " C-c "
> but this is not an easy "shift in and out" solution, I have to "count" the
> levels by myself and provide it in the command.

I think you are looking for almost exactly the depth stepping which I
have described and implemented here:
http://thread.gmane.org/gmane.emacs.orgmode/17581
Please let us know what you think about it.

My implementation shows the same level always for _all_ headings in the
file. Showing or hiding more or less levels for only the _current_
heading as I understand you would like, is too hard for me to implement
without help.

Michael

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


[Orgmode] Re: suggestion: simplify depth stepping of document structure (outline) visibility

2010-09-01 Thread Michael Brand

Hi all

This is a follow-up to
http://thread.gmane.org/gmane.emacs.orgmode/17581

On 09-10-14 14:24 , I wrote:

(global-set-key (kbd "C->") 'my-orgstruct-dive)
(global-set-key (kbd "C-<") 'my-orgstruct-dive-out)
(defvar my-orgstruct-dive-level 0)


Now I did a rewrite for some improvements, mainly to support dive in
and out of headings also in a variant that leaves the visibility of
siblings. The code is at the end.

Example 1: C-> C-> C-< C-> [...]
This changes only the visibility of of the current heading and leaves
the visibility of siblings, similar to Tab.

Example 2: C-u C-> C-> C-< C-< C-< C-> [...]
This changes the visibility of all headings, similar to S-Tab.

Michael

---
(global-set-key (kbd "C->") 'my-orgstruct-dive-in)
(global-set-key (kbd "C-<") 'my-orgstruct-dive-out)

(defun my-orgstruct-dive-in (arg)
  "This func is very similar to the func my-orgstruct-dive-out. They are
wrappers to simplify comparison with last-command in my-orgstruct-dive.

Without prefix C-u: Dive in and out the current heading (relative) and leave
the visibility of the siblings, similar to Tab. Having the point before the
first heading in a buffer does not make sense.
Example: `C-> C-> C-< C-> [...]'

With prefix C-u: Dive in and out all headings in the buffer (absolute),
similar to S-Tab. If the point is before the first heading then the behavior
is like if it is on a top level heading.
Example: `C-u C-> C-> C-< C-< C-< C-> [...]'"
  (interactive "P")
  (my-orgstruct-dive arg))

(defun my-orgstruct-dive-out (arg)
  "See the docstring of the very similar func my-orgstruct-dive-in."
  (interactive "P")
  (my-orgstruct-dive arg t))

(defvar my-orgstruct-dive-start-arg nil
  "State variable of func my-orgstruct-dive: The prefix state of the first
invoke of my-orgstruct-dive-in or my-orgstruct-dive-out, see their
docstrings.")

(defvar my-orgstruct-dive-level 1
  "State variable of func my-orgstruct-dive: The reduced level which is the
level of the heading and not necessarily the number of stars if oddeven.
The type of level is relative if my-orgstruct-dive-start-arg is nil, else
absolute. For both types of level the smallest possible value is 1.")

(defun my-orgstruct-dive (arg &optional dive-out)
  "Make visible one heading level more or less.
return value: Undefined.
arg: See the docstring about prefix C-u in func my-orgstruct-dive-in
dive-out: If nil dive in, else dive out."
  ;; determine new level
  (if (or arg  ; let any intermediate `C-u' break the invoke repetition
  (and (not (eq last-command 'my-orgstruct-dive-in))
   (not (eq last-command 'my-orgstruct-dive-out
  ;; this is the first invoke of dive
  (progn
;; move back to beginning of line with heading:
;; - to prepare the point location for possibly hitting some Tabs
;;   afterwards
;; - to skip list elements, they are not supported do dive in
;;   (this alone could also be covered within a save-excursion)
;; - for the func org-outline-level that requires beginning of line
;;   (this alone could also be covered within a save-excursion)
(unless (org-before-first-heading-p) (outline-back-to-heading))

;; reset start arg and level
(setq my-orgstruct-dive-start-arg arg)
(setq my-orgstruct-dive-level
  (if my-orgstruct-dive-start-arg
  ;; absolute level
  (if (org-before-first-heading-p)
  '1
(org-reduced-level (org-outline-level)))
;; relative level
'1)))
;; this is a repeated invoke of dive: increase/decrease level
(setq my-orgstruct-dive-level
  (+ my-orgstruct-dive-level (if dive-out '-1 '1)))
(when (< my-orgstruct-dive-level 1) (setq my-orgstruct-dive-level 1)))

  ;; update heading visibility according to new level
  (if my-orgstruct-dive-start-arg
  ;; absolute level
  (org-shifttab my-orgstruct-dive-level)  ; logs the level itself
;; relative level
(hide-subtree)
(show-children (* (org-level-increment) (1- my-orgstruct-dive-level)))
(message "Content view to relative level: %d" my-orgstruct-dive-level))

  ;; move back to beginning of line with heading to prepare
  ;; the point location for possibly hitting some Tabs afterwards
  (unless (org-before-first-heading-p) (outline-back-to-heading)))
---

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


Re: [Orgmode] how to show all subheadings of "current level +1", then all of "current level +2" etc.

2010-09-01 Thread Michael Brand
Hi Rainer

On Tue, Aug 17, 2010 at 20:32, Michael Brand  wrote:
> My implementation shows the same level always for _all_ headings in the
> file. Showing or hiding more or less levels for only the _current_
> heading as I understand you would like, is too hard for me to implement
> without help.

It was not that hard for me to eliminate this limitation, see
http://thread.gmane.org/gmane.emacs.orgmode/17581/focus=29518

Michael

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


Re: [Orgmode] Re: suggestion: simplify depth stepping of document structure (outline) visibility

2010-09-03 Thread Michael Brand

Hi all


On Thu, Sep 2, 2010 at 6:26 PM, Bastien mailto:bastien.gue...@wikimedia.fr>> wrote:
> (2) the first press at C->
> and C-< sets the "content relative view" to 1, whatever the initial
> state was.  Feels a bit unintuitive to me...


On 10-09-03 07:01 , Herbert Sitz wrote:

Yes, I agree, starting from current view depth is a bit of polish that
should be added.


And what would one expect from the absolute variant (currently with
C-u) that also resets to the depth of the heading at point?

My point of view is different: First this current behavior is clearly
intended as an alternative for the absolute `C-u 3 S-Tab' but without
the need of counting manually, just like outline-mode-`C-c C-q' (hide
everything lower than heading level _at point_). Second I prefer to
keep things simple and don't like to think about bothering what the
initial view depth of
* 1
** 1.1
*** 1.1.1
** 1.2
*** 1.2.1
should be, when viewed as
* 1
** 1.1...
** 1.2
*** 1.2.1
with point on 1. Here I prefer to hit C-> repeatedly instead of an
automatic guess that can never know if one wants to see even 1.2.1 or
not.

Michael

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


Re: [Orgmode] Re: suggestion: simplify depth stepping of document structure (outline) visibility

2010-09-03 Thread Michael Brand
Sorry, gmane.org thread broken here because of wrong reply.
follow-up for gmane.org is here:
http://thread.gmane.org/gmane.emacs.orgmode/29679

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


[O] manually move tasks in list of agenda tags-todo

2011-06-30 Thread Michael Brand
Hi all

I would like to know from those who want to or do manually order their
tasks in the custom agenda block of type "tags-todo":
- how do you manually order the tasks
- how do you later change their order
- your comments on the following description about how I currently try
  to achieve this

My custom agenda view has several blocks of type "tags-todo". Ordering
of one block is done by priorities manually added. The tasks of one
block may be spread over several agenda files and ordered there
differently. There are no two blocks with the same task. One of these
blocks may look like:
TODO [#A] foo
TODO [#B] bar
TODO [#C] bla bla
TODO [#D] ble
TODO [#E] bli
TODO [#F] blo
TODO [#G] blu
Another block might have tasks with [#A] to [#E] etc.

Later I want to move the task blo to the top within the above block:
1) move point to line foo
2) repeat 5x "S-, " to decrease the priorities by one
3) ", a" to assign priority A
4) "g" to update sort order

The resulting view is still as expected:
TODO [#A] blo
TODO [#B] foo
TODO [#C] bar
TODO [#D] bla bla
TODO [#E] ble
TODO [#F] bli
TODO [#G] blu

But this is not as comfortable to do as I would like it to be when
moving around tasks often.

The simplest way I can think of would be to use M-/M- (yet
unused in the agenda view) to change the necessary priorities and to
update the view so that after each repetition of M-/M- the
task would move up or down one line. Similar to how now
M-/M- moves an outline subtree, a list item subtree or a
table row. What do you think about that?

Note 1: This way the priorities are used only to order each agenda
block of type "tags-todo". I don't use priorities outside the agenda
view and regarding priorities agree with this post also quoting David
Allen (GTD):
http://thread.gmane.org/gmane.emacs.orgmode/4915/focus=4921

Note 2: The agenda bulk command with custom functions for increasing
and decreasing the priority is for me even less comfortable because
this needs to mark 5x and then the bulk command that has to be
directed to the function.

Michael



Re: [O] tables column width question

2011-07-09 Thread Michael Brand
Hi Jude

On Sat, Jul 9, 2011 at 15:06, Jude DaShiell  wrote:
> Is it possible in table mode to have a table expand as well as contract?
> If you make a header which has a minimal amount of spaces in it say:
> | date | time | syst | dias | pulse |
> +-

"+-" is only for table.el format AFAIK. For Org tables format you need
"|-" or "C-c -". Then you will get the expanded header:
| date | time| syst | dias | pulse |
|--+-+--+--+---|
| <2011-07-09 Sat> | 08:06AM |  139 |   89 |81 |

Is that what you are looking for?

Michael



[O] default PRIORITY

2011-07-10 Thread Michael Brand
Hi all

It seems to me that there is an inconsistency with the default
PRIORITY in searches and custom agenda blocks of types like "tags" or
"tags-todo".

Assume org-default-priority B and an agenda file
#+begin_src org
  ,* TODO [#C] low prio
  ,* TODO default prio
  ,* TODO [#A] high prio
#+end_src

When org-agenda-custom-commands contains
#+begin_src emacs-lisp
  ("x" "test"
   ((tags-todo
"PRIORITY<=\"C\"")))
#+end_src
the agenda block looks like this:
TODO [#A] high prio
TODO default prio
TODO [#C] low prio
This is like expected: The item without PRIORITY gets the default B
for sorting from org-get-priority called in org-scan-tags.

When org-agenda-custom-commands contains
#+begin_src emacs-lisp
  ("x" "test"
   ((tags-todo
"PRIORITY=\"B\"")))
#+end_src
the agenda block is empty. I expected that the item without PRIORITY
matches and is shown because I expect it to get the default B also
when matching. But this is not the case for org-cached-entry-get
called in org-scan-tags at "(eval matching)".

Even worse: The item without PRIORITY is shown with "PRIORITY<\"B\"".
During debugging it seemed to me that this is simply because the item
gets the PRIORITY " " when matching.

Now I am not sure whether I would be able to provide a patch and how
this should be solved: Only in org-scan-tags or better in
org-entry-properties and/or friends like org-entry-get,
org-cached-entry-get and maybe more?

Tested with current release_7.5-416-g27360b1 and Emacs 23.3.1

Michael



Re: [O] default PRIORITY

2011-07-23 Thread Michael Brand
Hi all

I would like to bump my previous post, although being aware that
everybody here is volunteer.

Michael

On Sun, Jul 10, 2011 at 13:12, Michael Brand  wrote:
Hi all

It seems to me that there is an inconsistency with the default
PRIORITY in searches and custom agenda blocks of types like "tags" or
"tags-todo".

Assume org-default-priority B and an agenda file
#+begin_src org
 ,* TODO [#C] low prio
 ,* TODO default prio
 ,* TODO [#A] high prio
#+end_src

When org-agenda-custom-commands contains
#+begin_src emacs-lisp
 ("x" "test"
  ((tags-todo
   "PRIORITY<=\"C\"")))
#+end_src
the agenda block looks like this:
TODO [#A] high prio
TODO default prio
TODO [#C] low prio
This is like expected: The item without PRIORITY gets the default B
for sorting from org-get-priority called in org-scan-tags.

When org-agenda-custom-commands contains
#+begin_src emacs-lisp
 ("x" "test"
  ((tags-todo
   "PRIORITY=\"B\"")))
#+end_src
the agenda block is empty. I expected that the item without PRIORITY
matches and is shown because I expect it to get the default B also
when matching. But this is not the case for org-cached-entry-get
called in org-scan-tags at "(eval matching)".

Even worse: The item without PRIORITY is shown with "PRIORITY<\"B\"".
During debugging it seemed to me that this is simply because the item
gets the PRIORITY " " when matching.

Now I am not sure whether I would be able to provide a patch and how
this should be solved: Only in org-scan-tags or better in
org-entry-properties and/or friends like org-entry-get,
org-cached-entry-get and maybe more?

Tested with current release_7.5-416-g27360b1 and Emacs 23.3.1

Michael



Re: [O] calculation question

2011-07-23 Thread Michael Brand
Hi Jude and Bart

On Tue, Jul 19, 2011 at 10:13, Bastien  wrote:
> Bart Bunting  writes:
>> I have noticed that emacspeak does not read anything done using
>> overlays.  I am presuming the column and row labels are done this way.
>
> Yes, the references are displayed as an overlay.

As an alternative to overlays used by "C-c }" on a table to display
the coordinate grid, I would suggest the attached patch that displays
the coordinates in the table editor "C-c `" like this:

#+begin_src org
#
# Edit field @2$3 and finish with C-c C-c
#
123
#+end_src

It also supports the org-table-follow-field-mode "C-u C-u C-c `" added
by Carsten two months ago:
http://orgmode.org/w/org-mode.git/commitdiff/bffdfeb7fcd6c094d44e754ace7ce28fab81f2ff

Michael


0001-Table-editor-Display-coordinates-of-current-field.patch
Description: Binary data


Re: [O] Table formula to convert hex to dec

2011-07-24 Thread Michael Brand
Hi Russell

On Sun, Jul 24, 2011 at 10:00, Russell Adams  wrote:
> Has anyone been able to convert a column of hex numbers to decimal in
> another column?

Emacs Calc has a radix syntax "2#10" to "36#10", so this works:
| 16#10 | 16 | 16#10 |
#+TBLFM: $2 = $1 :: $3 = '(format "16#%x" $2); N

It would be nice to have not only "N" for the Org table formula mode
string like now but also optionally all possible Emacs Calc radix, so
the above would be simply (does not work yet):
| 16#10 | 16 | 16#10 |
#+TBLFM: $2 = $1 :: $3 = $2; N16#

Michael



Re: [O] Table formula to convert hex to dec

2011-07-24 Thread Michael Brand
On Sun, Jul 24, 2011 at 11:52, Michael Brand  wrote:
> It would be nice to have not only "N" for the Org table formula mode
> string like now but also optionally all possible Emacs Calc radix, so
> the above would be simply (does not work yet):
> | 16#10 | 16 | 16#10 |
> #+TBLFM: $2 = $1 :: $3 = $2; N16#

Looking at Nick's solution - this is already available for "8#"/"16#"
with the Org table formula mode string "%o"/"%x":
| 16#10 | 16 | 16#10 |
#+TBLFM: $2 = $1 :: $3 = $2; 16#%x

Michael



Re: [O] default PRIORITY

2011-07-24 Thread Michael Brand
On Sun, Jul 24, 2011 at 21:17, Bastien  wrote:
> I read this post when you originally posted it -- but it requires
> some thinking...  but this issue is in my TODO list.

Thank you for taking care of and for letting me know.

Michael



Re: [O] Habits not showing in agenda and no progress graph

2011-07-26 Thread Michael Brand
Hi John

- State logging is working ok as seen from the LOGBOOK.
- A habit task is simply not shown before the SCHEDULED date. Try this
  task state to get an impression of the graph (change TODO and DONE
  keywords to reflect your setup):
  #+begin_src org
,* TODO note down month's accomplishments/contributions
,  SCHEDULED: <2011-07-25 Mon .+5d/10d>
,  :LOGBOOK:
,  - State "DONE"   from "TODO"   [2011-07-20 Wed 12:00]
,  - State "DONE"   from "TODO"   [2011-07-15 Fri 12:00]
,  :END:
,  :PROPERTIES:
,  :STYLE:habit
,  :LAST_REPEAT: [2011-07-20 Wed 12:00]
,  :END:
  #+end_src
- Side note: It seems that like when experimenting you have set the
  task twice to DONE at the same time which is not useful but does not
  hurt to get started with habits.

On Tue, Jul 26, 2011 at 23:22, John Hendy  wrote:
> I'm attempting to implement habits for a couple of routine things I
> should do at work on a regular basis. I've been following the manual
> to set this up:
>
> ,-
> | 1. You have enabled the habits module by customizing the variable
> org-modules. CHECK
> | 2. The habit is a TODO item, with a TODO keyword representing an
> open state. CHECK
> | 3. The property STYLE is set to the value habit. CHECK
> | 4. The TODO has a scheduled date, usually with a .+ style repeat
> interval... CHECK
> | 5. The TODO may also have minimum and maximum ranges specified by
> using the syntax ‘.+2d/3d’... CHECK
> | 6. You must also have state logging for the DONE state enabled... THINK SO
> `-
>
> I have mid-year and yearly reviews and *always* kick myself for not
> recording things I've done regularly, such that I end up scouring the
> earth for details about what I did in emails, calendar items, and org
> files. I'd like to do this monthly to save me 2x/year headaches. So...
> enter my first attempt at implementing habits:
>
> -
> ** todo note down month's accomplishments/contributions
>    SCHEDULED: <2011-08-20 Sat .+25d/35d>
>   :LOGBOOK:
>   - State "done"       from "todo"       [2011-07-26 Tue 16:02]
>   - State "done"       from "todo"       [2011-07-26 Tue 16:02]
>   :END:
>   :PROPERTIES:
>   :STYLE:    habit
>   :LAST_REPEAT: [2011-07-26 Tue 16:02]
>   :END:
> -
>
> Note that above for #6, I said I thought so. I'm saying that as the
> todo -> done state appears to be tracked above in my cycling.
> Typically, I just get a completed inactive time stamp and it gets
> marked done. The fact that it stays open I'm guessing means the habit
> is working.
>
> But... I have a couple of questions:
>
> #1: the habits aren't showing up in agenda. I did =C-c a a=, then =v
> y= and accepted that I really wanted to see the year. I get no monthly
> views of the above habit, despite seeing the minibuffer mode as
> "Org-agenda Year Dds Grid Habit" If I press =K=, it tells me that
> habits have been turned off, so I know they were on.
>
> #2: I just don't understand this at all (from the manual):
>
> ,-
> | What's really useful about habits is that they are displayed along
> with a consistency graph,
> | to show how consistent you've been at getting that task done in the
> past. This graph shows
> | every day that the task was done over the past three weeks, with
> colors for each day.
> |
> | Followed by overview of what the colors mean...
> `-
>
> Where is this graph? I don't see any colors. The worg tutorial doesn't
> mention the word graph anywhere, and only shows making a table
> manually to document progress. It also doesn't mention the word color.
>
> Thanks for any suggestions. It's my first time, so it's probably that
> I've missed something silly in my setup or have a typo.
>
>
> Thanks!
> John



Re: [O] Habits not showing in agenda and no progress graph

2011-07-27 Thread Michael Brand
Hi John

On Wed, Jul 27, 2011 at 08:16, John Hendy  wrote:
> I was playing around a bit tonight and
> noticed that if I changed the scheduled date, I got a little
> multi-colored bar looking thing in agenda week view. Is that the
> "graph"?

yes, see also the PNG link in the first post of John Wiegley, the
author of org-habit.el, in this thread
http://thread.gmane.org/gmane.emacs.orgmode/43492

>>  #+begin_src org
>>    ,* TODO note down month's accomplishments/contributions
>>    ,  SCHEDULED: <2011-07-25 Mon .+5d/10d>
>>    ,  :LOGBOOK:
>>    ,  - State "DONE"       from "TODO"       [2011-07-20 Wed 12:00]
>>    ,  - State "DONE"       from "TODO"       [2011-07-15 Fri 12:00]
>>    ,  :END:
>>    ,  :PROPERTIES:
>>    ,  :STYLE:    habit
>>    ,  :LAST_REPEAT: [2011-07-20 Wed 12:00]
>>    ,  :END:
>>  #+end_src
>
> So... is the "graph" the above? Simply a documented history of habits?

no

> Or is it something else (perhaps the colored thing in agenda view)?

yes, the the colored thing in agenda view

> Lastly, if that graph *is* the colored bar in agenda, I notice that
> it's cutting off most of my text. For example, this updated bit:
> [...]
> The space between "acc" and the "!" is filled with blue, then green,
> then a yellow, and then a red square(s). Can one change this
> appearance and how early the graph starts?

I would look in "C-h org-habit TAB" done in an agenda view and maybe
also org-habit.el. (I did not change habit the config yet but
someday/maybe I would like to add somehow in org-habit.el a sort order
within habits of alternatively "remaining days"; now it's "some ratio
of last and remaining days".)

> If that's the "graph," then I guess I just didn't understand how the
> display in agenda worked and was mistaken in expecting future events
> to show up as I scrolled through the year's view. I think that's fine.
> Just wanted to make sure I wasn't messing something up.
>
> The manual still gives the impression that the "graph" will show the
> history of my habits, whereas this thing in agenda is only showing
> whether I'm ahead, on schedule, or late for this *current* habit.

maybe "C-h org-habit-show-habits-only-for-today" works for you?

> Thanks for any input

http://thread.gmane.org/gmane.emacs.orgmode/35628
http://orgmode.org/worg/org-tutorials/tracking-habits.html

Michael



[O] column view sum scope

2011-07-28 Thread Michael Brand
Hi all, hi Carsten

I have an issue with the column view sum scope that can be shown best
with a minimal word count example:

#+begin_src org
  ,#+COLUMNS: %14ITEM %18word_count(sum of word counts){+}
  ,- dynamic block for column view:
  ,  #+BEGIN: columnview
  ,  #+END:
  ,* article
  ,** section
  ,   :PROPERTIES:
  ,   :word_count: 2
  ,   :END:
  ,   First_word, second_word.
  ,*** subsection
  ,:PROPERTIES:
  ,:word_count: 1
  ,:END:
  ,Third_word.
#+end_src

After "C-c C-c" on "#+BEGIN:" I would like both ":word_count:" to be
left unchanged, leading to a section sum and article sum of 3:

#+begin_src org
  ,#+COLUMNS: %14ITEM %18word_count(sum of word counts){+}
  ,- dynamic block for column view:
  ,  #+BEGIN: columnview
  ,  | ITEM   | sum of word counts |
  ,  |+|
  ,  | * article  |  3 |
  ,  | ** section |  3 |
  ,  | *** subsection |  1 |
  ,  #+END:
  ,* article
  ,** section
  ,   :PROPERTIES:
  ,   :word_count: 2
  ,   :END:
  ,   First_word, second_word.
  ,*** subsection
  ,:PROPERTIES:
  ,:word_count: 1
  ,:END:
  ,Third_word.
#+end_src

but what one gets is the first ":word_count:" interpreted as only the
total of all _subsections_, leading to a section sum and article sum
of 1:

#+begin_src org
  ,#+COLUMNS: %14ITEM %18word_count(sum of word counts){+}
  ,- dynamic block for column view:
  ,  #+BEGIN: columnview
  ,  | ITEM   | sum of word counts |
  ,  |+|
  ,  | * article  |  1 |
  ,  | ** section |  1 |
  ,  | *** subsection |  1 |
  ,  #+END:
  ,* article
  ,** section
  ,   :PROPERTIES:
  ,   :word_count: 1
  ,   :END:
  ,   First_word, second_word.
  ,*** subsection
  ,:PROPERTIES:
  ,:word_count: 1
  ,:END:
  ,Third_word.
#+end_src

As I understand, org-wc.el from the word count thread
http://thread.gmane.org/gmane.emacs.orgmode/41146/focus=42663
suffers from the same problem.

The terms curval, curtotal and prevtotal found here
http://thread.gmane.org/gmane.emacs.orgmode/12067
look like what one needs here. But I couldn't find neither these terms
in any org/lisp/*.el nor any related commit around the time of the
post above. Carsten, do you remember this?

Now I would be glad to hear any thoughts and hints.

Michael



[O] column view summary format

2011-07-28 Thread Michael Brand
Hi all

I have an issue with the column summary format in this minimal
example:

#+begin_src org
  ,#+COLUMNS: %15ITEM %amount(amt){+; %5.1f}
  ,* section
  ,** subsection 1
  ,   :PROPERTIES:
  ,   :amount:   7.12
  ,   :END:
  ,** subsection 2
  ,   :PROPERTIES:
  ,   :amount:   98.34
  ,   :END:
#+end_src

For the column view I would like to get an overlay looking like:

#+begin_src org
  ,ITEM| amt   |
  ,* section   | 105.5 |
  ,** subsection 1 |   7.1 |
  ,** subsection 2 |  98.3 |
#+end_src

but what happens is:

#+begin_src org
  ,ITEM| amt|
  ,* section   |  105.5 |
  ,** subsection 1 | 7.12   |
  ,** subsection 2 | 98.34  |
#+end_src

Is this a bug or how can I get each number formatted and aligned?

Michael



[O] git diff: hunk header config

2011-07-31 Thread Michael Brand
Hi all

I suggest to change the config of git diff in the org-mode.git repo to
the more helpful hunk header (the @@...@@ line) style:

#+begin_src diff
@@ -12991,7 +12991,7 @@ (defun org-align-tags-here (to-col)
  (goto-char (match-beginning 1))
  (insert " ")
  (delete-region (point) (1+ (match-beginning 2)))
- (setq ncol (max (1+ (current-column))
+ (setq ncol (max (current-column)
  (1+ col)
  (if (> to-col 0)
  to-col
#+end_src

which is similar to GNU diff -p/--show-c-function. The current, not
configured default "style" is:

#+begin_src diff
@@ -12991,7 +12991,7 @@ If ONOFF is `on' or `off', don't toggle but set to thi
  (goto-char (match-beginning 1))
  (insert " ")
  (delete-region (point) (1+ (match-beginning 2)))
- (setq ncol (max (1+ (current-column))
+ (setq ncol (max (current-column)
  (1+ col)
  (if (> to-col 0)
  to-col
#+end_src

Would that be commonly welcome for at least firstly Emacs Lisp and texinfo?

If yes, the following is to be added to the org-mode.git repo:

1) new file .gitattributes:
#+begin_src
*.eldiff=el
*.texi  diff=texinfo
#+end_src

2) append to .git/config:
#+begin_src
[diff "el"]
xfuncname = "^(\\(def[a-z]+ .+)$"
[diff "texinfo"]
xfuncname="^(@(sub)*section.*)$"
#+end_src

I hope that somebody can do this in the repo in such a way that it
will be effective after git pull and git clone automatically, so that
nobody has to care about later.

Michael



[O] [PATCH] Agenda: Simplify old fix of face for deadline warning 0 day

2011-08-01 Thread Michael Brand
Agenda: Simplify old fix of face for deadline warning 0 day

* lisp/org-agenda.el (org-agenda-get-deadlines): Fix dfrac for the
case of wdays being 0.  Don't pass wdays to org-agenda-deadline-face,
like before the old fix.
(org-agenda-deadline-face): Revert to old state that was without
wdays.

This allows a deadline warning period of "-0d" to work also with a
custom configuration like:
(setq org-agenda-deadline-faces
  '((1.0001 . org-warning)  ; due yesterday or before
(0.0. org-upcoming-deadline)))  ; due today or later
For org-agenda-deadline-faces left at default and all other settings
not exceeding 1.0, the face for a deadline warning of any length
remains untouched by this patch.

references to history:
* commit of the old fix
  - http://orgmode.org/w/?p=org-mode.git;a=commitdiff;h=d0d6325
  - git show d0d6325
* mailing list old thread
  - http://thread.gmane.org/gmane.emacs.orgmode/5753
  - http://lists.gnu.org/archive/html/emacs-orgmode/2008-02/msg00395.html


0001-Agenda-Simplify-old-fix-of-face-for-deadline-warning.patch
Description: Binary data


Re: [O] [bug] removing last column with a column formula

2011-08-09 Thread Michael Brand
Hi Nicolas

Columns and rows are better referenced with "<" and ">" in many cases
to avoid such oddities:

#+begin_src org
| 1 | 2 | 3 |
| 1 | 2 | 3 |
#+TBLFM: @2$<..@2$>=@1
#+end_src

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

Michael

On Tue, Aug 9, 2011 at 14:50, Nicolas Goaziou  wrote:
> Hello,
>
> Let's consider the following table:
>
> #+begin_src org
> | 1 | 2 | 3 |
> | 1 | 2 | 3 |
> #+TBLFM: @2$1..@2$3=@1
> #+end_src
>
> If I remove the second column (M-S-Left), the formula is correctly
> updated. But when I remove the last column, the formula gets partly
> deleted and becomes:
>
>                            #+TBLFM: @2$1..
>
> Also, if this times, the first column is removed, that line becomes:
>
>                      #+TBLFM: @2$INVALID..@2$2=@1
>
> This is with latest Org and no user configuration.



Re: [O] Wishlist: allow range of table elements to be filled by sbe

2011-08-19 Thread Michael Brand
Hi András

I am not sure if you really need the data between the sh output and
the sbe input as a table. If not, this can be used:

#+source: shcode(x = 0)
#+begin_src sh
  echo "$x"
#+end_src

| 1 | 2 | 3 |
#+TBLFM: @1$1..@1$3 = '(sbe "shcode" (x "$#"))

Michael

2011/8/19 András Major :
> Hi,
>
> I'd like to use a babel code block to fill a table with values.  The
> sbe elisp function looks like the right thing for this task, but it
> appears that the result of the code block always goes into a single
> cell of a table.  I can specify ranges of values, but then the entire
> output is placed into each of the specified cells.
>
> Here is how I imagine things should work:
>
> #+srcname: shcode
> #+begin_src sh :exports output table silent
>  echo "1 2 3"
> #+end_src
>
> | 1 | 2 | 3 |
> #+TBLFM: $1..$3='(sbe shcode)
>
> Note that this is *NOT* real output from the code block in the current
> version of org-mode, it's what I want it to be.  There are two things
> that cause this to break at the moment:
>
> - The range $1..$3 doesn't work, I have to prepend a row specifier as
>  in @<$1..@>$3 or suchlike, which is rather counterintuitive but
>  seems to work.
>
> - The output "1 2 3" are not separated into the various cells but all
>  placed into each cell.
>
> Or am I doing something wrong here?



Re: [O] git diff: hunk header config

2011-08-20 Thread Michael Brand
Hi all

1) Since there has been no feedback yet I'd like to bump my previous
post repeated below. I would like to have the config of the repo
orgmode.org/org-mode.git to be extended to support more useful diff
hunk headers containing e. g. the prototype of the current function
for *.el files. Like
"@@ -12991,7 +12991,7 @@ (defun org-align-tags-here (to-col)"
instead of the current
"@@ -12991,7 +12991,7 @@ If ONOFF is `on' or `off', don't toggle but set to thi"
Can this be done in the repo orgmode.org/org-mode.git at all?
Effective for everyone after only git pull?

2) Note: Also a config of git, but for diff of crypted Org files is
shown at the end of this recent post:
http://thread.gmane.org/gmane.emacs.orgmode/45781/focus=45938

Michael

On Sun, Jul 31, 2011 at 13:49, Michael Brand  wrote:
> Hi all
>
> I suggest to change the config of git diff in the org-mode.git repo to
> the more helpful hunk header (the @@...@@ line) style:
>
> #+begin_src diff
> @@ -12991,7 +12991,7 @@ (defun org-align-tags-here (to-col)
>          (goto-char (match-beginning 1))
>          (insert " ")
>          (delete-region (point) (1+ (match-beginning 2)))
> -         (setq ncol (max (1+ (current-column))
> +         (setq ncol (max (current-column)
>                          (1+ col)
>                          (if (> to-col 0)
>                              to-col
> #+end_src
>
> which is similar to GNU diff -p/--show-c-function. The current, not
> configured default "style" is:
>
> #+begin_src diff
> @@ -12991,7 +12991,7 @@ If ONOFF is `on' or `off', don't toggle but set to thi
>          (goto-char (match-beginning 1))
>          (insert " ")
>          (delete-region (point) (1+ (match-beginning 2)))
> -         (setq ncol (max (1+ (current-column))
> +         (setq ncol (max (current-column)
>                          (1+ col)
>                          (if (> to-col 0)
>                              to-col
> #+end_src
>
> Would that be commonly welcome for at least firstly Emacs Lisp and texinfo?
>
> If yes, the following is to be added to the org-mode.git repo:
>
> 1) new file .gitattributes:
> #+begin_src
> *.el    diff=el
> *.texi  diff=texinfo
> #+end_src
>
> 2) append to .git/config:
> #+begin_src
> [diff "el"]
>        xfuncname = "^(\\(def[a-z]+ .+)$"
> [diff "texinfo"]
>        xfuncname="^(@(sub)*section.*)$"
> #+end_src
>
> I hope that somebody can do this in the repo in such a way that it
> will be effective after git pull and git clone automatically, so that
> nobody has to care about later.
>
> Michael



Re: [O] Bug: babel: results switch (output vs. value) has no or wrong effect for sh source block [7.7 (release_7.7.107.g7a82)]

2011-08-22 Thread Michael Brand
Hi Eric

2011/8/20 Eric Schulte :
> [...] I would lean towards thinking
> that passing along error messages is more important than returning error
> codes, but if the community thinks differently I'm happy to change the
> ob-sh behavior.

A non-zero exit status and stderr of a process are not necessarily
related. Because a process may also use
- a non-zero exit status without error situation (e. g. grep, diff)
- stderr for output not related with errors
- stdout for error messages
I would like very much to be able to collect all available feedback
from a process at the same run. Even with an optional indication of
the origin, for ambiguity like the "hello" below or just for clarification.

> Unfortunately it seems that in either case the sh code blocks will need
> to be different than other languages either in its handling of errors or
> of return values.  This is unavoidable due to the overloading of return
> values in the shell as error indicators.

If the shell is a special case for babel anyway, why not something
like the following?

#+begin_src sh :exports stdout stderr exit_status -v
  echo hello
  echo hello >&2
  false
#+end_src

#+results:
: 2: hello
: 1: hello
: exit status: 1

This would have been
- with an option -v for verbosity to prefix
  stdout with "1: ", stderr with "2: " and the exit status
- with the exit status of the last command without the need of an
  extra "echo $?".

My habit as a background info: To learn more from the shell I use
- a shell prompt with the exit status of the last command
- when I sometimes want to visually divide stdout and stderr (bash):
  { { echo hello; echo hello >&2; } 3>&1 1>&2 2>&3 | sed 's/^/2: /'; } \
  3>&1 1>&2 2>&3 | sed 's/^/1: /'; 3>&-
  to output:
  2: hello
  1: hello

Michael



Re: [O] git diff: hunk header config

2011-08-24 Thread Michael Brand
On Sat, Aug 20, 2011 at 23:47, suvayu ali  wrote:
> On Sat, Aug 20, 2011 at 6:12 PM, Michael Brand
>> [...]
>> "@@ -12991,7 +12991,7 @@ (defun org-align-tags-here (to-col)"
>> instead of the current
>> "@@ -12991,7 +12991,7 @@ If ONOFF is `on' or `off', don't toggle but set to 
>> thi"
>
> [...]
> To make this a server side setting, you would have to add .git/config
> and .gitattributes to the repo. But I think that is not correct as
> many users might have their own settings that will have to be remerged
> at every update.

According to the git manual there is a cleaner way for local changes:
- gitattributes(5) Manual Page:
  - "Attributes which should be version-controlled and distributed to
other repositories (i.e., attributes of interest to all users)
should go into .gitattributes files."
  - "If you wish to affect only a single repository (i.e., to assign
attributes to files that are particular to one user’s workflow for
that repository), then attributes should be placed in the
$GIT_DIR/info/attributes file."
- git-config(1) Manual Page:
  - "$GIT_DIR/config: Repository specific configuration file." and
"The .git/config file in each repository is used to store the
configuration for that repository"
  - "~/.gitconfig: User-specific configuration file." and
"$HOME/.gitconfig is used to store a per-user configuration as
fallback values for the .git/config file."

For .gitattributes it seems to be ok to make it a versioned git repo
element. Proposal for the content (changed from first post):
#+begin_src
# This file is intended to be effective for all users of this repository.
# Use ".git/info/attributes" for changes specific to the local user(s).

*.eldiff=el
*.texi  diff=texinfo
#+end_src

For .git/config I am not sure if it can be made a versioned git repo
element. If not, I don't know how it can become part of the transfer
during git pull which it should be in any case. Proposal for the
content (changed from first post):
#+begin_src
# This file is intended to be effective for all users of this repository.
# Use "$HOME/.gitconfig" for changes specific to one user.

[core]
repositoryformatversion = 0
filemode = true
bare = false
logallrefupdates = true
[remote "origin"]
fetch = +refs/heads/*:refs/remotes/origin/*
url = git://orgmode.org/org-mode.git
[branch "master"]
remote = origin
merge = refs/heads/master
[diff "el"]
xfuncname = "^(\\(def[a-z]+ .+)$"
[diff "texinfo"]
xfuncname = "^(@(sub)*section.*)$"
#+end_src

> What do you think? In any case, I think this would be a wonderful
> addition to org-faq.org on Worg.

What I would like is that the hunk headers of all future patches from
all contributers look like proposed. Without requiring them to change
their config now and with every new git clone. For me it is not enough
if only a few contributers that stumble upon this FAQ entry and then
even care about, change their config.

Michael



Re: [O] Bug: named columns in tables not working if name contains "_"

2011-08-24 Thread Michael Brand
On Tue, Aug 23, 2011 at 20:29, Carsten Dominik
 wrote:
> I have checked, underscore is aceptable, calc allows it in variables names.
> However, I would not recommend adding any more characters to this regexp.

Just to mention: Although "_" is the subscript operator that takes the
nth vector element in Calc, I don't mind the change since the formula
below that uses "$vector_1" did also not work before the change
probably because some other regexp to parse the field name already
included "_". And the alternative formula with "subscr($vector, 1)"
seems to be syntactically more robust/flexible/clear/etc. anyway.

|   | [x y]  | x | x | #ERROR | x |
| ^ | vector |   |   ||   |
#+TBLFM: @<$3 = $2_1 :: @<$4 = subscr($2, 1) :: @<$5 = $vector_1 ::
@<$6 = subscr($vector, 1)

Michael



Re: [O] Bug: named columns in tables not working if name contains "_"

2011-08-24 Thread Michael Brand
On Tue, Aug 23, 2011 at 18:24, Achim Gratz  wrote:
> Nick Dokos  writes:
>> The only characters permitted are alphanumerics. That can probably be
>> easily relaxed.
>
> Only if you don't want to have _underlined_ still working [...]

I use _underlined_ in tables and I'm glad it still works.

Michael



[O] agenda: "void: category-pos"

2011-08-24 Thread Michael Brand
Hi all

Since
http://orgmode.org/w/?p=org-mode.git;a=commitdiff;h=15798836e2bb84bebfb005375e08e38830fc90ee
from yesterday or with the newest release_7.7-194-gd203b61 when I try
to open the agenda with a minimal setup I get "save-excursion:
Symbol's value as variable is void: category-pos". Anybody else too?

Michael



Re: [O] agenda: "void: category-pos"

2011-08-25 Thread Michael Brand
Hi Bastien

On Thu, Aug 25, 2011 at 15:20, Bastien  wrote:
> Michael Brand  writes:
>> Since
>> http://orgmode.org/w/?p=org-mode.git;a=commitdiff;h=15798836e2bb84bebfb005375e08e38830fc90ee
>> from yesterday or with the newest release_7.7-194-gd203b61 when I try
>> to open the agenda with a minimal setup I get "save-excursion:
>> Symbol's value as variable is void: category-pos". Anybody else too?
>
> This should be fixed -- please confirm.

Confirmed, thanks.

Michael



Re: [O] [bug] Inconsistent tag alignment in org-indent-mode

2011-08-25 Thread Michael Brand
Hi Jason

This reminds me of a similar problem with tag alignment that I solved
with a patch that did not get any feedback yet. Can you try if this
patch solves your problem too?
http://thread.gmane.org/gmane.emacs.orgmode/42564

Michael

On Thu, Aug 25, 2011 at 18:15, Jason Dunsmore
 wrote:
> I noticed the tag alignment produces inconsistent results in
> org-indent-mode.  If you type in the header, the normal
> (non-indent-mode) indentation is used, and the tags do not appear
> aligned.  If you add tags or type "C-c C-c" the tags are aligned
> correctly.
>
> Here's an example file:
>
> --8<---cut here---start->8---
> * Heading                                                                :tag:
> ** Subheading                                                           :tag:
> --8<---cut here---end--->8---
>
> Here's what happens before and after typing in the heading:
> http://imgur.com/a/Ljpw2
>
> I'm using:
> Org-mode version 7.7 (release_7.7.201.gcd8d)
> GNU Emacs 23.2.1
>
> Great work on org-ident-mode by the way!  I've noticed a bunch of recent
> improvements.



Re: [O] git diff: hunk header config

2011-08-27 Thread Michael Brand
Hi Achim, Jason and Matt

On Wed, Aug 24, 2011 at 21:37, Achim Gratz  wrote:
> Michael Brand  writes:
>> For .git/config I am not sure if it can be made a versioned git repo
>> element. If not, I don't know how it can become part of the transfer
>> during git pull which it should be in any case. Proposal for the
>> content (changed from first post):
>
> You can't and I don't think that is an oversight.  As a general
> principle such configurations should not be part of the repository at
> all.  Please note that if you do configure it that way locally, all
> tools in git will show all diffs in the new format, so there is nothing
> lost if everybody doesn't have the same configuration.

Thanks for the clarification. Because I didn't expect this at all it
took me some time to understand that a local config affects also the
diffs already committed, not only "git diff" of uncommitted changes.
Neat.

But aren't there still things lost when one does this only locally?
1) The web browser view of the git repos
   http://orgmode.org/w/org-mode.git, its delayed mirror
   http://repo.or.cz/w/org-mode.git and http://repo.or.cz/w/Worg.git
   (for code/elisp/): Can be solved by configuring these three
   repos locally.
2) When reading patches submitted to the mailing list: Here I don't
   know the solution. In my simple trial, .gitattributes was not
   available in its clone done afterwards.

@Jason and Matt: At least, changing 1) alone would already help. What
do you think?

Michael



  1   2   3   4   5   6   7   8   >