emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Ihor Radchenko <yantar92@posteo.net>
To: "G. Branden Robinson" <g.branden.robinson@gmail.com>
Cc: emacs-orgmode@gnu.org, groff@gnu.org, Ingo Schwarze <schwarze@usta.de>
Subject: Re: [BUG] "\fC" macro in ox-man.el [9.6.15 (release_9.6.15 @ /usr/share/emacs/29.2/lisp/org/)]
Date: Tue, 31 Dec 2024 18:15:57 +0000	[thread overview]
Message-ID: <87bjwrhg6a.fsf@localhost> (raw)
In-Reply-To: <20241231170034.nzmponxxjppqrhf5@illithid>

"G. Branden Robinson" <g.branden.robinson@gmail.com> writes:

> I understand now.  I've taken some time to learn a bit more about Org
> mode, and also that org-man.el seems to be something close to the
> bleeding edge; in a Debian unstable chroot it was not provided by the
> version of GNU Emacs (29.4) nor the "elpa-org" package (9.7.16).

You looked up wrong file.
Not org-man.el, but ox-man.el.
It is a part of Org mode since forever (introduced before Org 4.12a -
the first tagged release in our git repo - Jan 31, 2008; 16 years ago).

> So I'll make some recommendations unfortunately without the benefit of
> having field-tested them.

You can do the following to try exporting to man from Emacs 29.4:

1. emacs -Q
2. M-: (require 'ox-man) RET
3. Open a sample .org file
4. C-c C-e M m

(4) will produce a man file named after the .org file, in the same directory.

>> And this discussion was about using \fC to represent "code" (also,
>> "fixed width" and tables). We use \fC historically, and it is not very
>> clear what could be a replacement that does not break Man export
>> compared to previously produced results.
>
> The answer depends on how portable you want your man(7) output to be.  A
> major reason is that font names are not portable across output
> devices;...

1. We want to avoid breaking cases when \fC did work (it is a minimum)
2. Ideally, we want things to work in _more_ cases
3. Even more ideally, we want things to work in all the cases

If (1) is not possible, compromises will have to be made. I hope that we
do not have to make compromises.

Also, what if we leave \fC and add \f[CR]/.EX on top?
AFAIU, the worst case scenario for \fC is that it does nothing. By
leaving it there, we thus retain old working exports working while also
adding appropriate format when \f[CR] is supported.

>> From my reading of man 7 man, .EX/.EE are more suitable for paragraph
>> markup:
> ...
> Yes.  `EX`/`EE` works only with "displays".

May you elaborate about the meaning of "displays"?

> But it is worth noting that `EX`/`EE` is _more_ portable than `\fC`.

In non-inclusive manner though. (cases when \fC works are not a subset
of cases where EX/EE works). Correct me if I am wrong.

> (I would also delete that trailing "\n".  Avoid blank lines in man(7)
> input.[3])

Do I understand correctly that blank line is sometimes interpreted as
vertical spacing and sometimes ignored?

> (As another aside, the stroke color selection escape sequences `\m` are
> (a) GNU troff extensions, albeit supported by the same formatters that
> `\f[CR]` is, but (b) probably unnecessary because nothing else in this
> entire file seems to use any other color for anything.)

May black sometimes be different from the default color?

> You can test a generated man(7) document by asking groff(1) and man(7)
> to lint it.
>
> $ groff -ww -rCHECKSTYLE=3 -man my-org-doc.man

Thanks! This might be a good thing to add to our tests.

-- 
Ihor Radchenko // yantar92,
Org mode maintainer,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>


  reply	other threads:[~2024-12-31 18:15 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-01  7:51 [BUG] "\fC" macro in ox-man.el [9.6.15 (release_9.6.15 @ /usr/share/emacs/29.2/lisp/org/)] Xiyue Deng
2024-03-03 13:30 ` Ihor Radchenko
2024-03-12  0:06   ` Xiyue Deng
2024-03-13 11:25     ` Ihor Radchenko
2024-03-14 21:46       ` Jeremy Sowden
2024-05-22  9:54         ` Ihor Radchenko
2024-12-18 17:20         ` G. Branden Robinson
2024-12-22 15:41           ` Ihor Radchenko
2024-12-31 17:00             ` G. Branden Robinson
2024-12-31 18:15               ` Ihor Radchenko [this message]
2024-12-31 18:42                 ` onf
2024-12-31 18:54                   ` onf
2025-01-01  9:38                   ` Ihor Radchenko
2025-01-01 12:30                     ` onf
2025-01-02 14:29                       ` onf
2025-01-02 17:47                       ` [BUG] ox-man: Nested markup is broken (was: [BUG] "\fC" macro in ox-man.el [9.6.15 (release_9.6.15 @ /usr/share/emacs/29.2/lisp/org/)]) Ihor Radchenko
2025-01-02 21:51                         ` onf
2025-01-03  8:38                           ` [BUG] "\fC" macro in ox-man.el [9.6.15 (release_9.6.15 @ /usr/share/emacs/29.2/lisp/org/)] G. Branden Robinson
2025-01-04  0:23                             ` onf
2025-01-04  6:37                               ` G. Branden Robinson
2025-01-04 20:10                                 ` onf
2025-01-05 15:24                                   ` Lennart Jablonka
2025-01-04 13:26                             ` Ihor Radchenko
2025-01-04 16:22                               ` Dave Kemper
2025-01-04 17:37                                 ` Ihor Radchenko
2025-01-02 12:14                     ` G. Branden Robinson
2025-01-04 12:21                       ` Ihor Radchenko
2025-01-02 12:38                 ` G. Branden Robinson
2025-01-02 14:21                   ` onf
2025-01-04 12:36                   ` Ihor Radchenko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87bjwrhg6a.fsf@localhost \
    --to=yantar92@posteo.net \
    --cc=emacs-orgmode@gnu.org \
    --cc=g.branden.robinson@gmail.com \
    --cc=groff@gnu.org \
    --cc=schwarze@usta.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).