emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [PATCH] [BUG] Timestamps surrounded by @@ in HTML export
@ 2011-02-01 15:37 Jason Dunsmore
  2011-02-01 16:48 ` Bastien
  0 siblings, 1 reply; 7+ messages in thread
From: Jason Dunsmore @ 2011-02-01 15:37 UTC (permalink / raw)
  To: Org-mode mailing list

I noticed in the latest Git version that each inactive timestamp has
"@@" before and after it in HTML exported output.  Here is a patch that
fixes it.

diff --git a/lisp/org-html.el b/lisp/org-html.el
index 6c0e5e3..2f0377b 100644
--- a/lisp/org-html.el
+++ b/lisp/org-html.el
@@ -2124,14 +2124,14 @@ But it has the disadvantage, that Org-mode's HTML conver
        (or b (setq b (substring s 0 (match-beginning 0))))
        (setq r (concat
                 r (substring s 0 (match-beginning 0))
-                " @<span class=\"timestamp-wrapper\">"
+                " <span class=\"timestamp-wrapper\">"
                 (if (match-end 1)
-                    (format "@<span class=\"timestamp-kwd\">%s @</span>"
+                    (format "<span class=\"timestamp-kwd\">%s </span>"
                             (match-string 1 s)))
-                (format " @<span class=\"timestamp\">%s@</span>"
+                (format " <span class=\"timestamp\">%s</span>"
                         (substring
                          (org-translate-time (match-string 3 s)) 1 -1))
-                "@</span>")
+                "</span>")
              s (substring s (match-end 0))))
       ;; Line break if line started and ended with time stamp stuff
       (if (not r)

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

* Re: [PATCH] [BUG] Timestamps surrounded by @@ in HTML export
  2011-02-01 15:37 [PATCH] [BUG] Timestamps surrounded by @@ in HTML export Jason Dunsmore
@ 2011-02-01 16:48 ` Bastien
  2011-02-01 18:50   ` Puneeth Chaganti
  0 siblings, 1 reply; 7+ messages in thread
From: Bastien @ 2011-02-01 16:48 UTC (permalink / raw)
  To: Jason Dunsmore; +Cc: Org-mode mailing list

Jason Dunsmore <emacs-orgmode@dunsmor.com> writes:

> I noticed in the latest Git version that each inactive timestamp has
> "@@" before and after it in HTML exported output.  Here is a patch that
> fixes it.

Applied, thanks!

-- 
 Bastien

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

* Re: [PATCH] [BUG] Timestamps surrounded by @@ in HTML export
  2011-02-01 16:48 ` Bastien
@ 2011-02-01 18:50   ` Puneeth Chaganti
  2011-02-02  9:48     ` Bastien
  0 siblings, 1 reply; 7+ messages in thread
From: Puneeth Chaganti @ 2011-02-01 18:50 UTC (permalink / raw)
  To: Bastien; +Cc: Jason Dunsmore, Org-mode mailing list

On Tue, Feb 1, 2011 at 10:18 PM, Bastien <bastien.guerry@wikimedia.fr> wrote:
> Jason Dunsmore <emacs-orgmode@dunsmor.com> writes:
>
>> I noticed in the latest Git version that each inactive timestamp has
>> "@@" before and after it in HTML exported output.  Here is a patch that
>> fixes it.
>
> Applied, thanks!

I don't really understand what is going on here, but there was one @
still appearing after this patch was applied. I am sending a patch to
remove the one remaining @ symbol in the `org-html-handle-time-stamps`
function. I don't know if this breaks something else and why this was
left out by Jason.

diff --git a/lisp/org-html.el b/lisp/org-html.el
index 2f0377b..58c65bf 100644
--- a/lisp/org-html.el
+++ b/lisp/org-html.el
@@ -2138,7 +2138,7 @@ But it has the disadvantage, that Org-mode's
HTML conversions cannot be used."
          s
        (setq r (concat r s))
        (unless (string-match "\\S-" (concat b s))
-         (setq r (concat r "@<br/>")))
+         (setq r (concat r "<br/>")))
        r))))


Thanks,
Puneeth

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

* Re: [PATCH] [BUG] Timestamps surrounded by @@ in HTML export
  2011-02-01 18:50   ` Puneeth Chaganti
@ 2011-02-02  9:48     ` Bastien
  2011-02-02  9:55       ` Puneeth Chaganti
  0 siblings, 1 reply; 7+ messages in thread
From: Bastien @ 2011-02-02  9:48 UTC (permalink / raw)
  To: Puneeth Chaganti; +Cc: Jason Dunsmore, Org-mode mailing list

Hi Puneeth,

Puneeth Chaganti <punchagan@gmail.com> writes:

> I don't really understand what is going on here, but there was one @
> still appearing after this patch was applied. I am sending a patch to
> remove the one remaining @ symbol in the `org-html-handle-time-stamps`
> function. I don't know if this breaks something else and why this was
> left out by Jason.

Better to test your own patch then ;)  I did so, looks fine, I applied
it.  Thanks!

-- 
 Bastien

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

* Re: [PATCH] [BUG] Timestamps surrounded by @@ in HTML export
  2011-02-02  9:48     ` Bastien
@ 2011-02-02  9:55       ` Puneeth Chaganti
  2011-02-02 10:12         ` Bastien
  0 siblings, 1 reply; 7+ messages in thread
From: Puneeth Chaganti @ 2011-02-02  9:55 UTC (permalink / raw)
  To: Bastien; +Cc: Jason Dunsmore, Org-mode mailing list

On Wed, Feb 2, 2011 at 3:18 PM, Bastien <bastien.guerry@wikimedia.fr> wrote:
> Hi Puneeth,
>
> Puneeth Chaganti <punchagan@gmail.com> writes:
>
>> I don't really understand what is going on here, but there was one @
>> still appearing after this patch was applied. I am sending a patch to
>> remove the one remaining @ symbol in the `org-html-handle-time-stamps`
>> function. I don't know if this breaks something else and why this was
>> left out by Jason.
>
> Better to test your own patch then ;)  I did so, looks fine, I applied
> it.  Thanks!

:) I did test my patch and it worked. But these @ seemed to have been
put there for some reason, I wasn't able to understand, in the quick
look that I had. Anyway, thanks.

--
Puneeth

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

* Re: [PATCH] [BUG] Timestamps surrounded by @@ in HTML export
  2011-02-02  9:55       ` Puneeth Chaganti
@ 2011-02-02 10:12         ` Bastien
  2011-02-02 17:44           ` Puneeth Chaganti
  0 siblings, 1 reply; 7+ messages in thread
From: Bastien @ 2011-02-02 10:12 UTC (permalink / raw)
  To: Puneeth Chaganti; +Cc: Jason Dunsmore, Org-mode mailing list

Puneeth Chaganti <punchagan@gmail.com> writes:

>>> I don't really understand what is going on here, but there was one @
>>> still appearing after this patch was applied. I am sending a patch to
>>> remove the one remaining @ symbol in the `org-html-handle-time-stamps`
>>> function. I don't know if this breaks something else and why this was
>>> left out by Jason.
>>
>> Better to test your own patch then ;)  I did so, looks fine, I applied
>> it.  Thanks!
>
> :) I did test my patch and it worked. 

Ah okay, sorry for assuming otherwise!

> But these @ seemed to have been put there for some reason, I wasn't
> able to understand, in the quick look that I had. Anyway, thanks.

It took me a while to understand this as well: when looking at
org-export-as-html, you see some occurrences of "@<tag>".  These
org-specific @tags are escaped and will be taken care of in the 
rest of the function.

But org-html-handle-time-stamps happens after these @tags have 
been taken care of, which means that no @ is necessary in this
function.

Hope this helps :)

-- 
 Bastien

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

* Re: [PATCH] [BUG] Timestamps surrounded by @@ in HTML export
  2011-02-02 10:12         ` Bastien
@ 2011-02-02 17:44           ` Puneeth Chaganti
  0 siblings, 0 replies; 7+ messages in thread
From: Puneeth Chaganti @ 2011-02-02 17:44 UTC (permalink / raw)
  To: Bastien; +Cc: Jason Dunsmore, Org-mode mailing list

On Wed, Feb 2, 2011 at 3:42 PM, Bastien <bastien.guerry@wikimedia.fr> wrote:
> Puneeth Chaganti <punchagan@gmail.com> writes:
>
>>>> I don't really understand what is going on here, but there was one @
>>>> still appearing after this patch was applied. I am sending a patch to
>>>> remove the one remaining @ symbol in the `org-html-handle-time-stamps`
>>>> function. I don't know if this breaks something else and why this was
>>>> left out by Jason.
>>>
>>> Better to test your own patch then ;)  I did so, looks fine, I applied
>>> it.  Thanks!
>>
>> :) I did test my patch and it worked.
>
> Ah okay, sorry for assuming otherwise!
>
>> But these @ seemed to have been put there for some reason, I wasn't
>> able to understand, in the quick look that I had. Anyway, thanks.
>
> It took me a while to understand this as well: when looking at
> org-export-as-html, you see some occurrences of "@<tag>".  These
> org-specific @tags are escaped and will be taken care of in the
> rest of the function.
>
> But org-html-handle-time-stamps happens after these @tags have
> been taken care of, which means that no @ is necessary in this
> function.
>
> Hope this helps :)

Thanks for explaining this. :)

-- 
Puneeth

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

end of thread, other threads:[~2011-02-02 17:44 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-02-01 15:37 [PATCH] [BUG] Timestamps surrounded by @@ in HTML export Jason Dunsmore
2011-02-01 16:48 ` Bastien
2011-02-01 18:50   ` Puneeth Chaganti
2011-02-02  9:48     ` Bastien
2011-02-02  9:55       ` Puneeth Chaganti
2011-02-02 10:12         ` Bastien
2011-02-02 17:44           ` Puneeth Chaganti

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).