From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Tassilo Horn Newsgroups: gmane.emacs.devel Subject: Re: Emacs development... Date: Sat, 21 Aug 2021 09:54:51 +0200 Message-ID: <87czq7usru.fsf@gnu.org> References: <56B1C272-CB13-4793-930C-9F6B96F9856B@traduction-libre.org> <83r1enz453.fsf@gnu.org> <87h7fjuuva.fsf@gnu.org> <351DF59E-BFE0-4CC2-8A40-B4E7CB73D81E@traduction-libre.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="10554"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: mu4e 1.6.3; emacs 28.0.50 Cc: Eli Zaretskii , emacs-devel@gnu.org To: Jean-Christophe Helary Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Aug 21 10:06:46 2021 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mHM1e-0002XS-Fj for ged-emacs-devel@m.gmane-mx.org; Sat, 21 Aug 2021 10:06:46 +0200 Original-Received: from localhost ([::1]:56138 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mHM1d-0007jS-Fn for ged-emacs-devel@m.gmane-mx.org; Sat, 21 Aug 2021 04:06:45 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:39958) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mHM0h-0006yY-1b for emacs-devel@gnu.org; Sat, 21 Aug 2021 04:05:47 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:39488) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mHM0g-0007bF-3Q; Sat, 21 Aug 2021 04:05:46 -0400 Original-Received: from auth1-smtp.messagingengine.com ([66.111.4.227]:40275) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mHM0f-0000LF-G8; Sat, 21 Aug 2021 04:05:45 -0400 Original-Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailauth.nyi.internal (Postfix) with ESMTP id EAF5F27C0064; Sat, 21 Aug 2021 04:05:44 -0400 (EDT) Original-Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Sat, 21 Aug 2021 04:05:44 -0400 X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvtddruddtudcutefuodetggdotefrodftvfcurf hrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecuuegr ihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjug hrpehffgfhvffuffgjkfggtgesthdtredttdertdenucfhrhhomhepvfgrshhsihhlohcu jfhorhhnuceothhsughhsehgnhhurdhorhhgqeenucggtffrrghtthgvrhhnpedvhfduve euvddtveeifeefhedvffeugeehjedtfffhieevledvgfehueejgfehffenucffohhmrghi nhepghhithhhuhgsrdgtohhmnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpe hmrghilhhfrhhomhepthhhohhrnhdomhgvshhmthhprghuthhhphgvrhhsohhnrghlihht hidqkeeijeefkeejkeegqdeifeehvdelkedqthhsughhpeepghhnuhdrohhrghesfhgrsh htmhgrihhlrdhfmh X-ME-Proxy: Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sat, 21 Aug 2021 04:05:43 -0400 (EDT) In-reply-to: <351DF59E-BFE0-4CC2-8A40-B4E7CB73D81E@traduction-libre.org> X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 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-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:272772 Archived-At: Jean-Christophe Helary writes: Hi Jean-Christophe, >>> Right now, I use C-h f to find the function definitions and move >>> around the code. >> >> That, and also M-. on a function call or variable will bring you to >> its definition. > > Thank you. > > Sorry for this very basic question, what's the best way to navigate > back to where I was ? I frequently use marks, i.e., hit C-SPC on an interesting place I wan't to come back and C-u C-SPC to jump back to previous marks. However, that works only "intra-buffer". I also use `imenu' a lot which is great if you already know where you want to go, i.e., you know the name of the function or variable. Also, isearch, occur, and rgrep. And the consult package [1] offers nice "go to thing" or "search for thing" commands. Finally, I'm currently test-driving the dogears package [2] which tries to provide a history of visited locations you can navigate back to by using session-scoped (i.e., not persisted) bookmarks. I currently use this config: --8<---------------cut here---------------start------------->8--- (use-package dogears :quelpa (dogears :fetcher github :repo "alphapapa/dogears.el") ;; These bindings are optional, of course: :bind (:map global-map ("M-g d" . dogears-go) ("M-g M-b" . dogears-back) ("M-g M-f" . dogears-forward) ("M-g M-l" . dogears-list) ("M-g M-r" . dogears-remember) ("M-g M-S" . dogears-sidebar)) :config (setq dogears-limit 300) (setq dogears-line-width 30) ;; Ignored modes (add-to-list 'dogears-ignore-modes 'git-commit-mode) ;; This will try popping up gnus-summary-buffer which makes no sense with ;; mu4e. (add-to-list 'dogears-ignore-modes 'mu4e-view-mode) ;; Trigger functions (add-to-list 'dogears-functions 'kill-ring-save) ;; Trigger hooks (add-hook 'dogears-hooks 'after-change-functions) :init (dogears-mode)) --8<---------------cut here---------------end--------------->8--- dogears will atomatically remember the current location after 5 seconds by default of idle time (assuming that you probably are reading concentrated). My config of `dogears-functions' and `dogears-hooks' remember places where I've copied text or edited which are most probably interesting enough I wanna come back. Bye, Tassilo [1] https://github.com/minad/consult [2] https://github.com/alphapapa/dogears.el