From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: Using orgtbl-mode with markdown: hfmt1 Date: Thu, 14 Sep 2017 15:51:27 +0200 Message-ID: <87fubpl76o.fsf@nicolasgoaziou.fr> References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:45998) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dsUYG-0007v3-4W for emacs-orgmode@gnu.org; Thu, 14 Sep 2017 09:51:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dsUYF-0000x7-6s for emacs-orgmode@gnu.org; Thu, 14 Sep 2017 09:51:32 -0400 Received: from relay4-d.mail.gandi.net ([2001:4b98:c:538::196]:40779) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dsUYF-0000u7-18 for emacs-orgmode@gnu.org; Thu, 14 Sep 2017 09:51:31 -0400 In-Reply-To: (Carsten Bormann's message of "Tue, 12 Sep 2017 15:15:06 +0200") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: Carsten Bormann Cc: emacs-orgmode@gnu.org Hello, Carsten Bormann writes: > As is, orgtbl-mode is a great addition to markdown-mode. > > There is one snag: > > The markdown table syntax isn=E2=80=99t 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: + =E2=9E=94 | > > Works perfectly. But it would be nice not to have to apply this patch ea= ch time I update. > > Would it be possible to make hfmt1 configurable? > (Preferably, using a buffer-local variable so I don=E2=80=99t have to bre= ak > 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, --=20 Nicolas Goaziou