• setting a major mode's configuration variables according to file suffix

    From Julius Dittmar@21:1/5 to All on Mon Sep 4 20:51:00 2017
    Hi,

    I would like to set up two different sets of configuration variables for
    the same major mode (org-mode in this case), and have emacs choose which
    one is appropriate by the file suffix.

    How can that be done?

    I'm new to configuring emacs. Any hints, including pointers to the
    appropriate sections of a documentation, are welcome.

    Thanks in advance,

    Julius

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Michael Heerdegen@21:1/5 to Julius Dittmar on Tue Sep 5 10:40:18 2017
    Julius Dittmar <Julius.Dittmar@gmx.de> writes:

    I would like to set up two different sets of configuration variables
    for the same major mode (org-mode in this case), and have emacs choose
    which one is appropriate by the file suffix.

    How can that be done?

    You can use `define-derived-mode' to derive modes with different
    personal settings from a given major-mode. Just put all of your
    settings in the BODY of the definition.

    For file associations, just change `auto-mode-alist' accordingly to use
    your derived mode(s) for the suffixes you want.

    Do you need any help with the details?


    Michael.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Julius Dittmar@21:1/5 to All on Tue Sep 5 19:57:19 2017
    Hi Michael,

    thanks for the pointers. I'll try myself first, and come back with new questions as needed. Might take some days though.

    Julius

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)