all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Jean Louis <bugs@gnu.support>
To: Qiantan Hong <qhong@mit.edu>
Cc: "emacs-tangents@gnu.org" <emacs-tangents@gnu.org>
Subject: Re: Question: what is Emacs mode?
Date: Sat, 24 Apr 2021 00:11:20 +0300	[thread overview]
Message-ID: <YIM3+PID3VX81Mla@protected.localdomain> (raw)
In-Reply-To: <5D47B4B9-87F5-40EA-A689-2618E3B8C6CE@mit.edu>

* Qiantan Hong <qhong@mit.edu> [2021-04-23 23:53]:
> 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.

Is it editor or OS?

From Emacs user viewpoint that abbreviation "editor/OS" actually makes
sense as Emacs could be, almost could be the OS itself. 

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

Was it question or statement? I am sure you know what those are.

I am using buffer local variables for listings from database, so one
buffer may show one listing, other different listing and each have
same name of variable for program to work, and they are buffer local
or otherwise it would be mess.

> 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?

I know what is mode, and I am not sure if for mode we should say to be
context oriented programming.

From Emacs manual:
(info "(emacs) Modes")

23 Major and Minor Modes
************************

Emacs contains many “editing modes” that alter its basic behavior in
useful ways.  These are divided into “major modes” and “minor modes”.

   Major modes provide specialized facilities for working on a
particular file type, such as a C source file (*note Programs::), or a
particular type of non-file buffer, such as a shell buffer (*note
Shell::).  Major modes are mutually exclusive; each buffer has one and
only one major mode at any time.

   Minor modes are optional features which you can turn on or off, not
necessarily specific to a type of file or buffer.  For example, Auto
Fill mode is a minor mode in which <SPC> breaks lines between words as
you type (*note Auto Fill::).  Minor modes are independent of one
another, and of the selected major mode.

But I know you know that all.

> 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?

I do understand the intention. Not that it is clearly explained.

Can you tell more about storing things in the tree?

Jean

Take action in Free Software Foundation campaigns:
https://www.fsf.org/campaigns

Sign an open letter in support of Richard M. Stallman
https://stallmansupport.org/
https://rms-support-letter.github.io/





  reply	other threads:[~2021-04-23 21:11 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-23 20:43 Question: what is Emacs mode? Qiantan Hong
2021-04-23 21:11 ` Jean Louis [this message]
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

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=YIM3+PID3VX81Mla@protected.localdomain \
    --to=bugs@gnu.support \
    --cc=emacs-tangents@gnu.org \
    --cc=qhong@mit.edu \
    /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.