all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#71522: 29.2.50; Allow associating module symbols with defining files
@ 2024-06-12 15:12 Spencer Baugh
  2024-06-12 16:54 ` Eli Zaretskii
  0 siblings, 1 reply; 2+ messages in thread
From: Spencer Baugh @ 2024-06-12 15:12 UTC (permalink / raw)
  To: 71522


It's currently impossible to associate a symbol defined by a module with
the source file which actually defined that symbol.

1. Make any native module whatsoever, defining any Lisp symbols at all
2. emacs -Q -l ./your-native-module.so
3. (symbol-file your-native-module-symbol) yields "your-native-module.so"
4. If it's a function:
   C-h f your-native-module-symbol RET
5. Observe that it says "your-native-module.so" defines this function,
   and that jumping to the source via the link or "s" drops you in
   your-native-module.so.

It should instead be possible for a module to express which files
defines a symbol, so that it's possible to jump to the source for that
symbol, if it's around.


In GNU Emacs 29.2.50 (build 2, x86_64-pc-linux-gnu, X toolkit, cairo
 version 1.15.12, Xaw scroll bars) of 2024-06-01 built on
 igm-qws-u22796a
Repository revision: fcef787a846f0c51f7443dfab6af6e18b476b166
Repository branch: emacs-29
Windowing system distributor 'The X.Org Foundation', version 11.0.12011000
System Description: Rocky Linux 8.9 (Green Obsidian)





^ permalink raw reply	[flat|nested] 2+ messages in thread

* bug#71522: 29.2.50; Allow associating module symbols with defining files
  2024-06-12 15:12 bug#71522: 29.2.50; Allow associating module symbols with defining files Spencer Baugh
@ 2024-06-12 16:54 ` Eli Zaretskii
  0 siblings, 0 replies; 2+ messages in thread
From: Eli Zaretskii @ 2024-06-12 16:54 UTC (permalink / raw)
  To: Spencer Baugh; +Cc: 71522

> From: Spencer Baugh <sbaugh@janestreet.com>
> Date: Wed, 12 Jun 2024 11:12:30 -0400
> 
> 
> It's currently impossible to associate a symbol defined by a module with
> the source file which actually defined that symbol.
> 
> 1. Make any native module whatsoever, defining any Lisp symbols at all
> 2. emacs -Q -l ./your-native-module.so
> 3. (symbol-file your-native-module-symbol) yields "your-native-module.so"
> 4. If it's a function:
>    C-h f your-native-module-symbol RET
> 5. Observe that it says "your-native-module.so" defines this function,
>    and that jumping to the source via the link or "s" drops you in
>    your-native-module.so.

I'm guessing that what Emacs knows is the directory and the file name
from which it loaded the module.  If we want to be able to find the
source file, that information needs to be recorded somewhere inside
the module, otherwise there's no way Emacs could reliably find the
sources, since the module could be stripped of all the symbolic debug
info.  Suggestions for how to implement that are welcome.





^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-06-12 16:54 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-12 15:12 bug#71522: 29.2.50; Allow associating module symbols with defining files Spencer Baugh
2024-06-12 16:54 ` Eli Zaretskii

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.