From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Andrew Pennebaker Newsgroups: gmane.emacs.help Subject: hideshow bug with json-mode Date: Wed, 6 May 2015 12:37:57 -0500 Message-ID: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: ger.gmane.org 1430933894 25612 80.91.229.3 (6 May 2015 17:38:14 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 6 May 2015 17:38:14 +0000 (UTC) To: Emacs Help Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed May 06 19:38:14 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 1Yq3Gv-000818-LU for geh-help-gnu-emacs@m.gmane.org; Wed, 06 May 2015 19:38:13 +0200 Original-Received: from localhost ([::1]:46465 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yq3Gv-00088B-4t for geh-help-gnu-emacs@m.gmane.org; Wed, 06 May 2015 13:38:13 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:49785) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yq3Gi-00087u-7l for help-gnu-emacs@gnu.org; Wed, 06 May 2015 13:38:01 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Yq3Gh-0003Wt-1J for help-gnu-emacs@gnu.org; Wed, 06 May 2015 13:38:00 -0400 Original-Received: from mail-oi0-x236.google.com ([2607:f8b0:4003:c06::236]:34250) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yq3Gg-0003WY-Sy for help-gnu-emacs@gnu.org; Wed, 06 May 2015 13:37:58 -0400 Original-Received: by oiko83 with SMTP id o83so13564806oik.1 for ; Wed, 06 May 2015 10:37:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=pu4wz4IsTHLbmXlCLItyqgX9pfdbY7EMhbfyGH5Cu7o=; b=S4ZL3e/Ga3/tYnFhiIsiq5HnocogPGR6+RIojiOdwFvuiNNtEG4goV1N4PPjKa2007 LhWFuOBuyAee9zE/yiWtW3tZ2IvvW55e+Y9GAPWbeU7+LgvrolgXAmSDm6GCh97qL1ha KR8N4xREmUZ66dC6G99l0H832OuaWSB/6xz2qBAblWrrPUxYXcMBhw83Cwa4LmxPkkhX tGL4CvbqUzqnNEPXCVE89FJnChDyyICtjwJVo67tC57WSdl2hKZMu/8REX103NJUe2Fu opBjSnfbr5kVo/hzIiBtGzxFMplrIzSBGwuKOkRQo6PgR5F1lHcAhMCQ/mM5sq+CMRiU GzXQ== X-Received: by 10.182.133.40 with SMTP id oz8mr27454178obb.68.1430933877999; Wed, 06 May 2015 10:37:57 -0700 (PDT) Original-Received: by 10.76.125.169 with HTTP; Wed, 6 May 2015 10:37:57 -0700 (PDT) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:4003:c06::236 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 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:104245 Archived-At: If I don't carefully position my cursor right on the opening curly brace, then hideshow toggles the parent block instead of the current line's block. package.json: { "name": "dotfiles", "repository": { "type": "git" } } Steps to reproduce: M-g g 3 M-x hs-toggle-hiding RET Expected: { "name": "dotfiles", "repository": { ... } } Observed: { ... } 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. Any suggestions for configuration to work around this problem? I considered adding advice to automatically go to the end of line before toggling, but this doesn't work when re-showing the block, as the cursor needs to be on the brace ({), but before the ellipsis (...). -- Cheers, Andrew