GNU bug report logs - #31273
27.0.50; org: #+begin_right block is not exported correctly

Previous Next

Package: org-mode;

Reported by: Dmitry Alexandrov <321942 <at> gmail.com>

Date: Thu, 26 Apr 2018 15:08:02 UTC

Severity: normal

Done: Nicolas Goaziou <mail <at> nicolasgoaziou.fr>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 31273 in the body.
You can then email your comments to 31273 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#31273; Package emacs. (Thu, 26 Apr 2018 15:08:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Dmitry Alexandrov <321942 <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Thu, 26 Apr 2018 15:08:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Dmitry Alexandrov <321942 <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 27.0.50; org: #+begin_right block is not exported correctly
Date: Thu, 26 Apr 2018 18:06:25 +0300
[Message part 1 (text/plain, inline)]
Dear maintainers,

with the latest Emacs from git master, exporting #+begin_right block
neither to HTML, nor to ODT (didn’t test other options) does not work
as expected, while this should be pretty possible with both.

With HTML, as far as I can see, the problem is in that, so a CSS class
is named ‘org-right’:

--8<---------------cut here---------------start------------->8---
  .org-right  { margin-left: auto; margin-right: 0px;  text-align: right; }
--8<---------------cut here---------------end--------------->8---

while in the HTML it is referenced as just ‘right’:

--8<---------------cut here---------------start------------->8---
<div class="right">
--8<---------------cut here---------------end--------------->8---
[signature.asc (application/pgp-signature, inline)]

bug reassigned from package 'emacs' to 'org-mode'. Request was from Glenn Morris <rgm <at> gnu.org> to control <at> debbugs.gnu.org. (Thu, 26 Apr 2018 15:22:02 GMT) Full text and rfc822 format available.

bug No longer marked as found in versions 27.0.50. Request was from Glenn Morris <rgm <at> gnu.org> to control <at> debbugs.gnu.org. (Thu, 26 Apr 2018 15:22:02 GMT) Full text and rfc822 format available.

Information forwarded to emacs-orgmode <at> gnu.org:
bug#31273; Package org-mode. (Sat, 28 Apr 2018 14:09:02 GMT) Full text and rfc822 format available.

Message #12 received at 31273 <at> debbugs.gnu.org (full text, mbox):

From: Nicolas Goaziou <mail <at> nicolasgoaziou.fr>
To: Dmitry Alexandrov <321942 <at> gmail.com>
Cc: 31273 <at> debbugs.gnu.org
Subject: Re: bug#31273: 27.0.50;
 org: #+begin_right block is not exported correctly
Date: Sat, 28 Apr 2018 16:08:51 +0200
Hello,

Dmitry Alexandrov <321942 <at> gmail.com> writes:

> with the latest Emacs from git master, exporting #+begin_right block
> neither to HTML, nor to ODT (didn’t test other options) does not work
> as expected, while this should be pretty possible with both.
>
> With HTML, as far as I can see, the problem is in that, so a CSS class
> is named ‘org-right’:
>
>   .org-right  { margin-left: auto; margin-right: 0px;  text-align: right; }
>
>
> while in the HTML it is referenced as just ‘right’:
>
> <div class="right">

".org-right" is an internal CSS class for table alignment.

OTOH, "#+begin_right" starts a special block that, as expected, create
a "right" div.

So, there is no issue here. You can either define "right" CSS, or
(untested), try "#+begin_org-right".

Regards,

-- 
Nicolas Goaziou                                                0x80A93738




Information forwarded to emacs-orgmode <at> gnu.org:
bug#31273; Package org-mode. (Sat, 28 Apr 2018 14:54:01 GMT) Full text and rfc822 format available.

Message #15 received at 31273 <at> debbugs.gnu.org (full text, mbox):

From: Dmitry Alexandrov <321942 <at> gmail.com>
To: Nicolas Goaziou <mail <at> nicolasgoaziou.fr>
Cc: 31273 <at> debbugs.gnu.org
Subject: Re: bug#31273: 27.0.50;
 org: #+begin_right block is not exported correctly
Date: Sat, 28 Apr 2018 17:53:24 +0300
[Message part 1 (text/plain, inline)]
Nicolas Goaziou <mail <at> nicolasgoaziou.fr> wrote:
> Dmitry Alexandrov <321942 <at> gmail.com> writes:
>> with the latest Emacs from git master, exporting #+begin_right block
>> neither to HTML, nor to ODT (didn’t test other options) does not work
>> as expected, while this should be pretty possible with both.
>>
>> With HTML, as far as I can see, the problem is in that, so a CSS class
>> is named ‘org-right’:
>>
>>   .org-right  { margin-left: auto; margin-right: 0px;  text-align: right; }
>>
>>
>> while in the HTML it is referenced as just ‘right’:
>>
>> <div class="right">
>
> ".org-right" is an internal CSS class for table alignment.
>
> OTOH, "#+begin_right" starts a special block that, as expected, create
> a "right" div.
>
> So, there is no issue here. You can either define "right" CSS, or
> (untested), try "#+begin_org-right".

Thank you for a response, #+begin_org-right block indeed works like a charm.

Now, I am not sure, whether am I supposed to use #+begin_org-center blocks instead of #+begin_center too.

In fact, given that #+begin_center creates a .org-center div block, that is centred by default CSS (and stylesheets of other formats), I found your answer absolutely surprising.

I would be probably not alone on this feeling; see, for instance, Fabrice Niessen’s Org mode syntax reference card [0], where (as far as I got it) #+begin_right is presented as alignment tag for paragraphs rather than tables:

--8<---------------cut here---------------start------------->8---
Centered text

#+begin_left
This text is \\
aligned to the left!
#+end_left

#+begin_center
This text is \\
centered!
#+end_center

#+begin_right
This text is \\
aligned to the right!
#+end_right
--8<---------------cut here---------------end--------------->8---

In a part for centring it is in accordance to (info "(org) Paragraphs"), which says:

--8<---------------cut here---------------start------------->8---
   If you would like to center some text, do it like this:
     #+BEGIN_CENTER
     Everything should be made as simple as possible, \\
     but not any simpler
     #+END_CENTER
--8<---------------cut here---------------end--------------->8---

[0] https://github.com/fniessen/refcard-org-mode
[signature.asc (application/pgp-signature, inline)]

Information forwarded to emacs-orgmode <at> gnu.org:
bug#31273; Package org-mode. (Sat, 28 Apr 2018 15:13:02 GMT) Full text and rfc822 format available.

Message #18 received at 31273 <at> debbugs.gnu.org (full text, mbox):

From: Nicolas Goaziou <mail <at> nicolasgoaziou.fr>
To: Dmitry Alexandrov <321942 <at> gmail.com>
Cc: 31273 <at> debbugs.gnu.org
Subject: Re: bug#31273: 27.0.50;
 org: #+begin_right block is not exported correctly
Date: Sat, 28 Apr 2018 17:12:51 +0200
Dmitry Alexandrov <321942 <at> gmail.com> writes:

> Now, I am not sure, whether am I supposed to use #+begin_org-center
> blocks instead of #+begin_center too.

The latter. As I explained, ".org-center" is an internal style.

> In fact, given that #+begin_center creates a .org-center div block,
> that is centred by default CSS (and stylesheets of other formats),
> I found your answer absolutely surprising.

"Center" blocks are defined in the manual, along with their syntax.
There is nothing surprising.

Moreover, there is no such thing as a "Right" block. Or, more precisely,
this falls into the special block category, which is handled differently
in each export back-end.

> I would be probably not alone on this feeling; see, for instance,
> Fabrice Niessen’s Org mode syntax reference card [0], where (as far as
> I got it) #+begin_right is presented as alignment tag for paragraphs
> rather than tables:

This reference card is not an official reference card.

In any case, let me insist again on the following point: you can use
"#+begin_right" in HTML to your heart's content if you define the
appropriate CSS property.




Information forwarded to emacs-orgmode <at> gnu.org:
bug#31273; Package org-mode. (Sat, 28 Apr 2018 15:35:02 GMT) Full text and rfc822 format available.

Message #21 received at 31273 <at> debbugs.gnu.org (full text, mbox):

From: Dmitry Alexandrov <321942 <at> gmail.com>
To: Nicolas Goaziou <mail <at> nicolasgoaziou.fr>
Cc: 31273 <at> debbugs.gnu.org
Subject: Re: bug#31273: 27.0.50;
 org: #+begin_right block is not exported correctly
Date: Sat, 28 Apr 2018 18:33:50 +0300
[Message part 1 (text/plain, inline)]
Nicolas Goaziou <mail <at> nicolasgoaziou.fr> wrote:
> Dmitry Alexandrov <321942 <at> gmail.com> writes:
>
>> Now, I am not sure, whether am I supposed to use #+begin_org-center
>> blocks instead of #+begin_center too.
>
> The latter. As I explained, ".org-center" is an internal style.
>
>> In fact, given that #+begin_center creates a .org-center div block,
>> that is centred by default CSS (and stylesheets of other formats),
>> I found your answer absolutely surprising.
>
> "Center" blocks are defined in the manual, along with their syntax.

Thank you, I will.

> There is nothing surprising.
>
> Moreover, there is no such thing as a "Right" block. Or, more precisely,
> this falls into the special block category, which is handled differently
> in each export back-end.
>
>> I would be probably not alone on this feeling; see, for instance,
>> Fabrice Niessen’s Org mode syntax reference card [0], where (as far as
>> I got it) #+begin_right is presented as alignment tag for paragraphs
>> rather than tables:
>
> This reference card is not an official reference card.

Yes, I fully realize that.

Just another unofficial reference card [0], by Caio Rordrigues at that time, that again states that:

--8<---------------cut here---------------start------------->8---
#+begin_right
This text is
aligned to the right!
#+end_right
--8<---------------cut here---------------end--------------->8---

These persons are probably consider themselves highly familiar with Org, yet they have been mistaken.  What to say about novices!  So the absence of this feature is indeed highly unobvious.  That’s the only point I am trying to make.

[0] https://github.com/caiorss/Emacs-Elisp-Programming/blob/master/Org-Mode.org#text-position

> In any case, let me insist again on the following point: you can use
> "#+begin_right" in HTML to your heart's content if you define the
> appropriate CSS property.

If there is no plan to make into default as with centring, a warning might be very apt.

Thank you again for your work on the Org.
[signature.asc (application/pgp-signature, inline)]

Information forwarded to emacs-orgmode <at> gnu.org:
bug#31273; Package org-mode. (Sat, 28 Apr 2018 16:24:01 GMT) Full text and rfc822 format available.

Message #24 received at 31273 <at> debbugs.gnu.org (full text, mbox):

From: Nicolas Goaziou <mail <at> nicolasgoaziou.fr>
To: Dmitry Alexandrov <321942 <at> gmail.com>
Cc: 31273 <at> debbugs.gnu.org
Subject: Re: bug#31273: 27.0.50;
 org: #+begin_right block is not exported correctly
Date: Sat, 28 Apr 2018 18:23:38 +0200
Dmitry Alexandrov <321942 <at> gmail.com> writes:

> Just another unofficial reference card [0], by Caio Rordrigues at that time, that again states that:
>
> #+begin_right This text is aligned to the right! #+end_right
>
> These persons are probably consider themselves highly familiar with
> Org, yet they have been mistaken. What to say about novices! So the
> absence of this feature is indeed highly unobvious. That’s the only
> point I am trying to make.
>
> [0] https://github.com/caiorss/Emacs-Elisp-Programming/blob/master/Org-Mode.org#text-position
>
>> In any case, let me insist again on the following point: you can use
>> "#+begin_right" in HTML to your heart's content if you define the
>> appropriate CSS property.
>
> If there is no plan to make into default as with centring, a warning
> might be very apt.

The issue here is that "#+begin_right" is perfectly valid syntax, and so
is, e.g., "#+begin_foobar". Their behaviour is perfectly defined. For
example, in HTML export the will create <div class="right"> and <div
class="foobar"> if you have a nil `org-html-html5-fancy', or <right> and
<foobar> otherwise.

Therefore, a warning is not an option here. Only a careful read of the
manual can help clearing the misconception about what is included in Org
and what can be extended.

Now, it's true that at some point, Org defined a ".right" CSS rule
instead of ".org-right", so "#+begin_right" could work out of the box, but
only in the HTML export. However, this was not the intent.

For the record any "#+begin_XXX" construct that has no particular
meaning in Org may be treated specially by export back-ends (or ignored
altogether). It is often a way to write a specific environment.




Reply sent to Nicolas Goaziou <mail <at> nicolasgoaziou.fr>:
You have taken responsibility. (Sat, 07 Jul 2018 11:12:03 GMT) Full text and rfc822 format available.

Notification sent to Dmitry Alexandrov <321942 <at> gmail.com>:
bug acknowledged by developer. (Sat, 07 Jul 2018 11:12:03 GMT) Full text and rfc822 format available.

Message #29 received at 31273-done <at> debbugs.gnu.org (full text, mbox):

From: Nicolas Goaziou <mail <at> nicolasgoaziou.fr>
To: 31273-done <at> debbugs.gnu.org
Subject: bug#31273: 27.0.50; org: #+begin_right block is not exported correctly
Date: Sat, 07 Jul 2018 13:11:48 +0200
I'm closing this report, which is not considered as a bug.

-- 
Nicolas Goaziou                                                0x80A93738




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 04 Aug 2018 11:24:06 GMT) Full text and rfc822 format available.

This bug report was last modified 5 years and 238 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.