From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.help Subject: Re: Collapse all include lines? Date: Sun, 15 May 2022 08:13:22 +0300 Message-ID: <834k1rl6od.fsf@gnu.org> References: <83v8u8ljmb.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="31090"; mail-complaints-to="usenet@ciao.gmane.io" To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Sun May 15 07:14:35 2022 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nq6aR-0007vs-4E for geh-help-gnu-emacs@m.gmane-mx.org; Sun, 15 May 2022 07:14:35 +0200 Original-Received: from localhost ([::1]:44916 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nq6aP-00057f-OJ for geh-help-gnu-emacs@m.gmane-mx.org; Sun, 15 May 2022 01:14:33 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:46488) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nq6ZX-00057H-PI for help-gnu-emacs@gnu.org; Sun, 15 May 2022 01:13:39 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:42840) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nq6ZX-00026V-Gb for help-gnu-emacs@gnu.org; Sun, 15 May 2022 01:13:39 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=kOInlHZmoXmDXDTuERmKrYYpKz2jIC8BTVu7+FpIWz4=; b=b1ENPEpGICNR QLtpRCa/4V4pewC9TgF18AgcOsmNUd3b4wg6t8xosAXe2ImAK0zgMZQ/Kejpwird+49db6X8ljqLI y8KWNV3SzoO8ZaGO02Jhql3bxDON9jcZ0AsO5LPURGQfScLH5X3e0MAKnMeQaOcXYTVjqOiCwBx/6 mWWmaDNQCy/jX0xpFQigTx8Ef/o1KRlS8VQpajEPid2gWN1BGhTkIguhNPk5oPJ4Y4qgIXswc2edU 1bcz/80Dz3YNz9RPra+JZ2tSyEofjhDZccZKysZlxWX9lO9liR0cFIdKKfluK8wPyOnnprlV40+Ez Qdo6w0LJyx/Q/5sU2XGDig==; Original-Received: from [87.69.77.57] (port=1883 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nq6ZU-0005tP-US for help-gnu-emacs@gnu.org; Sun, 15 May 2022 01:13:37 -0400 In-Reply-To: (message from John Yates on Sat, 14 May 2022 16:17:16 -0400) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 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-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:137264 Archived-At: > From: John Yates > Date: Sat, 14 May 2022 16:17:16 -0400 > Cc: Help Gnu Emacs mailing list > > On Sat, May 14, 2022 at 2:21 AM Eli Zaretskii wrote: > > > > Did you look at hideif.el? > > No I did not. But now that I have, it is largely what > I recall and does not seem to meet my needs. > > hideif is focussed on understanding preprocessor > #if constructs and their attendant expressions. > > My need is much simpler. I simply want to identify > a run of #include lines with potentially interleaved > blank (and maybe comment?) lines. When I open > a file I would like all those lines hidden. On rather > rare occasions I may need to expose those lines. > But, by and large, I do not want to see them Is it conceivable to wrap those #include lines by something like #ifndef DON'T_WANT_TO_SEE ... #endif ? If so, you could then teach hideif.el to hide this block. Another possibility (100% unexplored) is to define a jit-lock function which will put the 'invisible' property on such a block (assuming it can be easily identified).