unofficial mirror of emacs-tangents@gnu.org
 help / color / mirror / Atom feed
* Question: what is Emacs mode?
@ 2021-04-23 20:43 Qiantan Hong
  2021-04-23 21:11 ` Jean Louis
  0 siblings, 1 reply; 8+ messages in thread
From: Qiantan Hong @ 2021-04-23 20:43 UTC (permalink / raw)
  To: emacs-tangents@gnu.org

I posted it on LtU forum http://lambda-the-ultimate.org/node/5630
but I think other Emacs developers may have more insight into it.

If you don’t want to follow the link, here’s the post:

I've been using Emacs as my OS since time started and I've always taken its programming model as granted, part of the nature. However, now I'm looking back at it when I'm trying to design an editor/OS based on S-exp rather than text, I found I understand Emacs very poorly.
So here's the question:
What exactly are mode, buffer local variables, hooks and advices?
Hooks and advices look like AOP. However, emacs hooks and advices usually make heavy use of buffer local variables. Lots of them also interact with modes by looking at the mode variable. So I don't think AOP captures the full picture.
Sure, mode looks like context-oriented programming (see ContextL LtU thread ). However I never see mode associated with dynamic scope, they just got turned on or off (for a particular buffer). Is this "resembling ContextL" impression just another instance of fitting a too-general concept into a much more specific (but not understood) concept?
And finally, let me give the context that all those question arises: I want to clean up the Emacs model, and apply it to a S-exp (tree) based editor. So the practical question is: Can we find a cleaner/more elegant version of the Emacs model, and generalize it to tree document structure? Will we have node-local variables, node-local modes, etc? If so, how will all those "attachments" interact between, say, parents and children nodes?

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

end of thread, other threads:[~2021-04-29  5:02 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-23 20:43 Question: what is Emacs mode? Qiantan Hong
2021-04-23 21:11 ` Jean Louis
2021-04-23 22:04   ` Qiantan Hong
2021-04-24  4:22     ` Jean Louis
2021-04-24  5:00       ` Qiantan Hong
2021-04-24  9:22         ` Jean Louis
2021-04-29  3:39           ` Qiantan Hong
2021-04-29  5:02             ` Jean Louis

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).