From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Jefferson Carpenter Newsgroups: gmane.emacs.devel Subject: show-enclosing-scopes Date: Wed, 16 May 2018 06:41:20 +0000 Message-ID: <5cb3e5a6-310f-1f2a-ceb8-01b929158ebb@gmail.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: blaine.gmane.org 1526452826 12089 195.159.176.226 (16 May 2018 06:40:26 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 16 May 2018 06:40:26 +0000 (UTC) User-Agent: Mozilla/5.0 (Windows NT 6.2; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed May 16 08:40:22 2018 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fIq6n-00031e-Qa for ged-emacs-devel@m.gmane.org; Wed, 16 May 2018 08:40:21 +0200 Original-Received: from localhost ([::1]:58108 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fIq8u-0002Vx-Sg for ged-emacs-devel@m.gmane.org; Wed, 16 May 2018 02:42:32 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:37167) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fIq7t-0002ME-R6 for emacs-devel@gnu.org; Wed, 16 May 2018 02:41:30 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fIq7s-00014d-TR for emacs-devel@gnu.org; Wed, 16 May 2018 02:41:29 -0400 Original-Received: from mail-it0-x232.google.com ([2607:f8b0:4001:c0b::232]:38890) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fIq7s-00014J-Oi for emacs-devel@gnu.org; Wed, 16 May 2018 02:41:28 -0400 Original-Received: by mail-it0-x232.google.com with SMTP id q4-v6so8406690ite.3 for ; Tue, 15 May 2018 23:41:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:subject:to:message-id:date:user-agent:mime-version :content-language:content-transfer-encoding; bh=1HN8HYym5whz05edQxxk4bLnHtQVDr0mzTpqEg7ixYU=; b=FOGXEyvhLfsgl6+oczb94YTZrujdR00KOfI5FwU+0EeYkrnAp619P1+JxAy2sujPXE 1AlEE+kE4/zZk96PBtKDn7krKqmdaLpMxZYi/lf+f5j78klJzsOovjQTHA/eZ8Zyt7rw jX/K6e6lcbB55sINWyoERCOSLDEc0fjF+3V1E/Lgxz4GJqchSVKbt2x6lQ3HW0OsH9YS DysWoR2j7OqeCYZS9wDvUqRnD8WYa/x3RvyZVPbxS5b7Ms4TzqYj71z4AQTtJxqJ7q7u LqeA8BCedBuQCnRTITtb5tMVsDEdT8V4wkvLnGhFYLqF16yDqI5DRmxXw5857gWwYeEd uNXA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:subject:to:message-id:date:user-agent :mime-version:content-language:content-transfer-encoding; bh=1HN8HYym5whz05edQxxk4bLnHtQVDr0mzTpqEg7ixYU=; b=pDAt2GJGaL6r3pVQL2dLZZu4pRmgVpfoTAyvWbUGJEOvcJ6KilEbZ4GJ6rBUL1YZrs 6omFK31d3EBR3rROKTz15tccGnjzG2KvUA6quU6zGiiPmIm4OZjsJAek86QCHLtK9VRf H7AwjpLrhUGilb+hgPUxl+Bn87twemQRd0mp4ZaC0F1dGOl//lK8FIJUo9bnYWkKWkRp R46bSff+rQfEUt9vHokFO9lmteKaclBgVuDQvTf3/ITPx1xgrniJ2WENe65/OuTXT/JL MrHOb0Jt5E6+0WbVHTQnnirVviUSF8LvTz2tv4Ymcg4mnlkorcFl1HhbdpQDAuIo9tR/ 159g== X-Gm-Message-State: ALKqPwd37tbkhwDv2eLH/bCoSQ3G9dApKDALbomO67YG5jHc7rMcEMGK Mlnby0ytMYojfPPHG0jWnVUWYcVS X-Google-Smtp-Source: AB8JxZoSpHxthRClllYDkEhK1YDkJAD/vTcy0TtytydNS3ZLlY6DGntmBtH8znQ+4HvoMG1qpdUYlA== X-Received: by 2002:a6b:ac85:: with SMTP id v127-v6mr19208806ioe.286.1526452887869; Tue, 15 May 2018 23:41:27 -0700 (PDT) Original-Received: from ?IPv6:2601:441:8680:4631:a5e5:7463:6646:c0a9? ([2601:441:8680:4631:a5e5:7463:6646:c0a9]) by smtp.gmail.com with ESMTPSA id d37-v6sm1068844ioj.33.2018.05.15.23.41.26 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 15 May 2018 23:41:27 -0700 (PDT) Content-Language: en-US X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4001:c0b::232 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:225327 Archived-At: Just wrote a nifty little gadget that shows you the scopes you are inside of. Eval this buffer: https://raw.githubusercontent.com/jeffersoncarpenter/emacs.d/master/show-enclosing-scope.el Then move point around. A map of the scopes you're in appears at the top of the window. Useful for knowing where you are when you're paging up and down the file, or searching-forward for a text string, esp. in code with long functions. Main problem is that it's very flickery -- not 100% sure why, but I'm pretty sure the (redisplay) are part of the reason. I had to add those in order for (scroll-up) and (scroll-down) to interoperate properly with (goto-char).