From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: sokobania.01@gmail.com Newsgroups: gmane.emacs.help Subject: Re: How to save invisible (lisp) data in a text file Date: Mon, 1 Sep 2014 01:31:45 -0700 (PDT) Message-ID: <8f2b566e-a25f-47fb-bc29-055e75cd35d4@googlegroups.com> References: <28bca27c-4c3a-4e9c-a765-89e294648368@googlegroups.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1409560528 28113 80.91.229.3 (1 Sep 2014 08:35:28 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 1 Sep 2014 08:35:28 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Sep 01 10:35:21 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 1XON56-00028l-Ux for geh-help-gnu-emacs@m.gmane.org; Mon, 01 Sep 2014 10:35:21 +0200 Original-Received: from localhost ([::1]:52809 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XON56-0005sV-Hq for geh-help-gnu-emacs@m.gmane.org; Mon, 01 Sep 2014 04:35:20 -0400 X-Received: by 10.43.152.197 with SMTP id kx5mr16225802icc.9.1409560305232; Mon, 01 Sep 2014 01:31:45 -0700 (PDT) X-Received: by 10.140.89.40 with SMTP id u37mr1606qgd.37.1409560305101; Mon, 01 Sep 2014 01:31:45 -0700 (PDT) Original-Path: usenet.stanford.edu!uq10no7846499igb.0!news-out.google.com!q8ni8qal.1!nntp.google.com!dc16no189706qab.1!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=213.39.33.67; posting-account=6AmU8QoAAABkSb2sbJisGlnlR_egh2hP Original-NNTP-Posting-Host: 213.39.33.67 User-Agent: G2/1.0 Injection-Date: Mon, 01 Sep 2014 08:31:45 +0000 Original-Xref: usenet.stanford.edu gnu.emacs.help:207275 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:99552 Archived-At: Le vendredi 29 ao=FBt 2014 22:03:14 UTC+2, Stefan Monnier a =E9crit=A0: > > I will just hide them using facemenu-set-invisible. >=20 > Please don't use facemenu-set-invisible. Instead add the `invisible' > property with `put-text-property' (which is basically what > facemenu-set-invisible does internally). >=20 > No: facemenu-set-invisible is a very little used thing, > that's basically useless in 99.99% of the cases. Hmmm. I think I need an explanation! In my GNU Emacs 24.3.1, facemenu-set-invisible is defined as: (defun facemenu-set-invisible (start end) "Make the region invisible. This sets the `invisible' text property; it can be undone with `facemenu-remove-special'." (interactive "r") (add-text-properties start end '(invisible t))) Imho, it seems: - It does exactly what I need (make the region invisible). - Its implementation is exactly the code you recommend. - Even if it's only 1 line of code, it's (a little bit)=20 higher level than this mere line of code. - It has the same implementation within Xemacs. I imagine there is probably very little chance=20 that this implementation changes. Without your warning, I would have preferred to use a high level function that makes the region invisible rather than=20 having to deal with the internal aspects of doing that=20 (I mean "rather than adding text properties"). So, can you explain why you don't recommend to use it? Is it that anyone who wants to make the region invisible should know that it must be done with text properties?