all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug with timestamp fontification (bisected to b6b509b)
@ 2013-02-27 15:54 Nicolas Richard
  2013-02-27 16:14 ` Suvayu Ali
  2013-02-27 16:31 ` Bastien
  0 siblings, 2 replies; 6+ messages in thread
From: Nicolas Richard @ 2013-02-27 15:54 UTC (permalink / raw)
  To: emacs-orgmode


This is bisected to b6b509b (which 467f7ff claims to fix, and indeed
does partially)

Reproduce by doing:
emacs -q -L /home/youngfrog/sources/org-mode/lisp/ -f org-mode --eval '(insert "<2012-02-27 Wed.>")'
=> timestamp is not fontified.

or instead
emacs -q -L /home/youngfrog/sources/org-mode/lisp/ -f org-mode --eval '(insert "Whatever\n<2012-02-27 Wed.>")'
=> timestamp is fontified but fontification is lost if you hit RET

I tried to patch but didn't succeed. The newline (or beginning of
buffer in first case, but that's probably unimportant ?) seems to be the
problem. Any idea on that ?

-- 
N.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: bug with timestamp fontification (bisected to b6b509b)
  2013-02-27 15:54 bug with timestamp fontification (bisected to b6b509b) Nicolas Richard
@ 2013-02-27 16:14 ` Suvayu Ali
  2013-02-27 16:46   ` Nicolas Richard
  2013-02-27 16:31 ` Bastien
  1 sibling, 1 reply; 6+ messages in thread
From: Suvayu Ali @ 2013-02-27 16:14 UTC (permalink / raw)
  To: emacs-orgmode

On Wed, Feb 27, 2013 at 04:54:54PM +0100, Nicolas Richard wrote:
> 
> Reproduce by doing:
> emacs -q -L /home/youngfrog/sources/org-mode/lisp/ -f org-mode --eval '(insert "<2012-02-27 Wed.>")'
                                                                                              ^^^^^

Are you sure your timestamp has the correct syntax?  As far as I know
there should be no periods at the end of the day name.

BTW, how do you enter timestamps?  You can use C-c C-x . and C-c C-x !
for active and inactive timestamps.  This way you can avoid sysntax
errors conveniently.

Hope this helps,

-- 
Suvayu

Open source is the future. It sets us free.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: bug with timestamp fontification (bisected to b6b509b)
  2013-02-27 15:54 bug with timestamp fontification (bisected to b6b509b) Nicolas Richard
  2013-02-27 16:14 ` Suvayu Ali
@ 2013-02-27 16:31 ` Bastien
  2013-02-27 17:01   ` Nicolas Richard
  1 sibling, 1 reply; 6+ messages in thread
From: Bastien @ 2013-02-27 16:31 UTC (permalink / raw)
  To: Nicolas Richard; +Cc: emacs-orgmode

Hi Nicolas,

"Nicolas Richard" <theonewiththeevillook@yahoo.fr> writes:

> This is bisected to b6b509b (which 467f7ff claims to fix, and indeed
> does partially)

I think I *completely* fixed this now... thanks for the heads up
and the easy recipe!

-- 
 Bastien

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: bug with timestamp fontification (bisected to b6b509b)
  2013-02-27 16:14 ` Suvayu Ali
@ 2013-02-27 16:46   ` Nicolas Richard
  0 siblings, 0 replies; 6+ messages in thread
From: Nicolas Richard @ 2013-02-27 16:46 UTC (permalink / raw)
  To: emacs-orgmode

Suvayu Ali <fatkasuvayu+linux@gmail.com> writes:

> On Wed, Feb 27, 2013 at 04:54:54PM +0100, Nicolas Richard wrote:
>> emacs -q -L /home/youngfrog/sources/org-mode/lisp/ -f org-mode --eval '(insert "<2012-02-27 Wed.>")'
> 
> Are you sure your timestamp has the correct syntax?  As far as I know
> there should be no periods at the end of the day name.

Sometimes there is a period, sometimes not. When and when not : I never
figured that out (never really tried to, either).

> BTW, how do you enter timestamps?  You can use C-c C-x . and C-c C-x !

That's what I use (usually). [except that there is no C-x]

-- 
N.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: bug with timestamp fontification (bisected to b6b509b)
  2013-02-27 16:31 ` Bastien
@ 2013-02-27 17:01   ` Nicolas Richard
  2013-02-27 17:15     ` Bastien
  0 siblings, 1 reply; 6+ messages in thread
From: Nicolas Richard @ 2013-02-27 17:01 UTC (permalink / raw)
  To: emacs-orgmode

Bastien <bzg@altern.org> writes:
> I think I *completely* fixed this now... thanks for the heads up
> and the easy recipe!

Thanks ; indeed dropping the change to the regexp seems the easiest (and
may avoid problems with code relying on that regexp out of the core).

May I suggest that you fix the commit just once more ? Part of the
previous fix was to increase "group number" everywhere, and that has to
be reverted. Here is a patch if you prefer :

From 53152a802afe85e856d571867a2c8a36457cf0cd Mon Sep 17 00:00:00 2001
From: Nicolas Richard <theonewiththeevillook@yahoo.fr>
Date: Wed, 27 Feb 2013 17:55:42 +0100
Subject: [PATCH] Fix b6b509b one more time.

---
 lisp/org.el | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/lisp/org.el b/lisp/org.el
index b88b49a..7cf7832 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -5830,15 +5830,15 @@ by a #."
   (if (and (re-search-forward org-tsr-regexp-both limit t)
 	   (not (equal (char-before (match-beginning 0)) 91)))
       (progn
-	(org-remove-flyspell-overlays-in (match-beginning 1) (match-end 1))
-	(add-text-properties (match-beginning 1) (match-end 1)
+	(org-remove-flyspell-overlays-in (match-beginning 0) (match-end 0))
+	(add-text-properties (match-beginning 0) (match-end 0)
 			     (list 'mouse-face 'highlight
 				   'keymap org-mouse-map))
-	(org-rear-nonsticky-at (match-end 1))
+	(org-rear-nonsticky-at (match-end 0))
 	(when org-display-custom-times
-	  (if (match-end 4)
-	      (org-display-custom-time (match-beginning 4) (match-end 4)))
-	  (org-display-custom-time (match-beginning 2) (match-end 2)))
+	  (if (match-end 3)
+	      (org-display-custom-time (match-beginning 3) (match-end 3)))
+	  (org-display-custom-time (match-beginning 1) (match-end 1)))
 	t)))
 
 (defvar org-target-link-regexp nil
-- 
1.8.1.4

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: bug with timestamp fontification (bisected to b6b509b)
  2013-02-27 17:01   ` Nicolas Richard
@ 2013-02-27 17:15     ` Bastien
  0 siblings, 0 replies; 6+ messages in thread
From: Bastien @ 2013-02-27 17:15 UTC (permalink / raw)
  To: Nicolas Richard; +Cc: emacs-orgmode

"Nicolas Richard" <theonewiththeevillook@yahoo.fr> writes:

> May I suggest that you fix the commit just once more ? Part of the
> previous fix was to increase "group number" everywhere, and that has to
> be reverted. Here is a patch if you prefer :

Applied... thanks! 

*Sigh*... I think I need to get unplugged for a while :)

-- 
 Bastien

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2013-02-27 17:16 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-02-27 15:54 bug with timestamp fontification (bisected to b6b509b) Nicolas Richard
2013-02-27 16:14 ` Suvayu Ali
2013-02-27 16:46   ` Nicolas Richard
2013-02-27 16:31 ` Bastien
2013-02-27 17:01   ` Nicolas Richard
2013-02-27 17:15     ` Bastien

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.