From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Julien Cubizolles Newsgroups: gmane.emacs.help Subject: Re: Question about string-match and match-string Date: Sun, 21 Jul 2013 10:15:41 +0200 Message-ID: <871u6sl45u.fsf@free.fr> References: <20130717081704.GB16899@kuru.dyndns-at-home.com> <20130717083511.GC16899@kuru.dyndns-at-home.com> <87sizdbmo2.fsf@gmx.us> <874nbsb8lw.fsf@free.fr> <87ppug469b.fsf@gmx.us> <874nbp8d6u.fsf@free.fr> <87d2qcuavi.fsf@gmx.us> <87siz8lp6a.fsf@gmx.us> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1374395599 22641 80.91.229.3 (21 Jul 2013 08:33:19 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 21 Jul 2013 08:33:19 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Jul 21 10:33:20 2013 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1V0p4x-0002yA-Nq for geh-help-gnu-emacs@m.gmane.org; Sun, 21 Jul 2013 10:33:19 +0200 Original-Received: from localhost ([::1]:36366 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V0p4w-0006YW-U5 for geh-help-gnu-emacs@m.gmane.org; Sun, 21 Jul 2013 04:33:18 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:44494) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V0p4m-0006YQ-KD for help-gnu-emacs@gnu.org; Sun, 21 Jul 2013 04:33:09 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1V0p4l-0001Tf-52 for help-gnu-emacs@gnu.org; Sun, 21 Jul 2013 04:33:08 -0400 Original-Received: from plane.gmane.org ([80.91.229.3]:47995) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1V0p4k-0001TO-V1 for help-gnu-emacs@gnu.org; Sun, 21 Jul 2013 04:33:07 -0400 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1V0p4j-0002sv-EL for help-gnu-emacs@gnu.org; Sun, 21 Jul 2013 10:33:05 +0200 Original-Received: from 37.160.25.158 ([37.160.25.158]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 21 Jul 2013 10:33:05 +0200 Original-Received: from j.cubizolles by 37.160.25.158 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 21 Jul 2013 10:33:05 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 21 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 37.160.25.158 User-Agent: Gnus/5.130008 (Ma Gnus v0.8) Emacs/24.3.50 (gnu/linux) Cancel-Lock: sha1:t+XBQdiON1T3haV4HpZt5zQy+Ao= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:92285 Archived-At: Rasmus writes: > This one is better. It's working fine, thanks a lot. There is still the strange _\textsc{ignoreheading} added to the default title. It's not really important since I always set the title. > (defun rasmus/org-latex-ignore-heading (headline backend info) > "Strip headline from HEADLINE if it has tag ignoreheading." > (when (org-export-derived-backend-p backend 'latex) > (let ((tags (org-element-property :tags > (plist-get > (text-properties-at > (or (string-match ".?\\(\\\\hfill\\|}\n\\)" headline) 0) headline) > :parent)))) > (when (and tags (member-ignore-case "ignoreheading" tags)) > (string-match "\\`.*\n.*\n" headline) > (replace-match "" nil nil headline))))) Julien.