From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: [PATCH] Longtable continuation strings customizable Date: Thu, 31 Oct 2013 11:19:17 +0100 Message-ID: <87habxagka.fsf@gmail.com> References: <87y55fb0kf.fsf@gmail.com> <87txg1agnz.fsf@gmail.com> <87li1d9uh4.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:34312) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vbq8g-00047O-36 for emacs-orgmode@gnu.org; Thu, 31 Oct 2013 07:10:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Vbq8Z-0000ni-SI for emacs-orgmode@gnu.org; Thu, 31 Oct 2013 07:10:10 -0400 Received: from mail-we0-x22f.google.com ([2a00:1450:400c:c03::22f]:45123) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VbpLJ-00030A-0R for emacs-orgmode@gnu.org; Thu, 31 Oct 2013 06:19:09 -0400 Received: by mail-we0-f175.google.com with SMTP id t61so2498102wes.34 for ; Thu, 31 Oct 2013 03:19:08 -0700 (PDT) In-Reply-To: (Thomas S. Dye's message of "Wed, 30 Oct 2013 06:36:21 -1000") 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-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: "Thomas S. Dye" Cc: Org-mode , Carsten Dominik Hello, tsd@tsdye.com (Thomas S. Dye) writes: > I have this, based on the example above: > > > #+name: tsd-continuation-strings > #+begin_src emacs-lisp > > (defun my-personal-table-continuation-strings (row backend info) > (when (org-export-derived-backend-p 'latex) > (replace-regexp-in-string > "multicolumn{[0-9]+}{l}{\\(.*\\)}" "\\ldots\\ continued from previous page" > row nil nil 1) > (replace-regexp-in-string > "multicolumn{[0-9]+}{r}{\\(.*\\)}" "continued on next page \\ldots" > row nil nil 1))) > (add-to-list 'org-export-filter-table-row-functions > 'my-personal-table-continuation-strings) > #+end_src > > I also tried 'org-export-filter-table-functions without success. I > always get the default continuation strings. I've looked around for an > error message, but there doesn't appear to be one, at least that I can > find. The asynchronous export runs through to completion. The first `replace-regexp-in-string' has to be applied to the return value of the second one. IOW they have to be nested. Also, you need to double again backslashes in replacement string, or use a non-nil LITERAL argument in `replace-regexp-in-string'. Eventually, I made a typo in my suggestion: the second line should be: (org-export-derived-backend-p backend 'latex) In a nutshell: (defun my-personal-table-continuation-strings (row backend info) (when (org-export-derived-backend-p backend 'latex) (replace-regexp-in-string "multicolumn{[0-9]+}{l}{\\(.*\\)}" "\\ldots\\ continued from previous page" (replace-regexp-in-string "multicolumn{[0-9]+}{r}{\\(.*\\)}" "continued on next page \\ldots" row nil t 1) nil t 1))) Regards, -- Nicolas Goaziou