From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Nicolas Richard Newsgroups: gmane.emacs.help Subject: Re: Arbitrary folding in emacs Date: Fri, 28 Mar 2014 13:26:34 +0100 Message-ID: <87bnwqa4qt.fsf@yahoo.fr> References: <834n2iy9dz.fsf@gnu.org> <83ob0qslyi.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1396009596 12460 80.91.229.3 (28 Mar 2014 12:26:36 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 28 Mar 2014 12:26:36 +0000 (UTC) Cc: "help-gnu-emacs@gnu.org" , C K Kashyap To: Tim Visher Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Mar 28 13:26:45 2014 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 1WTVrw-000565-FN for geh-help-gnu-emacs@m.gmane.org; Fri, 28 Mar 2014 13:26:44 +0100 Original-Received: from localhost ([::1]:33355 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WTVrv-0006VD-UQ for geh-help-gnu-emacs@m.gmane.org; Fri, 28 Mar 2014 08:26:43 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:48204) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WTVre-0006Us-4V for help-gnu-emacs@gnu.org; Fri, 28 Mar 2014 08:26:33 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WTVrW-0000Un-LV for help-gnu-emacs@gnu.org; Fri, 28 Mar 2014 08:26:26 -0400 Original-Received: from mxin.ulb.ac.be ([164.15.128.112]:37636) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WTVrW-0000Ue-FE for help-gnu-emacs@gnu.org; Fri, 28 Mar 2014 08:26:18 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ap4EALNpNVOkD4Xx/2dsb2JhbABZxwWBMXSCJgEBBHkQCAMhJQ8BBA08E4dkAQMRr1SaFgFKDYcvF4drhHOCHQeEOASWYIFthjaGNYVKgzE8gSwE Original-Received: from mathsrv4.ulb.ac.be (HELO geodiff-mac3) ([164.15.133.241]) by smtp.ulb.ac.be with ESMTP; 28 Mar 2014 13:26:17 +0100 In-Reply-To: (Tim Visher's message of "Fri, 28 Mar 2014 07:45:53 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 164.15.128.112 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:96801 Archived-At: Tim Visher writes: > I too would be interested in being able to hide away a region as vim > is capable of, but I've never heard of a feature like that in Emacs. > It might be a very useful extension to hs-minor-mode. outline.el has outline-flag-region, but (i) it doens't use an ellipsis and (ii) it is not interactive. you can test it by selecting some part of the buffer then M-: (progn (outline-flag-region (region-beginning) (region-end) t) (sit-for 4) (outline-flag-region (region-beginning) (region-end) nil)) (sit-for is just there to see the effect before cancelling it with the 'nil' 3rd argument) I think it doesn't exist because it requires to mark a portion of the buffer, whereas emacs has capabilities to be smarter than that (via hideshow or outline and some others yet), and emacs doesn't want to make non-smart things too easy. At least that's my conclusion after some time of using emacs and grumbling about the feature not being present :p -- Nico.