From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Robert Thorpe Newsgroups: gmane.emacs.help Subject: Re: hideshow bug with json-mode Date: Thu, 07 May 2015 21:50:57 +0100 Message-ID: <87bnhw3ydq.fsf@robertthorpeconsulting.com> References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1431031890 22355 80.91.229.3 (7 May 2015 20:51:30 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 7 May 2015 20:51:30 +0000 (UTC) Cc: michael_heerdegen@web.de, help-gnu-emacs@gnu.org To: Andrew Pennebaker Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu May 07 22:51:15 2015 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 1YqSlG-0000aK-Mv for geh-help-gnu-emacs@m.gmane.org; Thu, 07 May 2015 22:51:14 +0200 Original-Received: from localhost ([::1]:52823 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YqSlG-00005p-3I for geh-help-gnu-emacs@m.gmane.org; Thu, 07 May 2015 16:51:14 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:53819) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YqSl5-00005k-Tr for help-gnu-emacs@gnu.org; Thu, 07 May 2015 16:51:05 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YqSl2-0008Hh-Oz for help-gnu-emacs@gnu.org; Thu, 07 May 2015 16:51:03 -0400 Original-Received: from outbound-smtp06.blacknight.com ([81.17.249.39]:48476) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YqSl2-0008Gm-Iv for help-gnu-emacs@gnu.org; Thu, 07 May 2015 16:51:00 -0400 Original-Received: from mail.blacknight.com (pemlinmail06.blacknight.ie [81.17.255.152]) by outbound-smtp06.blacknight.com (Postfix) with ESMTPS id B6F7A98525 for ; Thu, 7 May 2015 20:50:58 +0000 (UTC) Original-Received: (qmail 27840 invoked from network); 7 May 2015 20:50:58 -0000 Original-Received: from unknown (HELO RTLaptop) (rt@robertthorpeconsulting.com@[109.77.194.74]) by 81.17.254.9 with ESMTPSA (DHE-RSA-AES128-SHA encrypted, authenticated); 7 May 2015 20:50:58 -0000 In-Reply-To: (message from Andrew Pennebaker on Thu, 7 May 2015 09:02:55 -0500) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 81.17.249.39 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:104279 Archived-At: Try evaluating the following line: (push '(json-mode "{" "}" "/[*/]" nil) hs-special-modes-alist) Then try your example. Probably, the reason yafolding works is because it's indentation based. Hide-show is based on syntax, so it needs information from the mode on the syntax of blocks. When you say that nXML mode doesn't work, what do you mean? What XML code did you use to try it? BR, Robert Thorpe Andrew Pennebaker writes: > yafolding seems to fix this > problem for both JSON and XML files. > > On Thu, May 7, 2015 at 8:20 AM, Michael Heerdegen > wrote: > >> Andrew Pennebaker writes: >> >> > This problem only happens in certain major modes; python-mode with >> > hs-minor-mode works as expected, whereas json-mode with hs-minor-mode >> > features this problem. >> >> AFAIK hideshow does not work out of the box with every mode. It's >> possible that it needs configuration to make it work (see >> `hs-special-modes-alist'). Are you sure that the affected modes are >> supported? >> >> >> HTH, >> >> Michael. >> >> >>