* [PATCH] Fix org-entry-put (trouble with org-columns-edit-value)
@ 2012-11-06 19:48 Takafumi Arakaki
2012-11-09 8:58 ` Nicolas Goaziou
0 siblings, 1 reply; 8+ messages in thread
From: Takafumi Arakaki @ 2012-11-06 19:48 UTC (permalink / raw)
To: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 789 bytes --]
I have a trouble with org-columns-edit-value; updating property using
this command breaks property formatting.
If I update MyProp_B in,
:PROPERTIES:
:MyProp_A: a
:MyProp_B: b
:END:
I end up with:
:PROPERTIES:
:MyProp_A: :MyProp_B: x a
:END:
I found that (match-beginning 0) returns different value after
(delete-region (match-beginning 0) (match-end 0)). The strange thing
is that I could not reproduce it in "plain" Emacs without loading my
init.el.
I am using a few week older version from Emacs trunk.
emacs-version: "24.2.50.1"
emacs-bzr-version: "110740 rgm@gnu.org-20121030101856-aimepc487hfjuqqs"
I will try to reproduce the bug after updating Emacs (probably to the
24.3 release branch) and org-mode later. But I thought I'd share the
patch first.
[-- Attachment #2: org-entry-put.patch --]
[-- Type: application/octet-stream, Size: 563 bytes --]
diff --git a/lisp/org.el b/lisp/org.el
index 2d2615f..dd03aeb 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -14765,9 +14765,10 @@ and the new value.")
(goto-char (car range))
(if (re-search-forward
(org-re-property-keyword property) (cdr range) t)
- (progn
- (delete-region (match-beginning 0) (match-end 0))
- (goto-char (match-beginning 0)))
+ (let ((mbeg (match-beginning 0))
+ (mend (match-end 0)))
+ (delete-region mbeg mend)
+ (goto-char mbeg))
(goto-char (cdr range))
(insert "\n")
(backward-char 1)
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH] Fix org-entry-put (trouble with org-columns-edit-value)
2012-11-06 19:48 [PATCH] Fix org-entry-put (trouble with org-columns-edit-value) Takafumi Arakaki
@ 2012-11-09 8:58 ` Nicolas Goaziou
2012-11-09 13:08 ` Takafumi Arakaki
0 siblings, 1 reply; 8+ messages in thread
From: Nicolas Goaziou @ 2012-11-09 8:58 UTC (permalink / raw)
To: Takafumi Arakaki; +Cc: emacs-orgmode
Hello,
Takafumi Arakaki <aka.tkf@gmail.com> writes:
> I have a trouble with org-columns-edit-value; updating property using
> this command breaks property formatting.
>
> If I update MyProp_B in,
>
> :PROPERTIES:
> :MyProp_A: a
> :MyProp_B: b
> :END:
>
> I end up with:
>
> :PROPERTIES:
> :MyProp_A: :MyProp_B: x a
>
> :END:
>
>
> I found that (match-beginning 0) returns different value after
> (delete-region (match-beginning 0) (match-end 0)). The strange thing
> is that I could not reproduce it in "plain" Emacs without loading my
> init.el.
>
> I am using a few week older version from Emacs trunk.
> emacs-version: "24.2.50.1"
> emacs-bzr-version: "110740 rgm@gnu.org-20121030101856-aimepc487hfjuqqs"
>
>
> I will try to reproduce the bug after updating Emacs (probably to the
> 24.3 release branch) and org-mode later. But I thought I'd share the
> patch first.
I think this was fixed a while ago. I'll wait for your feedback after
you update Org.
Regards,
--
Nicolas Goaziou
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] Fix org-entry-put (trouble with org-columns-edit-value)
2012-11-09 8:58 ` Nicolas Goaziou
@ 2012-11-09 13:08 ` Takafumi Arakaki
2012-11-09 13:25 ` Nicolas Goaziou
0 siblings, 1 reply; 8+ messages in thread
From: Takafumi Arakaki @ 2012-11-09 13:08 UTC (permalink / raw)
To: Nicolas Goaziou; +Cc: emacs-orgmode
Hi,
Thanks for the reply.
Do you know if it is fixed in both master and maint, or only in master?
---
Takafumi
On Fri, Nov 9, 2012 at 9:58 AM, Nicolas Goaziou <n.goaziou@gmail.com> wrote:
> Hello,
>
> Takafumi Arakaki <aka.tkf@gmail.com> writes:
>
>> I have a trouble with org-columns-edit-value; updating property using
>> this command breaks property formatting.
>>
>> If I update MyProp_B in,
>>
>> :PROPERTIES:
>> :MyProp_A: a
>> :MyProp_B: b
>> :END:
>>
>> I end up with:
>>
>> :PROPERTIES:
>> :MyProp_A: :MyProp_B: x a
>>
>> :END:
>>
>>
>> I found that (match-beginning 0) returns different value after
>> (delete-region (match-beginning 0) (match-end 0)). The strange thing
>> is that I could not reproduce it in "plain" Emacs without loading my
>> init.el.
>>
>> I am using a few week older version from Emacs trunk.
>> emacs-version: "24.2.50.1"
>> emacs-bzr-version: "110740 rgm@gnu.org-20121030101856-aimepc487hfjuqqs"
>>
>>
>> I will try to reproduce the bug after updating Emacs (probably to the
>> 24.3 release branch) and org-mode later. But I thought I'd share the
>> patch first.
>
> I think this was fixed a while ago. I'll wait for your feedback after
> you update Org.
>
>
> Regards,
>
> --
> Nicolas Goaziou
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] Fix org-entry-put (trouble with org-columns-edit-value)
2012-11-09 13:08 ` Takafumi Arakaki
@ 2012-11-09 13:25 ` Nicolas Goaziou
2012-11-09 14:34 ` Takafumi Arakaki
0 siblings, 1 reply; 8+ messages in thread
From: Nicolas Goaziou @ 2012-11-09 13:25 UTC (permalink / raw)
To: Takafumi Arakaki; +Cc: emacs-orgmode
Hello,
Takafumi Arakaki <aka.tkf@gmail.com> writes:
> Do you know if it is fixed in both master and maint, or only in
> master?
I don't know. If it's fixed already, I guess the patch was applied to
maint.
Regards,
--
Nicolas Goaziou
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] Fix org-entry-put (trouble with org-columns-edit-value)
2012-11-09 13:25 ` Nicolas Goaziou
@ 2012-11-09 14:34 ` Takafumi Arakaki
2012-12-02 4:52 ` Takafumi Arakaki
0 siblings, 1 reply; 8+ messages in thread
From: Takafumi Arakaki @ 2012-11-09 14:34 UTC (permalink / raw)
To: Nicolas Goaziou; +Cc: emacs-orgmode
Thanks, I will check maint first then.
Takafumi
On Fri, Nov 9, 2012 at 2:25 PM, Nicolas Goaziou <n.goaziou@gmail.com> wrote:
> Hello,
>
> Takafumi Arakaki <aka.tkf@gmail.com> writes:
>
>> Do you know if it is fixed in both master and maint, or only in
>> master?
>
> I don't know. If it's fixed already, I guess the patch was applied to
> maint.
>
>
> Regards,
>
> --
> Nicolas Goaziou
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] Fix org-entry-put (trouble with org-columns-edit-value)
2012-11-09 14:34 ` Takafumi Arakaki
@ 2012-12-02 4:52 ` Takafumi Arakaki
2012-12-02 8:39 ` Nicolas Goaziou
0 siblings, 1 reply; 8+ messages in thread
From: Takafumi Arakaki @ 2012-12-02 4:52 UTC (permalink / raw)
To: Nicolas Goaziou; +Cc: emacs-orgmode
I can confirm that the behavior I described still exists.
I checked with the latest version (8d22b119786206bbae98183b0fb61e3ab1b22a43)
in maint branch of org-mode and the latest version (110979) in emacs-24 branch
of Emacs bzr repository. I also checked with the master branch
(6642177dee3ec04404ebd99391748f373ada3d2a) result was the same.
Takafumi
On Fri, Nov 9, 2012 at 3:34 PM, Takafumi Arakaki <aka.tkf@gmail.com> wrote:
> Thanks, I will check maint first then.
>
> Takafumi
>
> On Fri, Nov 9, 2012 at 2:25 PM, Nicolas Goaziou <n.goaziou@gmail.com> wrote:
>> Hello,
>>
>> Takafumi Arakaki <aka.tkf@gmail.com> writes:
>>
>>> Do you know if it is fixed in both master and maint, or only in
>>> master?
>>
>> I don't know. If it's fixed already, I guess the patch was applied to
>> maint.
>>
>>
>> Regards,
>>
>> --
>> Nicolas Goaziou
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] Fix org-entry-put (trouble with org-columns-edit-value)
2012-12-02 4:52 ` Takafumi Arakaki
@ 2012-12-02 8:39 ` Nicolas Goaziou
2012-12-07 10:51 ` Takafumi Arakaki
0 siblings, 1 reply; 8+ messages in thread
From: Nicolas Goaziou @ 2012-12-02 8:39 UTC (permalink / raw)
To: Takafumi Arakaki; +Cc: emacs-orgmode
Takafumi Arakaki <aka.tkf@gmail.com> writes:
> I can confirm that the behavior I described still exists.
> I checked with the latest version (8d22b119786206bbae98183b0fb61e3ab1b22a43)
> in maint branch of org-mode and the latest version (110979) in emacs-24 branch
> of Emacs bzr repository. I also checked with the master branch
> (6642177dee3ec04404ebd99391748f373ada3d2a) result was the same.
OK thanks for the confirmation. Could you provide an ECM (or better:
write an ERT test) for it?
Regards,
--
Nicolas Goaziou
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] Fix org-entry-put (trouble with org-columns-edit-value)
2012-12-02 8:39 ` Nicolas Goaziou
@ 2012-12-07 10:51 ` Takafumi Arakaki
0 siblings, 0 replies; 8+ messages in thread
From: Takafumi Arakaki @ 2012-12-07 10:51 UTC (permalink / raw)
To: Nicolas Goaziou; +Cc: emacs-orgmode
It turned out that the bug I encountered was due to
after-change-function in flyspell-lazy. It alters the
match data that's why org-entry-put worked unexpectedly.
https://github.com/rolandwalker/flyspell-lazy/pull/4
On Sun, Dec 2, 2012 at 9:39 AM, Nicolas Goaziou <n.goaziou@gmail.com> wrote:
> Takafumi Arakaki <aka.tkf@gmail.com> writes:
>
>> I can confirm that the behavior I described still exists.
>> I checked with the latest version (8d22b119786206bbae98183b0fb61e3ab1b22a43)
>> in maint branch of org-mode and the latest version (110979) in emacs-24 branch
>> of Emacs bzr repository. I also checked with the master branch
>> (6642177dee3ec04404ebd99391748f373ada3d2a) result was the same.
>
> OK thanks for the confirmation. Could you provide an ECM (or better:
> write an ERT test) for it?
>
>
> Regards,
>
> --
> Nicolas Goaziou
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2012-12-07 10:51 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-06 19:48 [PATCH] Fix org-entry-put (trouble with org-columns-edit-value) Takafumi Arakaki
2012-11-09 8:58 ` Nicolas Goaziou
2012-11-09 13:08 ` Takafumi Arakaki
2012-11-09 13:25 ` Nicolas Goaziou
2012-11-09 14:34 ` Takafumi Arakaki
2012-12-02 4:52 ` Takafumi Arakaki
2012-12-02 8:39 ` Nicolas Goaziou
2012-12-07 10:51 ` Takafumi Arakaki
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).