all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: sbaugh@catern.com
To: emacs-devel@gnu.org
Subject: source-directory, installed Emacs, and C source
Date: Tue, 24 Oct 2023 10:31:49 -0400	[thread overview]
Message-ID: <875y2wrt0q.fsf@catern.com> (raw)


When Emacs is installed, it remembers the absolute file name of its
source code in source-directory.  And this is used to jump to C function
definitions.

This means if a user installs Emacs out of a Git repository and then the
user updates that Git repository, Emacs will jump to newer C
function definitions.  Namely, Emacs will jump to whatever's currently
in the Git repository rather than what actually was used to compile
Emacs.  (Thank you Eli for pointing this out.)

I see two mutually exclusive interpretations here:

- Jumping to a newer function definition is a problem.

  So we shouldn't be doing it for C.  We can do that by having Emacs
  forget the original source-directory when it's installed.  Probably
  also we should support installing C source files along with Emacs, to
  make up for forgetting source-directory.

  This would be a great improvement for users who don't keep
  source-directory around (since there's now an easy way to install C
  source along with Emacs), and a minor improvement for users that do
  keep source-directory around (since the C function definitions will
  now always match what's used to build Emacs)

- Jumping to a newer function definition is not a problem.

  So we can do it for Lisp too.  We can do that by having Emacs jump to
  Lisp source files from source-directory, too, if they exist.
  (Possibly as an option off by default, if people would prefer that)

  This would be a great improvement for users who keep source-directory
  around (since now Emacs jumps straight to your source repo, allowing
  easy modifications, and also you can skip installing Lisp source files
  with Emacs) and status quo for users that don't keep source-directory
  around.

Thoughts?

I'm interested in implementing one of these two options, since I want to
be able to reliably jump to function definitions from an installed
Emacs.  I don't care which of the two we go with.




             reply	other threads:[~2023-10-24 14:31 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-24 14:31 sbaugh [this message]
2023-10-24 14:47 ` source-directory, installed Emacs, and C source Eli Zaretskii
2023-10-24 15:13   ` Spencer Baugh
2023-10-24 16:00     ` Eli Zaretskii
2023-10-24 16:20       ` sbaugh
2023-10-24 18:34         ` Eli Zaretskii
2023-10-25  8:41           ` Manuel Giraud via Emacs development discussions.
2023-10-25 12:43             ` Eli Zaretskii
2023-10-25 13:20               ` Manuel Giraud via Emacs development discussions.
2023-10-25 13:43                 ` sbaugh
2023-10-25 13:59                   ` Eli Zaretskii
2023-10-25 14:29                     ` sbaugh
2023-10-25 16:13                       ` Eli Zaretskii
2023-10-25 18:12                         ` Manuel Giraud via Emacs development discussions.
2023-10-25 18:37                           ` Eli Zaretskii
2023-10-25 19:07                             ` Manuel Giraud via Emacs development discussions.
2023-10-25 16:59                       ` Emanuel Berg
2023-10-24 18:35         ` Emanuel Berg
2023-10-25 17:43         ` chad
2023-10-25 18:32           ` Eli Zaretskii
2023-10-25 20:30             ` chad
2023-10-26  4:57               ` Eli Zaretskii
2023-10-25 18:57           ` Manuel Giraud via Emacs development discussions.
2023-10-24 16:00 ` Manuel Giraud via Emacs development discussions.
2023-10-24 16:04   ` Eli Zaretskii
2023-10-24 18:06   ` Emanuel Berg
2023-10-24 18:48   ` Arsen Arsenović
2023-10-24 18:01 ` Manuel Giraud via Emacs development discussions.

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

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

  git send-email \
    --in-reply-to=875y2wrt0q.fsf@catern.com \
    --to=sbaugh@catern.com \
    --cc=emacs-devel@gnu.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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.