unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Tassilo Horn <tsdh@gnu.org>
To: Jean-Christophe Helary <lists@traduction-libre.org>
Cc: Eli Zaretskii <eliz@gnu.org>, emacs-devel@gnu.org
Subject: Re: Emacs development...
Date: Sat, 21 Aug 2021 09:54:51 +0200	[thread overview]
Message-ID: <87czq7usru.fsf@gnu.org> (raw)
In-Reply-To: <351DF59E-BFE0-4CC2-8A40-B4E7CB73D81E@traduction-libre.org>

Jean-Christophe Helary <lists@traduction-libre.org> 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



  reply	other threads:[~2021-08-21  7:54 UTC|newest]

Thread overview: 50+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-21  5:07 Emacs development Jean-Christophe Helary
2021-08-21  6:46 ` Eli Zaretskii
2021-08-21  7:08   ` Jean-Christophe Helary
2021-08-21  7:16     ` Tassilo Horn
2021-08-21  7:50       ` Jean-Christophe Helary
2021-08-21  7:54         ` Tassilo Horn [this message]
2021-08-21  8:12           ` Eli Zaretskii
2021-08-21 13:51           ` Arthur Miller
2021-08-21 22:00           ` [External] : " Drew Adams
2021-08-21  8:08         ` Stephen Berman
2021-08-21 12:05         ` Konstantin Kharlamov
2021-08-21 12:28           ` Jean-Christophe Helary
2021-08-21 14:08             ` Tim Cross
2021-08-21 15:00               ` Jean-Christophe Helary
2021-08-21 23:09                 ` Tim Cross
2021-08-22  1:26                   ` Jean-Christophe Helary
2021-08-22  2:25                     ` Tim Cross
2021-08-22  2:15                   ` Arthur Miller
2021-08-22  2:48                     ` Tim Cross
2021-08-22  7:47                       ` Arthur Miller
2021-08-22  8:11                         ` Tim Cross
2021-08-22 13:54                           ` T.V Raman
2021-08-22 16:04                             ` Eric Abrahamsen
2021-08-22 16:19                               ` Jean-Christophe Helary
2021-08-22 16:23                                 ` Eric Abrahamsen
2021-08-22 16:25                                 ` Arthur Miller
2021-08-22 16:43                                   ` Jean-Christophe Helary
2021-08-22 16:29                               ` Arthur Miller
2021-08-22 17:08                               ` T.V Raman
2021-08-22 17:44                                 ` Arthur Miller
2021-08-22 18:34                                   ` Stephen Berman
2021-08-22 23:12                                     ` Arthur Miller
2021-08-23  9:17                                       ` Arthur Miller
2021-08-22 14:41                           ` Arthur Miller
2021-08-21 14:07           ` Arthur Miller
2021-08-21  8:10     ` Eli Zaretskii
2021-08-21  8:36 ` Alfred M. Szmidt
  -- strict thread matches above, loose matches on Subject: below --
2015-02-21  2:36 Sam Auciello
2015-02-21  3:52 ` Alexis
2015-02-21  8:56   ` Eli Zaretskii
2015-02-21 10:07   ` Adam Sjøgren
2015-02-21 11:28     ` Eric Abrahamsen
2015-02-21 11:44       ` Eli Zaretskii
2015-02-21 12:24         ` Thien-Thi Nguyen
2015-02-21 12:27           ` Eli Zaretskii
2015-02-21 14:22             ` Thien-Thi Nguyen
2015-02-21 18:43               ` Eli Zaretskii
2015-02-22 17:17                 ` Thien-Thi Nguyen
2015-02-21 12:45         ` Eric Abrahamsen
2015-02-24 10:58     ` Filipp Gunbin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87czq7usru.fsf@gnu.org \
    --to=tsdh@gnu.org \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=lists@traduction-libre.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).