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:40:23 +0000 Message-ID: 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 1526452753 7561 195.159.176.226 (16 May 2018 06:39:13 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 16 May 2018 06:39:13 +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:39:09 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 1fIq5c-0001sl-El for ged-emacs-devel@m.gmane.org; Wed, 16 May 2018 08:39:08 +0200 Original-Received: from localhost ([::1]:58062 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fIq7h-0001t5-Qy for ged-emacs-devel@m.gmane.org; Wed, 16 May 2018 02:41:17 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:36928) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fIq70-0001ss-5V for emacs-devel@gnu.org; Wed, 16 May 2018 02:40:35 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fIq6y-0000dl-Uh for emacs-devel@gnu.org; Wed, 16 May 2018 02:40:34 -0400 Original-Received: from mail-it0-x22b.google.com ([2607:f8b0:4001:c0b::22b]:36190) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fIq6y-0000dR-MJ for emacs-devel@gnu.org; Wed, 16 May 2018 02:40:32 -0400 Original-Received: by mail-it0-x22b.google.com with SMTP id e20-v6so8421931itc.1 for ; Tue, 15 May 2018 23:40:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=to:from:subject:message-id:date:user-agent:mime-version :content-language:content-transfer-encoding; bh=1HN8HYym5whz05edQxxk4bLnHtQVDr0mzTpqEg7ixYU=; b=TteBr3vgbT2hBKPtiShN/yXr1l2zDe2v9iWGti3RIP7qSYq6fyIKfIHMdlP6cEZDNl Ze5WdJ89XDc7LuSH5NWQ2SPuZG35Te8OR3f3d101MWVH/61SLFRpKQH1YFWj0aa6jxKz +fsHr7ywQm8RO//mQBnJpPAfhKu3yFjckBaj24u9JWqclxD4QfdMT5m2fXCfeawZupq5 1ICTwPaS8KjwoTXMo2DXofer0gl0cdxognf230VFOwLUDxzLiqnvTmAmcvbkWdJQperf bz0SgcN26howjxZWTLt+U2P3xDf7m+YvfLMeEaTq6wfeJ2JR6vSMLIQ7bh04uqbZvPx3 UUmw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:to:from:subject:message-id:date:user-agent :mime-version:content-language:content-transfer-encoding; bh=1HN8HYym5whz05edQxxk4bLnHtQVDr0mzTpqEg7ixYU=; b=VgUnniTyzP+eZNq8Rri/R1QUT39kDMP1Kz3NfNa/StATlp53P7dHoWtF1OhSPCaCEh 4onoFEaNWZzP6mdxcFZYlXnnt8h2HhRZ9P5xodcog4nwuw+OnSo5NhQBpRImzCutI5Xw 9aD1ZxAG+WJpd0egPoIoEssuQvOz2fudsXIU5HokAAitrkR65BIE/CUkShcib/USsXnO JVyF6vka6eGXo1qxRNy8h6VGMhRyy78PBfGhRS2tRTeGJxWlioOEMCp4mxQNrxwq5qIP ky5YiYJRgvTAImYajD/Tfdy7AtwteMnqXqLYRVNx4FYizUvVUWlXfc1eOmUL/3q/J0J1 Z70A== X-Gm-Message-State: ALKqPwenmg3o8JQzmHo4XWPtkULK8l0E7SQvMUwnGAeimwamT9nMK77T fLWhEchaN3t8A2Uc8c831Uc8ke7k X-Google-Smtp-Source: AB8JxZrU6mvoZINkH090F+AcczVe/PaLZq/Us3+H22J+bopJs82dxFOnUBokFvvw7POhq59mNBiDYQ== X-Received: by 2002:a6b:ba46:: with SMTP id k67-v6mr19213866iof.289.1526452831317; Tue, 15 May 2018 23:40:31 -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 r67-v6sm992650iod.27.2018.05.15.23.40.29 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 15 May 2018 23:40:30 -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::22b 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:225326 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).