emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [PATCH] ox.el: Fix extra character deleted in org-export--update-included-link
@ 2019-11-03 13:14 Christoffer Stjernlöf
  2020-02-11 15:55 ` Bastien
  0 siblings, 1 reply; 7+ messages in thread
From: Christoffer Stjernlöf @ 2019-11-03 13:14 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 1215 bytes --]

* ox.el (org-export--update-included-link): Fix bug.
(org-export--update-included-link): Delete region only until one less
than (org-element-property :end link).

The old behaviour meant that e.g. the following headline could fail to
parse correctly after inclusion:

[[file:something.org][Title]] :tags:following:immediately

because it would be converted to

[[file:path/to/something.org][Title]]:tags:following:immediately
where the whitespace was necessary for Org to understand that the tags
indeed were tags.

TINYCHANGE
---
 lisp/ox.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lisp/ox.el b/lisp/ox.el
index 5b4134ecc..6c1d1b455 100644
--- a/lisp/ox.el
+++ b/lisp/ox.el
@@ -3468,7 +3468,7 @@ Move point after the link."
                            (org-element-property :contents-end link)))))
        (org-element-put-property new-link :path new-path)
        (delete-region (org-element-property :begin link)
-                      (org-element-property :end link))
+                      (1- (org-element-property :end link)))
        (insert (org-element-link-interpreter new-link contents))))))
 
 (defun org-export--prepare-file-contents
-- 

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 227 bytes --]

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

* Re: [PATCH] ox.el: Fix extra character deleted in org-export--update-included-link
  2019-11-03 13:14 [PATCH] ox.el: Fix extra character deleted in org-export--update-included-link Christoffer Stjernlöf
@ 2020-02-11 15:55 ` Bastien
  2020-02-11 18:15   ` Nicolas Goaziou
  0 siblings, 1 reply; 7+ messages in thread
From: Bastien @ 2020-02-11 15:55 UTC (permalink / raw)
  To: Christoffer Stjernlöf, mail; +Cc: emacs-orgmode

Hi Christoffer and Nicolas,

thanks for your patch.

a@xkqr.org (Christoffer Stjernlöf) writes:

> * ox.el (org-export--update-included-link): Fix bug.
> (org-export--update-included-link): Delete region only until one less
> than (org-element-property :end link).

Nicolas, does it look good to you?  The patch passes all the test but
probably they don't cover edge cases about link insertion/updating.

Thanks,

-- 
 Bastien

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

* Re: [PATCH] ox.el: Fix extra character deleted in org-export--update-included-link
  2020-02-11 15:55 ` Bastien
@ 2020-02-11 18:15   ` Nicolas Goaziou
  2020-02-13  8:12     ` Bastien
  0 siblings, 1 reply; 7+ messages in thread
From: Nicolas Goaziou @ 2020-02-11 18:15 UTC (permalink / raw)
  To: Bastien; +Cc: Christoffer Stjernlöf, emacs-orgmode

Hello,

Bastien <bzg@gnu.org> writes:

> Nicolas, does it look good to you?  

How would I dare to have an opinion m'lord? Only yours matters.

Christoffer, unfortunately, this patch is incorrect. It doesn't account
for a zero :post-blank value. For the record, (1-
(org-element-property :end ...)) is always a bad idea.

I pushed a fix, with a test. I let you check if the issue is resolved on
your side, and close the bug report if appropriate.

Thank you for the report.

-- 
Nicolas Goaziou

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

* Re: [PATCH] ox.el: Fix extra character deleted in org-export--update-included-link
  2020-02-11 18:15   ` Nicolas Goaziou
@ 2020-02-13  8:12     ` Bastien
  2020-02-13 10:25       ` Nicolas Goaziou
  0 siblings, 1 reply; 7+ messages in thread
From: Bastien @ 2020-02-13  8:12 UTC (permalink / raw)
  To: Nicolas Goaziou; +Cc: Christoffer Stjernlöf, emacs-orgmode

Hi Nicolas,

Nicolas Goaziou <mail@nicolasgoaziou.fr> writes:

> How would I dare to have an opinion m'lord? Only yours matters.

Such sarcastic remarks hurt.

I may have done something (or worse, many things!) that frustrate you
somehow, but using irony is not a good way to communicate on mailing
lists.  Simply tell me directly what wrong I've done so we can discuss
it (in private if you prefer).

But please: we're all on the same boat contributing with our free time
on sharing good stuff, no need to hurt each others.

> I pushed a fix, with a test. I let you check if the issue is resolved on
> your side, and close the bug report if appropriate.

Thanks for fixing this.

-- 
 Bastien

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

* Re: [PATCH] ox.el: Fix extra character deleted in org-export--update-included-link
  2020-02-13  8:12     ` Bastien
@ 2020-02-13 10:25       ` Nicolas Goaziou
  2020-02-13 11:01         ` Bastien
  0 siblings, 1 reply; 7+ messages in thread
From: Nicolas Goaziou @ 2020-02-13 10:25 UTC (permalink / raw)
  To: Bastien; +Cc: emacs-orgmode

Hello,

Bastien <bzg@gnu.org> writes:

> Nicolas Goaziou <mail@nicolasgoaziou.fr> writes:
>
>> How would I dare to have an opinion m'lord? Only yours matters.
>
> Such sarcastic remarks hurt.

Indeed! But I eventually overcame the pain. Thank you for caring! :)

Last time we disagreed, you grossly concluded with:

   Future maintainers may of course interpret the recommendations of the
   FSF differently, but that's mine for now.

As far as my understanding permits, this means: "I'm am the one in
charge. I know what I'm doing. Discussion closed. Next."

I find this stance dubious, whatever the subject is, or if you are right
or wrong. To make my point go through, I'm now pushing it up to the
absurd. My intent is to warn, not to hurt.

> I may have done something (or worse, many things!) that frustrate you
> somehow, but using irony is not a good way to communicate on mailing
> lists.  

I know that is not a good way to communicate.

I also believe that lecturing others about communication on mailing
lists, or social behaviour in general, is not helpful either. Unless, of
course, you think being patronizing is more acceptable here than being
ironic. I hope you don't.

Regards,

-- 
Nicolas Goaziou

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

* Re: [PATCH] ox.el: Fix extra character deleted in org-export--update-included-link
  2020-02-13 10:25       ` Nicolas Goaziou
@ 2020-02-13 11:01         ` Bastien
  2020-02-13 19:07           ` Adam Porter
  0 siblings, 1 reply; 7+ messages in thread
From: Bastien @ 2020-02-13 11:01 UTC (permalink / raw)
  To: Nicolas Goaziou; +Cc: emacs-orgmode

Hi Nicolas,

I'm glad I replied to your email because...

Nicolas Goaziou <mail@nicolasgoaziou.fr> writes:

> Last time we disagreed, you grossly concluded with:
>
>    Future maintainers may of course interpret the recommendations of the
>    FSF differently, but that's mine for now.
>
> As far as my understanding permits, this means: "I'm am the one in
> charge. I know what I'm doing. Discussion closed. Next."

... we are clearly miscommunicating here.

When I said:

     Future maintainers may of course interpret the recommendations of
     the FSF differently, but that's mine for now.

I just really meant what I said: future maintainer(s) can decide what
is the best interpretation of "15 lines of (significant) changes", but
since I'm the one responsible for handling copyright stuff for Org, I
ask you and co-maintainers to act as if my interpretation were true.

I didn't even imagine my statement could be rude, but I know see how
it can be perceived as rude, given the context.  Sorry for that.

> I find this stance dubious, whatever the subject is, or if you are right
> or wrong. To make my point go through, I'm now pushing it up to the
> absurd. My intent is to warn, not to hurt.

It did hurt, as sarcasm always does somehow.

> I also believe that lecturing others about communication on mailing
> lists, or social behaviour in general, is not helpful either. Unless, of
> course, you think being patronizing is more acceptable here than being
> ironic. I hope you don't.

I don't.

I did not want to "lecture" or to "patronize", but I wanted to express
my feelings and listen to what I may have done wrong.

On a more general topic, I hope you don't disagree with the addition
of the GNU kind communication guidelines that I recently mentioned in
the manual.

-- 
 Bastien

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

* Re: [PATCH] ox.el: Fix extra character deleted in org-export--update-included-link
  2020-02-13 11:01         ` Bastien
@ 2020-02-13 19:07           ` Adam Porter
  0 siblings, 0 replies; 7+ messages in thread
From: Adam Porter @ 2020-02-13 19:07 UTC (permalink / raw)
  To: emacs-orgmode

Dear Nicolas and Bastien,

I feel like a child whose parents are fighting.  :)  If I may speak for
other Org users: you're invaluable to us, and we look up to you.  Please
don't let the deficiencies inherent in online, textual communication
cause deterioration in your fellowship.

With gratitude for all your contributions,
Adam

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

end of thread, other threads:[~2020-02-13 19:07 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-11-03 13:14 [PATCH] ox.el: Fix extra character deleted in org-export--update-included-link Christoffer Stjernlöf
2020-02-11 15:55 ` Bastien
2020-02-11 18:15   ` Nicolas Goaziou
2020-02-13  8:12     ` Bastien
2020-02-13 10:25       ` Nicolas Goaziou
2020-02-13 11:01         ` Bastien
2020-02-13 19:07           ` Adam Porter

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