From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#19102: 24.4; outline-move-subtree-up/down error at last and second-last subtree Date: Fri, 21 Nov 2014 12:42:56 +0200 Message-ID: <8361e84yxb.fsf@gnu.org> References: <87lhn7s522.fsf@rosalinde.fritz.box> <83lhn789tq.fsf@gnu.org> <87h9xvruan.fsf@rosalinde.fritz.box> <83tx1v6mur.fsf@gnu.org> <87a93nrlql.fsf@rosalinde.fritz.box> <83lhn76iex.fsf@gnu.org> <8761easv3s.fsf@rosalinde.fritz.box> <87r3wytcaa.fsf@rosalinde.fritz.box> <83vbm96dxs.fsf@gnu.org> <87oas0n8sr.fsf@rosalinde.fritz.box> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1416566666 20026 80.91.229.3 (21 Nov 2014 10:44:26 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 21 Nov 2014 10:44:26 +0000 (UTC) Cc: paul@tilk.co, 19102@debbugs.gnu.org To: Stephen Berman Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Nov 21 11:44:19 2014 Return-path: Envelope-to: geb-bug-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 1XrlhK-0002GX-K1 for geb-bug-gnu-emacs@m.gmane.org; Fri, 21 Nov 2014 11:44:18 +0100 Original-Received: from localhost ([::1]:39921 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XrlhK-0008HP-6R for geb-bug-gnu-emacs@m.gmane.org; Fri, 21 Nov 2014 05:44:18 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:38188) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XrlhB-0008Ge-BE for bug-gnu-emacs@gnu.org; Fri, 21 Nov 2014 05:44:14 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xrlh4-0002cj-W4 for bug-gnu-emacs@gnu.org; Fri, 21 Nov 2014 05:44:09 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:43095) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xrlh4-0002ce-T7 for bug-gnu-emacs@gnu.org; Fri, 21 Nov 2014 05:44:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1Xrlh4-0004uC-DI for bug-gnu-emacs@gnu.org; Fri, 21 Nov 2014 05:44:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 21 Nov 2014 10:44:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 19102 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 19102-submit@debbugs.gnu.org id=B19102.141656658318773 (code B ref 19102); Fri, 21 Nov 2014 10:44:02 +0000 Original-Received: (at 19102) by debbugs.gnu.org; 21 Nov 2014 10:43:03 +0000 Original-Received: from localhost ([127.0.0.1]:40308 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Xrlg7-0004sj-Cb for submit@debbugs.gnu.org; Fri, 21 Nov 2014 05:43:03 -0500 Original-Received: from mtaout29.012.net.il ([80.179.55.185]:43637) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Xrlg4-0004sJ-Nf for 19102@debbugs.gnu.org; Fri, 21 Nov 2014 05:43:02 -0500 Original-Received: from conversion-daemon.mtaout29.012.net.il by mtaout29.012.net.il (HyperSendmail v2007.08) id <0NFD00J00XESQP00@mtaout29.012.net.il> for 19102@debbugs.gnu.org; Fri, 21 Nov 2014 12:41:05 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by mtaout29.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NFD00DWTXOHRU60@mtaout29.012.net.il>; Fri, 21 Nov 2014 12:41:05 +0200 (IST) In-reply-to: <87oas0n8sr.fsf@rosalinde.fritz.box> X-012-Sender: halo1@inter.net.il X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:96369 > From: Stephen Berman > Cc: paul@tilk.co, 19102@debbugs.gnu.org > Date: Fri, 21 Nov 2014 11:32:20 +0100 > > > Does it make sense to fix outline-move-subtree-up/down so that they > > also work when there's no empty line after the last subtree? That's > > It didn't occur to me before, but your question prompted me to check and > I see outline-mode derives from text-mode, which sets > require-final-newline to mode-require-final-newline, so I guess the > assumption is indeed that files in outline-mode should end in a newline. Does doing that solve the problem without the need to delete the added line? > > one thing that looks inelegant in your patch, and might also cause > > some (minor) trouble: what if the user types C-g before this function > > finishes? > > We could avoid the trouble by wrapping the newline call in > unwind-protect, couldn't we? Yes, but it's better to avoid that in the first place. > But can C-g really take effect here? > There is no place in the function where execution halts to wait for user > feedback. C-g sets a flag that is checked by evaluation. > I guess those are idle speculations, it does seem that just keeping a > final newline added by the function is the simplest (and perhaps best) > fix, so I guess we should commit some version of that fix and see if > anyone complains. Go for it, and thanks.