Re: [O] BUG in columns view since 0f93638ce (Jun 2 2015)

2015-08-12 Thread Johan Sandblom

2015-08-12 01:08 skrev Nicolas Goaziou:

Johan Sandblom j...@ndblom.se writes:


Thank you for your quick reaction. Unfortunately it is still not
perfect. Starting column mode with point on the headline ** bla
makes the column view end before headline ** bli. Am I right that
this is unintended?


This is intended. According to the manual[fn:1]

 If the cursor is somewhere inside the outline, this command
 searches the hierarchy, up from point, for a ‘:COLUMNS:’ 
property
 that defines a format. When one is found, the column view table 
is

 established for the tree starting at the entry that contains the
 ‘:COLUMNS:’ property.

Regards,

[fn:1] (info (org) Using column view), first command.


I read that passage differently. The second-level headline ** bli is in 
the tree that starts at the first-level headline * sum. The manual does 
not state that the column view table is established for the part of the 
tree that is between the entry that contains the ´:COLUMNS:´ property 
and point. Since it does not mention partial trees at all I assumed the 
entire tree starting at the entry was intended.


Johan

--
Johan Sandblom, MD PhD
m +46735521477
What is wanted is not the will to believe, but the
will to find out, which is the exact opposite
--Bertrand Russell



[O] BUG in columns view since 0f93638ce (Jun 2 2015)

2015-08-11 Thread Johan Sandblom
Consider the attached orgmode file fragment, also included below. Prior 
to commit 0f93638ce sums were produced in the top row. After that 
commit, column view sums fail. Poor knowledge of git and elisp prevent 
me from finding the actual problem, but I did manage to find the first 
commit were it fails, and this hopefully helps


* sum
  :PROPERTIES:
  :COLUMNS:  %30ITEM %5A{+} %5B{+}
  :END:
** bla
*** blabla
:PROPERTIES:
:A:1
:END:
** bli
   :PROPERTIES:
   :A:1
   :END:


--
Johan Sandblom, MD PhD
m +46735521477
What is wanted is not the will to believe, but the
will to find out, which is the exact opposite
--Bertrand Russell* sum
  :PROPERTIES:
  :COLUMNS:  %30ITEM %5A{+} %5B{+}
  :END:
** bla
*** blabla
:PROPERTIES:
:A:1
:END:
** bli
   :PROPERTIES:
   :A:1
   :END:


Re: [O] BUG in columns view since 0f93638ce (Jun 2 2015)

2015-08-11 Thread Johan Sandblom

2015-08-11 19:13 skrev Nicolas Goaziou:

Hello,

Johan Sandblom j...@ndblom.se writes:


Consider the attached orgmode file fragment, also included below.
Prior to commit 0f93638ce sums were produced in the top row. After
that commit, column view sums fail. Poor knowledge of git and elisp
prevent me from finding the actual problem, but I did manage to find
the first commit were it fails, and this hopefully helps

* sum
  :PROPERTIES:
  :COLUMNS:  %30ITEM %5A{+} %5B{+}
  :END:
** bla
*** blabla
:PROPERTIES:
:A:1
:END:
** bli
   :PROPERTIES:
   :A:1
   :END:


This is fixed. Thank you.



Thank you for your quick reaction. Unfortunately it is still not 
perfect. Starting column mode with point on the headline ** bla makes 
the column view end before headline ** bli. Am I right that this is 
unintended?


Johan

--
Johan Sandblom, MD PhD
m +46735521477
What is wanted is not the will to believe, but the
will to find out, which is the exact opposite
--Bertrand Russell



Re: [O] org-version N/A when using git subtree

2015-07-24 Thread Johan Sandblom

Excellent idea. I'll try that when I meddle with it next. Thank you.

Johan

2015-07-22 03:00 skrev Grant Rettke:

Generate autoloads with out make?

http://orgmode.org/worg/org-hacks.html
Grant Rettke
--
g...@wisdomandwonder.com | http://www.wisdomandwonder.com/
“Wisdom begins in wonder.” --Socrates
“All creativity is an extended form of a joke.” --Kay
((λ (x) (x x)) (λ (x) (x x)))
“Life has become immeasurably better since I have been forced to stop
taking it seriously.” --Thompson


On Mon, Jun 22, 2015 at 11:15 AM, Johan Sandblom j...@ndblom.se 
wrote:
This is off topic, or at least the first paragraph is, but I don't 
know

where else to ask ...

I maintain a private git repo where the org-mode git repo is 
included. I use
it on several machines, both windows and linux, and also on a stick 
which I
can use on the terribly restricted and firewalled computers at work 
(which
curiously allow me to run emacs from the stick!). I used to include 
org-mode

as a fake submodule

(http://debuggable.com/posts/git-fake-submodules:4b563ee4-f3cc-4061-967e-0e48cbdd56cb)
but wanted to learn more about git so I changed to a real submodule. 
This
was annoying because then I could no longer just pull from the repo 
to the
stick and have my new org-mode with me, I needed to update the 
submodule on
the stick as well, which was more work than before. I then changed 
to using
a git subtree for org-mode and lots of other bits and pieces that I 
wanted
handy, even behind the firewall at work. This works great except for 
one

thing:

org-version is set to N/A (on topic again I hope). As far as I have 
been
able to gather with my non-existent developer skills the org-version 
stems
from mk/default.mk and so could be adjusted in local.mk, but I am 
unable to

figure out where I should get it from, and how to adjust it. Can you
enlighten me?

Johan

--
Johan Sandblom, MD PhD
m +46735521477
What is wanted is not the will to believe, but the
will to find out, which is the exact opposite
--Bertrand Russell



--
Johan Sandblom, MD PhD
m +46735521477
What is wanted is not the will to believe, but the
will to find out, which is the exact opposite
--Bertrand Russell



[O] org-version N/A when using git subtree

2015-06-22 Thread Johan Sandblom
This is off topic, or at least the first paragraph is, but I don't know 
where else to ask ...


I maintain a private git repo where the org-mode git repo is included. 
I use it on several machines, both windows and linux, and also on a 
stick which I can use on the terribly restricted and firewalled 
computers at work (which curiously allow me to run emacs from the 
stick!). I used to include org-mode as a fake submodule 
(http://debuggable.com/posts/git-fake-submodules:4b563ee4-f3cc-4061-967e-0e48cbdd56cb) 
but wanted to learn more about git so I changed to a real submodule. 
This was annoying because then I could no longer just pull from the repo 
to the stick and have my new org-mode with me, I needed to update the 
submodule on the stick as well, which was more work than before. I then 
changed to using a git subtree for org-mode and lots of other bits and 
pieces that I wanted handy, even behind the firewall at work. This works 
great except for one thing:


org-version is set to N/A (on topic again I hope). As far as I have 
been able to gather with my non-existent developer skills the 
org-version stems from mk/default.mk and so could be adjusted in 
local.mk, but I am unable to figure out where I should get it from, and 
how to adjust it. Can you enlighten me?


Johan

--
Johan Sandblom, MD PhD
m +46735521477
What is wanted is not the will to believe, but the
will to find out, which is the exact opposite
--Bertrand Russell



[O] sequence of tangles

2013-04-14 Thread Johan Sandblom
Hi, all. I have a problem, most likely due to ignorance. For a project 
I am construction a web page as a single page. This page contains html, 
php, css and javascript. I have collected the project in an org file, 
with source code chunks in the various languages. So I have


#+BEGIN_SRC nxml :tangle file.php
!!DOCTYPE html
!-- header and stuff --
#+END_SRC

#+BEGIN_SRC css :tangle file.php
/* inline CSS */
#+END_SRC

#+BEGIN_SRC javascript :tangle file.php
// javascript
#+END_SRC

#+BEGIN_SRC nxml :tangle file.php
!-- more html --
#+END_SRC

#+BEGIN_SRC php :tangle file.php
#+END_SRC

#+BEGIN_SRC nxml :tangle file.php
!-- even more html --
#+END_SRC

However, tangling this apparently first sorts the chunks according to 
mode, so the resulting file first contains all the html, then the css, 
javascript and php in order


html
more html
even more html
css
js
php

resulting in an unusable file. I am sure I am overlooking something 
simple but I am unable to find it.


Johan

--
Johan Sandblom, MD PhD
m +46735521477
What is wanted is not the will to believe, but the
will to find out, which is the exact opposite
--Bertrand Russell



Re: [O] how to avoid floating number problems with org-table for finances?

2012-10-12 Thread Johan Sandblom

Sorry, I meant

#+TBLFM: @4$1=round(vsum(@1..@3),2);%.40f

Johan

--
Johan Sandblom, MD PhD
m +46735521477
What is wanted is not the will to believe, but the
will to find out, which is the exact opposite
--Bertrand Russell



Re: [O] how to avoid floating number problems with org-table for finances?

2012-10-12 Thread Johan Sandblom

Not what you asked for, but how about simply rounding it?

2012-10-12 19:06 skrev Thomas Koch:

| 0.9000222044604925031308084726 |
#+TBLFM: @4$1=vsum(@1..@3);%.40f


#+TBLFM: @4$1=round(vsum(@1..@3);%.40f

--
Johan Sandblom, MD PhD
m +46735521477
What is wanted is not the will to believe, but the
will to find out, which is the exact opposite
--Bertrand Russell



[O] agenda timeline filtered by date range

2012-09-25 Thread Johan Sandblom

Hello.

Since a year or so I am using org-mode ever more intensively. Among 
other things, I use it to track my training in pediatric medicine. I 
keep a sort of combined diary and planner of events, courses and work 
schedules in a file called arbete.org, which tracks the four years since 
I started until as far into the future as there are concrete plans. 
Sometimes I like to discuss my progress with someone, and then I usually 
make an html export of the timeline in this file. The timeline is 
becoming rather long, but I do not feel it would make sense to divide it 
into several files since it is a logical compartment of life for me.


Is it possible to limit the timeline (or perhaps a custom agenda view) 
to a specific date range, for instance a year or the fall of 2011? I 
have searched the manual and FAQs but have found nothing that addresses 
this. Perhaps this reflects my misuse of org-mode, but on the other hand 
it does seem a useful feature (which probably means it exists but 
somehow eludes me).


Thank you for any help,

Johan Sandblom

--
Johan Sandblom, MD PhD
m +46735521477
What is wanted is not the will to believe, but the
will to find out, which is the exact opposite
--Bertrand Russell



[O] org-date-toggle-inactive

2012-09-25 Thread Johan Sandblom
I wrote the following which allows me ctrl-c-ctrl-c on a date in an org 
file and thereby toggle the inactive state of the date. I find it useful 
when applying to courses that I am later [not] admitted to. Perhaps it 
is useful to someone else. Perhaps also there are obvious improvements 
to the code. Lastly, perhaps there is a better place to submit such 
snippets. I appreciate feedback.


Regards, Johan

(setq org-date-regexp
  [\\[][0-9]\\{4\\}-[0-9][0-9]-[0-9][0-9] [[:alpha:]]\\{2,3\\} 
?.*?[]])


(defun org-at-date-p ()
  Am I inside an org date?
  (interactive)
  (save-excursion
(if (looking-at org-date-regexp)
t
  (if ( (skip-chars-backward -[:alnum:]: ) -40)
  (let ((left (- (point) 1)))
(progn
  (search-backward-regexp [\\[] left t)
(if (looking-at org-date-regexp)
t)))

(defun org-date-toggle-inactive ()
  (interactive)
  (if (org-at-date-p)
  (save-excursion
(progn
  (search-backward-regexp [\\[])
  (if (string-equal  (match-string 0))
  (replace-match [)
(replace-match ))
  (search-forward-regexp []])
  (if (string-equal  (match-string 0))
  (replace-match ])
(replace-match ))
  t))
nil))

(add-hook 'org-ctrl-c-ctrl-c-hook
  'org-date-toggle-inactive)


--
Johan Sandblom, MD PhD
m +46735521477
What is wanted is not the will to believe, but the
will to find out, which is the exact opposite
--Bertrand Russell