emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Nicolas Goaziou <mail@nicolasgoaziou.fr>
To: Carsten Bormann <cabo@tzi.org>
Cc: emacs-orgmode@gnu.org
Subject: Re: Using orgtbl-mode with markdown: hfmt1
Date: Thu, 14 Sep 2017 15:51:27 +0200	[thread overview]
Message-ID: <87fubpl76o.fsf@nicolasgoaziou.fr> (raw)
In-Reply-To: <B6DBCE1C-32CD-4F7F-B2B6-96DE5DCE3F1E@tzi.org> (Carsten Bormann's message of "Tue, 12 Sep 2017 15:15:06 +0200")

Hello,

Carsten Bormann <cabo@tzi.org> writes:

> As is, orgtbl-mode is a great addition to markdown-mode.
>
> There is one snag:
>
> The markdown table syntax isn’t fully standardized.
> A number of implementations react unfavorable to the + characters that
> orgtbl-mode uses as a column/row separator in the line separating the
> header from the body of the table; they prefer the | character here as
> well.
>
> So I apply this little patch in org-table-align each time I install a new version of org-mode:
>
> org-table.el
> 874c158
> <              (hfmt1 "-%s-+"))
> ---
>>              (hfmt1 "-%s-|"))           ; HACK: + ➔ |
>
> Works perfectly.  But it would be nice not to have to apply this patch each time I update.
>
> Would it be possible to make hfmt1 configurable?
> (Preferably, using a buffer-local variable so I don’t have to break
> tables in org-mode proper?)

The point of orgtbl-mode is to edit Org tables, not Markdown tables,
which have a different syntax.

The usual workflow is to edit the Org mode tables and "send" it to
another location within the same buffer, applying some pre-defined
transformation. See (info "(org) Radio tables") for more information.

Another option is to add an advice on `org-table-align'. See
`add-advice'.

Regards,

-- 
Nicolas Goaziou

  parent reply	other threads:[~2017-09-14 13:51 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-12 13:15 Using orgtbl-mode with markdown: hfmt1 Carsten Bormann
2017-09-12 14:07 ` Kaushal Modi
2017-09-12 14:11   ` Kaushal Modi
2017-09-12 14:16   ` Carsten Bormann
2017-09-14 13:51 ` Nicolas Goaziou [this message]
2017-09-14 14:13   ` Carsten Bormann

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=87fubpl76o.fsf@nicolasgoaziou.fr \
    --to=mail@nicolasgoaziou.fr \
    --cc=cabo@tzi.org \
    --cc=emacs-orgmode@gnu.org \
    /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).