From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Marcin Borkowski Newsgroups: gmane.emacs.devel Subject: Re: Brave new mark-defun (and a testing tool) Date: Sun, 12 Feb 2017 11:13:51 +0100 Message-ID: <87lgtbiun4.fsf@mbork.pl> References: <87o9ydrzkr.fsf@mbork.pl> <87mvdriuss.fsf@mbork.pl> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1486894439 8218 195.159.176.226 (12 Feb 2017 10:13:59 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 12 Feb 2017 10:13:59 +0000 (UTC) User-Agent: mu4e 0.9.19; emacs 26.0.50.3 Cc: Emacs developers To: John Wiegley Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Feb 12 11:13:56 2017 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ccrAJ-0001m9-TS for ged-emacs-devel@m.gmane.org; Sun, 12 Feb 2017 11:13:56 +0100 Original-Received: from localhost ([::1]:51326 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ccrAN-0004st-Vi for ged-emacs-devel@m.gmane.org; Sun, 12 Feb 2017 05:14:00 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:47187) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ccr9n-0004sY-AC for emacs-devel@gnu.org; Sun, 12 Feb 2017 05:13:24 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ccr9k-00064G-5X for emacs-devel@gnu.org; Sun, 12 Feb 2017 05:13:23 -0500 Original-Received: from mail.mojserwer.eu ([195.110.48.8]:34460) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ccr9j-00064B-Uo for emacs-devel@gnu.org; Sun, 12 Feb 2017 05:13:20 -0500 Original-Received: from localhost (localhost [127.0.0.1]) by mail.mojserwer.eu (Postfix) with ESMTP id 615F1E6A25; Sun, 12 Feb 2017 11:13:19 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at mail.mojserwer.eu Original-Received: from mail.mojserwer.eu ([127.0.0.1]) by localhost (mail.mojserwer.eu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id D2SzZdSfZCp0; Sun, 12 Feb 2017 11:13:17 +0100 (CET) Original-Received: from localhost (static-dwadziewiec-jedenpiec7.echostar.pl [109.232.29.157]) by mail.mojserwer.eu (Postfix) with ESMTPSA id F3FCFE6A15; Sun, 12 Feb 2017 11:13:16 +0100 (CET) In-reply-to: <87mvdriuss.fsf@mbork.pl> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 195.110.48.8 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:212270 Archived-At: Hey, one more thing. On 2017-02-12, at 11:10, Marcin Borkowski wrote: > On 2017-02-12, at 08:09, John Wiegley wrote: > >> Can you clarify in what ways it is better? Reading through the text you >> attached did not make it obvious to me... Here's a fragment from one of Drew's messages from the thread I mentioned in my previous message. --8<---------------cut here---------------start------------->8--- What might be better? 1. At least consistency wrt which defun gets selected, when betweeen defuns. The doc suggests a general rule (the next defun), but that is not always respected. 2. Something consistent also wrt a comment before the defun that will be selected. 3. It could be good for a numeric prefix arg to select that many defuns. 4. It could be good for a negative prefix arg to select in the opposite direction. This is the main improvement I'd like to see. E.g. `M-- C-M-h' selects the previous defun; `M-2 C-M-h' selects the two previous defuns. Someone should play around and dream up something useful. Wrt #2, I'm not sure what the best approach might be. --8<---------------cut here---------------end--------------->8--- 5. I decided to mark the comment together with the defun if there is no empty line between the comment and the defun and leave it unmarked otherwise. I guess this is the most sensible approach I could think of. Best, -- Marcin Borkowski