From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.bugs Subject: bug#21798: 25.0.50; [PATCH] Add support for retrieving paths to JSON elements Date: Sat, 31 Oct 2015 16:23:35 +0200 Message-ID: <5634CEE7.3070200@yandex.ru> References: <1446281162.2607.0@smtp.gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1446301472 13686 80.91.229.3 (31 Oct 2015 14:24:32 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 31 Oct 2015 14:24:32 +0000 (UTC) To: Simen =?UTF-8?Q?Heggest=C3=B8yl?= , 21798@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Oct 31 15:24:20 2015 Return-path: Envelope-to: geb-bug-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 1ZsX4s-000164-W7 for geb-bug-gnu-emacs@m.gmane.org; Sat, 31 Oct 2015 15:24:19 +0100 Original-Received: from localhost ([::1]:55886 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZsX4r-0006T3-SY for geb-bug-gnu-emacs@m.gmane.org; Sat, 31 Oct 2015 10:24:17 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:51309) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZsX4h-0006Sv-Um for bug-gnu-emacs@gnu.org; Sat, 31 Oct 2015 10:24:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZsX4d-0002ML-28 for bug-gnu-emacs@gnu.org; Sat, 31 Oct 2015 10:24:07 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:56556) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZsX4c-0002MH-US for bug-gnu-emacs@gnu.org; Sat, 31 Oct 2015 10:24:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1ZsX4c-0005qU-Dq for bug-gnu-emacs@gnu.org; Sat, 31 Oct 2015 10:24:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 31 Oct 2015 14:24:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 21798 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 21798-submit@debbugs.gnu.org id=B21798.144630144122463 (code B ref 21798); Sat, 31 Oct 2015 14:24:02 +0000 Original-Received: (at 21798) by debbugs.gnu.org; 31 Oct 2015 14:24:01 +0000 Original-Received: from localhost ([127.0.0.1]:47264 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZsX4a-0005qE-Gj for submit@debbugs.gnu.org; Sat, 31 Oct 2015 10:24:00 -0400 Original-Received: from mail-wm0-f45.google.com ([74.125.82.45]:36622) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZsX4F-0005pl-Ae for 21798@debbugs.gnu.org; Sat, 31 Oct 2015 10:23:58 -0400 Original-Received: by wmec75 with SMTP id c75so30657974wme.1 for <21798@debbugs.gnu.org>; Sat, 31 Oct 2015 07:23:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:subject:to:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-type:content-transfer-encoding; bh=AzojM6k8aImsMcU2/3oe1kKd6bVgZUdE8JBw66IIAHk=; b=VpW4FLw5IijNJVRhrikY966ag5cM8zqGfh7w2hUpCmcx42sHj9NkhVHJ+3NjKyO+XG f9JyAk+AskgcDgSpVt7T1Q6m7GPqNN9HxjfoILDRcqbX6ucOqutsqhqcIFZQroOxEj2P 4hf4rELFYDvvPEslLpq5udkD3itQtU0HGRUUaNPKT9S3hIjGRVWS9Jlj+oVfO5zuPV9F P5hzXrVKzgjwQos9aMCi3dnh8q3bIXzlX0Qg5Z5MXwMrp+5bEG26aM0zUdIiMaTsU6Kp fgmssU5yvRE/QFLrocRwS2SaMRlwP6UUFMNTL5DC6Xp+ej8wEFUDAmn+y2JAtHjOkh+s 4M2A== X-Received: by 10.28.173.67 with SMTP id w64mr3891376wme.71.1446301418550; Sat, 31 Oct 2015 07:23:38 -0700 (PDT) Original-Received: from [10.9.0.103] (nat.webazilla.com. [78.140.128.228]) by smtp.googlemail.com with ESMTPSA id r12sm8128165wmd.17.2015.10.31.07.23.37 (version=TLSv1/SSLv3 cipher=OTHER); Sat, 31 Oct 2015 07:23:37 -0700 (PDT) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:42.0) Gecko/20100101 Thunderbird/42.0 In-Reply-To: <1446281162.2607.0@smtp.gmail.com> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:108236 Archived-At: On 10/31/2015 10:46 AM, Simen Heggestøyl wrote: > The proposed patch extends json.el with the ability to retrieve the > path to a particular JSON element. > > See the following video for an example of how it can be used by an > interactive command, to show the path to the JSON element at point: > > http://folk.uio.no/simenheg/json-mode.webm Hi Simen, The video looks great, but the inline patch lacks indentation, and doesn't apply (dunno if the former is the cause of the latter). Please resend it as an attachment. Without trying it, my main concern would be any performance regression to json-read (it's not particularly fast already). Have you done any benchmarking? Splitting the new changes into new functions might be more optimal.