From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Thorsten Jolitz Newsgroups: gmane.emacs.help Subject: [BUG] 'outline-change-heading' in outline-magic.el adds extra spaces Date: Mon, 18 Feb 2013 14:32:56 +0100 Message-ID: <874nh9lpbr.fsf@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1361194417 8153 80.91.229.3 (18 Feb 2013 13:33:37 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 18 Feb 2013 13:33:37 +0000 (UTC) Cc: dominik@science.uva.nl To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Feb 18 14:33:57 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 1U7Qqz-0004MG-1L for geh-help-gnu-emacs@m.gmane.org; Mon, 18 Feb 2013 14:33:57 +0100 Original-Received: from localhost ([::1]:44995 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U7Qqe-0001BD-NQ for geh-help-gnu-emacs@m.gmane.org; Mon, 18 Feb 2013 08:33:36 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:50038) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U7QqP-00016y-Ao for help-gnu-emacs@gnu.org; Mon, 18 Feb 2013 08:33:30 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U7QqK-0008Jt-Vt for help-gnu-emacs@gnu.org; Mon, 18 Feb 2013 08:33:21 -0500 Original-Received: from plane.gmane.org ([80.91.229.3]:43462) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U7QqK-0008Jj-PE for help-gnu-emacs@gnu.org; Mon, 18 Feb 2013 08:33:16 -0500 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1U7QqY-00047G-RS for help-gnu-emacs@gnu.org; Mon, 18 Feb 2013 14:33:30 +0100 Original-Received: from e178063133.adsl.alicedsl.de ([85.178.63.133]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 18 Feb 2013 14:33:30 +0100 Original-Received: from tjolitz by e178063133.adsl.alicedsl.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 18 Feb 2013 14:33:30 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 51 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: e178063133.adsl.alicedsl.de User-Agent: Gnus/5.130002 (Ma Gnus v0.2) Emacs/24.2 (gnu/linux) Cancel-Lock: sha1:Sgmq9pJNMzFarzi+3v55PPPK2Bc= 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:89141 Archived-At: Hi List, when using ,-------------------- | M-x outline-demote | M-x outline-promote `-------------------- with an outline-regexp that contains (trailing) spaces, like e.g. ,----------- | ";; [*]+ " `----------- a new space is added between the outline-regexp and the headline each time 'outline-demote' is used, and not removed afterwards when 'outline-promote' is used. E.g. ;; ** headline becomes ;; **** headline after demoting 2 times, and then becomes ;; ** headline after promoting again 2 times. Proposed FIX: replace the last line of 'outline-change-heading' in outline-magic.el ,-------------------------------------- | (replace-match newhead t t nil 1))))) `-------------------------------------- with ,-------------------------------------------------------------- | (replace-match (outline-cleanup-match newhead) t t nil 1))))) `-------------------------------------------------------------- -- cheers, Thorsten