* Markup problems when using references in source fragments (was: Markup on same line as text)
@ 2011-05-11 19:41 Roland Kaufmann
2011-05-11 19:51 ` Markup problems when using references in source fragments Bernt Hansen
2011-05-25 7:41 ` Markup problems when using references in source fragments (was: Markup on same line as text) Carsten Dominik
0 siblings, 2 replies; 10+ messages in thread
From: Roland Kaufmann @ 2011-05-11 19:41 UTC (permalink / raw)
To: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 581 bytes --]
On February 27th I submitted a patch proposal to fix HTML export of line
number references in source code fragments. The discussion leading up to
the patch can be found in the thread:
<http://thread.gmane.org/gmane.emacs.orgmode/35810>
As far as I can see, it is not in the source tree as of revision 62d4dd,
but the problem still remains.
I am grateful for feedback on its lackings, if the patch is deemed
unsatisfactory in any way. In case it simply got lost amidst all the
other traffic, I resubmit it, updated so it applies to the current revision.
--
Roland.
[-- Attachment #2: 0001-Fix-markup-problems-when-using-ref.patch --]
[-- Type: text/plain, Size: 1708 bytes --]
From 98e2a586eb0e911ec6b5bedeec4af5f00ee2bf6c Mon Sep 17 00:00:00 2001
From: Roland Kaufmann <rlndkfmn+orgmode@gmail.com>
Date: Sun, 27 Feb 2011 20:52:31 +0100
Subject: [PATCH] Fix markup problems when using references in source fragments
* org-exp.el (org-export-format-source-code-or-example): fontify one
line at the time to avoid partial overlap between fontification and
reference markup.
---
lisp/org-exp.el | 11 +++++++++++
1 files changed, 11 insertions(+), 0 deletions(-)
diff --git a/lisp/org-exp.el b/lisp/org-exp.el
index 9a35b00..dbcf105 100644
--- a/lisp/org-exp.el
+++ b/lisp/org-exp.el
@@ -2446,6 +2446,15 @@ in the list) and remove property and value from the list in LISTVAR."
(defvar org-export-latex-listings-options) ;; defined in org-latex.el
(defvar org-export-latex-minted-options) ;; defined in org-latex.el
+(defun org-remove-formatting-on-newlines-in-region (beg end)
+ "Remove formatting on newline characters"
+ (interactive "r")
+ (save-excursion
+ (goto-char beg)
+ (while (progn (end-of-line) (< (point) end))
+ (put-text-property (point) (1+ (point)) 'face nil)
+ (forward-char 1))))
+
(defun org-export-format-source-code-or-example
(lang code &optional opts indent caption)
"Format CODE from language LANG and return it formatted for export.
@@ -2532,6 +2541,8 @@ INDENT was the original indentation of the block."
(funcall mode)
(fundamental-mode))
(font-lock-fontify-buffer)
+ ;; markup each line separately
+ (org-remove-formatting-on-newlines-in-region (point-min) (point-max))
(org-src-mode)
(set-buffer-modified-p nil)
(org-export-htmlize-region-for-paste
--
1.7.1
^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: Markup problems when using references in source fragments
2011-05-11 19:41 Markup problems when using references in source fragments (was: Markup on same line as text) Roland Kaufmann
@ 2011-05-11 19:51 ` Bernt Hansen
2011-05-11 20:06 ` Roland Kaufmann
2011-05-25 7:41 ` Markup problems when using references in source fragments (was: Markup on same line as text) Carsten Dominik
1 sibling, 1 reply; 10+ messages in thread
From: Bernt Hansen @ 2011-05-11 19:51 UTC (permalink / raw)
To: Roland Kaufmann; +Cc: emacs-orgmode
Roland Kaufmann <rlndkfmn+orgmode@gmail.com> writes:
> On February 27th I submitted a patch proposal to fix HTML export of
> line number references in source code fragments. The discussion
> leading up to the patch can be found in the thread:
>
> <http://thread.gmane.org/gmane.emacs.orgmode/35810>
>
> As far as I can see, it is not in the source tree as of revision
> 62d4dd, but the problem still remains.
>
> I am grateful for feedback on its lackings, if the patch is deemed
> unsatisfactory in any way. In case it simply got lost amidst all the
> other traffic, I resubmit it, updated so it applies to the current
> revision.
Hi Roland,
Both the new and old patch are on the patchwork server waiting to be
addressed.
http://patchwork.newartisans.com/project/org-mode/list/
Regards,
Bernt
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Markup problems when using references in source fragments
2011-05-11 19:51 ` Markup problems when using references in source fragments Bernt Hansen
@ 2011-05-11 20:06 ` Roland Kaufmann
2011-05-11 20:21 ` Bernt Hansen
0 siblings, 1 reply; 10+ messages in thread
From: Roland Kaufmann @ 2011-05-11 20:06 UTC (permalink / raw)
To: emacs-orgmode
On 2011-05-11 21:51, Bernt Hansen wrote:
> Both the new and old patch are on the patchwork server waiting to be
> addressed.
Oops, sorry my bad. I didn't realize that!
However, only the discussion from the first thread:
<http://patchwork.newartisans.com/patch/525/>
is revelant. The patch which is listed there should *not* be applied. A
second and corrected patch was attached in the last message, but it
seems to not have been picked up by the framework.
How do I replace the patch above with the code from:
<http://patchwork.newartisans.com/patch/802/>
--
Roland.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Markup problems when using references in source fragments
2011-05-11 20:06 ` Roland Kaufmann
@ 2011-05-11 20:21 ` Bernt Hansen
2011-05-12 6:59 ` Nick Dokos
0 siblings, 1 reply; 10+ messages in thread
From: Bernt Hansen @ 2011-05-11 20:21 UTC (permalink / raw)
To: Roland Kaufmann; +Cc: emacs-orgmode
Roland Kaufmann <rlndkfmn+orgmode@gmail.com> writes:
> On 2011-05-11 21:51, Bernt Hansen wrote:
>> Both the new and old patch are on the patchwork server waiting to be
>> addressed.
>
> Oops, sorry my bad. I didn't realize that!
>
> However, only the discussion from the first thread:
>
> <http://patchwork.newartisans.com/patch/525/>
>
> is revelant. The patch which is listed there should *not* be
> applied. A second and corrected patch was attached in the last
> message, but it seems to not have been picked up by the framework.
>
> How do I replace the patch above with the code from:
>
> <http://patchwork.newartisans.com/patch/802/>
>
> --
> Roland.
I think you can create an account on the patchwork server and then
invalidate your own patches.
-Bernt
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Markup problems when using references in source fragments
2011-05-11 20:21 ` Bernt Hansen
@ 2011-05-12 6:59 ` Nick Dokos
2011-05-12 10:56 ` Giovanni Ridolfi
2011-05-12 12:43 ` Bernt Hansen
0 siblings, 2 replies; 10+ messages in thread
From: Nick Dokos @ 2011-05-12 6:59 UTC (permalink / raw)
To: Bernt Hansen; +Cc: Roland Kaufmann, nicholas.dokos, emacs-orgmode
Bernt Hansen <bernt@norang.ca> wrote:
> Roland Kaufmann <rlndkfmn+orgmode@gmail.com> writes:
>
> > On 2011-05-11 21:51, Bernt Hansen wrote:
> >> Both the new and old patch are on the patchwork server waiting to be
> >> addressed.
> >
> > Oops, sorry my bad. I didn't realize that!
> >
> > However, only the discussion from the first thread:
> >
> > <http://patchwork.newartisans.com/patch/525/>
> >
> > is revelant. The patch which is listed there should *not* be
> > applied. A second and corrected patch was attached in the last
> > message, but it seems to not have been picked up by the framework.
> >
> > How do I replace the patch above with the code from:
> >
> > <http://patchwork.newartisans.com/patch/802/>
> >
> > --
> > Roland.
>
> I think you can create an account on the patchwork server and then
> invalidate your own patches.
>
If this is possible, can somebody please give details? There is at least
one post of mine that ended up as /patch/797/ that should certainly be
invalidated, since it quotes the patch from an older commit.
And while we are at it: is there any way to mark a post that contains a
patch as "not intended for the patchwork server"? One would have to
remember to do that, so it's not foolproof, but it might help avoid
piling irrelevant stuff on patchwork.
Thanks,
Nick
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Markup problems when using references in source fragments
2011-05-12 6:59 ` Nick Dokos
@ 2011-05-12 10:56 ` Giovanni Ridolfi
2011-05-12 12:43 ` Bernt Hansen
1 sibling, 0 replies; 10+ messages in thread
From: Giovanni Ridolfi @ 2011-05-12 10:56 UTC (permalink / raw)
To: nicholas.dokos; +Cc: Bernt Hansen, emacs-orgmode, Roland Kaufmann
Nick Dokos <nicholas.dokos@hp.com> writes:
> Bernt Hansen <bernt@norang.ca> wrote:
>
>> Roland Kaufmann <rlndkfmn+orgmode@gmail.com> writes:
>>
>> > . The patch which is listed there should *not* be
>> > applied.
>> I think you can create an account on the patchwork server and then
>> invalidate your own patches.
>>
>
> If this is possible, can somebody please give details?
>
> And while we are at it: is there any way to mark a post that contains a
> patch as "not intended for the patchwork server"?
If you think that a patch is
"not intended for the patchwork server"
you may write an e-mail to the patchwork maintainers:
John Wiegley <johnw@newartisans.com>
Carsten Dominik <carsten.dominik@gmail.com>
Eric Schulte <schulte.eric@gmail.com>
Bastien Guerry <bzg@altern.org>
Dan Davison <dandavison7@gmail.com>
David Maus <dmaus@ictsoc.de>
Julien Danjou <julien@danjou.info>
with the subject: REMOVE patches
and link the number of the patches to be removed.
I think they can do that easily from the command line.
I have done this way 3 or 4 times in the past.
I also added some comments/justification: e.g. the link of the
e-mail pointing out that it is a wrong patch or incomplete or...
HTH
Giovanni
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Markup problems when using references in source fragments
2011-05-12 6:59 ` Nick Dokos
2011-05-12 10:56 ` Giovanni Ridolfi
@ 2011-05-12 12:43 ` Bernt Hansen
2011-05-12 13:48 ` Nick Dokos
1 sibling, 1 reply; 10+ messages in thread
From: Bernt Hansen @ 2011-05-12 12:43 UTC (permalink / raw)
To: nicholas.dokos; +Cc: Roland Kaufmann, emacs-orgmode
Nick Dokos <nicholas.dokos@hp.com> writes:
> Bernt Hansen <bernt@norang.ca> wrote:
>
>> Roland Kaufmann <rlndkfmn+orgmode@gmail.com> writes:
>>
>> > On 2011-05-11 21:51, Bernt Hansen wrote:
>> >> Both the new and old patch are on the patchwork server waiting to be
>> >> addressed.
>> >
>> > Oops, sorry my bad. I didn't realize that!
>> >
>> > However, only the discussion from the first thread:
>> >
>> > <http://patchwork.newartisans.com/patch/525/>
>> >
>> > is revelant. The patch which is listed there should *not* be
>> > applied. A second and corrected patch was attached in the last
>> > message, but it seems to not have been picked up by the framework.
>> >
>> > How do I replace the patch above with the code from:
>> >
>> > <http://patchwork.newartisans.com/patch/802/>
>> >
>> > --
>> > Roland.
>>
>> I think you can create an account on the patchwork server and then
>> invalidate your own patches.
>>
>
> If this is possible, can somebody please give details? There is at least
> one post of mine that ended up as /patch/797/ that should certainly be
> invalidated, since it quotes the patch from an older commit.
Hi Nick,
I think you just register an account on the patchwork server that
matches your patch email address, then when you login and select your
patch you get an option to invalidate it.
>
> And while we are at it: is there any way to mark a post that contains a
> patch as "not intended for the patchwork server"? One would have to
> remember to do that, so it's not foolproof, but it might help avoid
> piling irrelevant stuff on patchwork.
I'm not aware of a way to do this currently - maybe just put [RFC] or
something in the subject line of the patch so it's obviously not
complete and ready for inclusion? - then you can just remove the patch
from the patchwork server after posting it. I don't know if the
patchwork server has any rules for skipping patches.
Regards,
Bernt
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Markup problems when using references in source fragments
2011-05-12 12:43 ` Bernt Hansen
@ 2011-05-12 13:48 ` Nick Dokos
0 siblings, 0 replies; 10+ messages in thread
From: Nick Dokos @ 2011-05-12 13:48 UTC (permalink / raw)
To: Bernt Hansen; +Cc: nicholas.dokos, emacs-orgmode
Bernt Hansen <bernt@norang.ca> wrote:
> >> I think you can create an account on the patchwork server and then
> >> invalidate your own patches.
> >>
> >
> > If this is possible, can somebody please give details? There is at least
> > one post of mine that ended up as /patch/797/ that should certainly be
> > invalidated, since it quotes the patch from an older commit.
>
> Hi Nick,
>
> I think you just register an account on the patchwork server that
> matches your patch email address, then when you login and select your
> patch you get an option to invalidate it.
>
Indeed - I missed the login/register/about links.
> >
> > And while we are at it: is there any way to mark a post that contains a
> > patch as "not intended for the patchwork server"? One would have to
> > remember to do that, so it's not foolproof, but it might help avoid
> > piling irrelevant stuff on patchwork.
>
> I'm not aware of a way to do this currently - maybe just put [RFC] or
> something in the subject line of the patch so it's obviously not
> complete and ready for inclusion? - then you can just remove the patch
> from the patchwork server after posting it. I don't know if the
> patchwork server has any rules for skipping patches.
>
OK - actually, thinking about it some more, it might make more sense
to implement the opposite: add the patch if the subject line includes
a cookie (e.g. [PATCH]), the rationale being that somebody who is
consciously submitting a patch for inclusion will be in a better position
to remember to do that. In any case, not my decision.
Thanks (and thanks to Giovanni too for the email suggestion),
Nick
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Markup problems when using references in source fragments (was: Markup on same line as text)
2011-05-11 19:41 Markup problems when using references in source fragments (was: Markup on same line as text) Roland Kaufmann
2011-05-11 19:51 ` Markup problems when using references in source fragments Bernt Hansen
@ 2011-05-25 7:41 ` Carsten Dominik
2011-05-25 10:31 ` Carsten Dominik
1 sibling, 1 reply; 10+ messages in thread
From: Carsten Dominik @ 2011-05-25 7:41 UTC (permalink / raw)
To: Roland Kaufmann; +Cc: emacs-orgmode
You patch has not been accepted and merged.
- Carsten
On 11.5.2011, at 21:41, Roland Kaufmann wrote:
> On February 27th I submitted a patch proposal to fix HTML export of line number references in source code fragments. The discussion leading up to the patch can be found in the thread:
>
> <http://thread.gmane.org/gmane.emacs.orgmode/35810>
>
> As far as I can see, it is not in the source tree as of revision 62d4dd, but the problem still remains.
>
> I am grateful for feedback on its lackings, if the patch is deemed unsatisfactory in any way. In case it simply got lost amidst all the other traffic, I resubmit it, updated so it applies to the current revision.
>
> --
> Roland.
> <0001-Fix-markup-problems-when-using-ref.patch>
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Markup problems when using references in source fragments (was: Markup on same line as text)
2011-05-25 7:41 ` Markup problems when using references in source fragments (was: Markup on same line as text) Carsten Dominik
@ 2011-05-25 10:31 ` Carsten Dominik
0 siblings, 0 replies; 10+ messages in thread
From: Carsten Dominik @ 2011-05-25 10:31 UTC (permalink / raw)
To: Carsten Dominik; +Cc: Roland Kaufmann, emacs-orgmode
On 25.5.2011, at 09:41, Carsten Dominik wrote:
> You patch has not been accepted and merged.
I mean it has *now* been accepted. Sorry for the typo.
- Carsten
>
> - Carsten
>
> On 11.5.2011, at 21:41, Roland Kaufmann wrote:
>
>> On February 27th I submitted a patch proposal to fix HTML export of line number references in source code fragments. The discussion leading up to the patch can be found in the thread:
>>
>> <http://thread.gmane.org/gmane.emacs.orgmode/35810>
>>
>> As far as I can see, it is not in the source tree as of revision 62d4dd, but the problem still remains.
>>
>> I am grateful for feedback on its lackings, if the patch is deemed unsatisfactory in any way. In case it simply got lost amidst all the other traffic, I resubmit it, updated so it applies to the current revision.
>>
>> --
>> Roland.
>> <0001-Fix-markup-problems-when-using-ref.patch>
>
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2011-05-25 14:38 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-05-11 19:41 Markup problems when using references in source fragments (was: Markup on same line as text) Roland Kaufmann
2011-05-11 19:51 ` Markup problems when using references in source fragments Bernt Hansen
2011-05-11 20:06 ` Roland Kaufmann
2011-05-11 20:21 ` Bernt Hansen
2011-05-12 6:59 ` Nick Dokos
2011-05-12 10:56 ` Giovanni Ridolfi
2011-05-12 12:43 ` Bernt Hansen
2011-05-12 13:48 ` Nick Dokos
2011-05-25 7:41 ` Markup problems when using references in source fragments (was: Markup on same line as text) Carsten Dominik
2011-05-25 10:31 ` Carsten Dominik
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).