[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] problems while editing in org-columns mode
From: |
Andrea Rossetti |
Subject: |
Re: [O] problems while editing in org-columns mode |
Date: |
Thu, 24 Apr 2014 15:12:38 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3 (windows-nt) |
Hello Carsten and everyone else reading,
yesterday I re-stumbled into the "problem B" described
below, and had a look at the Org sources. I think the solution
could be: if user sets a non-special property to "" or nil,
then remove the property.
An example of a possible (non-bulletproof, test-only-intended)
patch for "org-entry-put" follows.
*** c:/Users/andrea/AppData/Roaming/.emacs.d/elpa/org-20140422/org.el Wed Apr
23 22:15:51 2014
--- c:/Users/andrea/AppData/Roaming/.emacs.d/elpa/org-20140422/org.new.el
Thu Apr 24 12:40:49 2014
***************
*** 15557,15562 ****
--- 15557,15563 ----
((member property org-special-properties)
(error "The %s property can not yet be set with `org-entry-put'"
property))
+ ((equal value "") (org-delete-property property))
(t ; a non-special property
(let ((buffer-invisibility-spec (org-inhibit-invisibility))) ; Emacs 21
(setq range (org-get-property-block beg end 'force))
Does it make sense for you too? Kindest regards,
Andrea
Carsten Dominik <address@hidden> writes:
> Hi Andrea,
>
> I have fixed problem A. Problem B has to do with the fact that the
> property search function does not find a property with an empty value.
> I need to look into this some more.
>
> - Carsten
> On Nov 22, 2013, at 8:30 PM, address@hidden wrote:
>
.......
>>
>> HOW TO REPRODUCE PROBLEM A:
>>
>> 1) create an example Org file like this:
>>
>> * myproject
>> ** mytask1
>> ** mytask2
>>
>> 2) click on the word "myproject", C-c C-x C-c to enable
>> column view
>>
>> 3) M-S-<right>, then answer the wizard questions:
>> property=cost, title=cost, width=8, summary=add_numbers
>>
>> 4) now click on the word "myproject", type q to leave
>> org-columns mode
>>
>> 5) you will see that in the first row of the buffer
>> a new line appears:
>>
>> #+COLUMNS: %25ITEM %8cost %TODO %3PRIORITY %TAGS
>>
>> I expected "%8cost{+}" instead of "%8cost". Even
>> if f I change manually "%8cost" to "%8cost{+}" the
>> automatic sums (cost of myproject sums cost of
>> mytask1+mytask2) still don't work.
>>
>> The sums work properly if I remove the entire
>> #+COLUMNS statement and add to the :PROPERTIES: of
>> row "myproject" the following property:
>>
>> :COLUMNS: %25ITEM %8cost{+} %TODO %3PRIORITY %TAGS
>>
>>
>>
>> HOW TO REPRODUCE PROBLEM B:
>>
>> 1, 2, 3) same steps than problem A
>>
>> 4) go on row "mytask1" column "cost", type "e" to edit
>> the value, set it to 1234, type RET
>>
>> 5) type "e" and change the proposed value 1234 into
>> the empty string, then type RET
>>
>> 6) type "e" and set the value to 3456, then type RET
>>
>> 7) go on row "mytask1", type TAB to see the properties:
>> you will see that the properties are now:
>>
>> :PROPERTIES:
>> :cost:
>> :cost: 3456
>> :END:
>>
>> (I did not expect that empty :cost: column)
>>
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: [O] problems while editing in org-columns mode,
Andrea Rossetti <=