Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6834653
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T23:08:16+00:00 2026-05-26T23:08:16+00:00

I have been using Emacs since version 18. Emacs Lisp isn’t my routine programming

  • 0

I have been using Emacs since version 18. Emacs Lisp isn’t my routine programming language, but years ago I invested some time studying it to the point of creating a .emacs that’s better (for me) than any GUI IDE to date.

That was a one-time effort and since then, I forgot completely how to program in lisp.

Alas, every time I upgrade my Emacs (18 > 19 > 20 > 21 > 22 > 23), something in my .emacs breaks, and I end up spending way too many hours (sometimes days) fixing these.

In many other languages I program routinely, it is possible to write code that never becomes obsolete. In emacs, on the other hand, I can never predict how things will change. For example [M-TAB] that used to work up until version 21.4.1, no longer works in version 23 and must be replaced with "\M-\t". Another example is dired-omit-toggle that used to work in version 21 but stopped working in version 22, being replaced by dired-omit-mode.

Now, I know that if a .emacs doesn’t do much, it’s possible to write “an almost empty” .emacs that can (probably) stay compatible with future versions.

But my .emacs is huge, designed to run on many different operating systems (and their different flavors, editions and versions, including non-GUI systems) without a single change. I wish there was a core-API or subset that is guaranteed to always work.

Is there really such a way to write a .emacs that will always stay upward compatible?

If so, where can I find a “cook book” or authoritative guidelines for accomplishing this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T23:08:17+00:00Added an answer on May 26, 2026 at 11:08 pm

    Use (when (boundp 'some-variable) …) or (when (fboundp 'some-function) …) around any piece of code that relies on a specific feature. (While you’re at it, start with (require 'cl) for those older versions that don’t have when built-in.)

    When all else fails, discriminate on emacs-major-version, emacs-minor-version and running-xemacs (defined as (string-match "XEmacs\\|Lucid" emacs-version)).

    Avoid syntax and library functions that are only supported in newer versions.

    It’s rare that something breaks when you stick to documented interfaces. So try to look for a way to do things that’s mentioned in the manual, and only fall back to modifying some random non-customizable variable if you see no other way. In my experience there is always a reasonably easy way to get something to work in all versions (at least with GNU Emacs, XEmacs is sometimes harder to please) if you allow the occasional conditional.

    For example, "\e\t" has always worked for M-TAB. With dired-omit-mode, fall back to dired-omit-toggle if the former does not exist:

    (set (if boundp 'dired-omit-mode 'dired-omit-mode 'dired-omit-toggle) t)
    

    Yes, it’s slightly painful, but not as dramatic as you make it out to be. I maintain a .emacs that works with anything since 19.23 (IIRC, it’s been a while since I tested with anything older than 19.34) on all of DOS, Windows and unix. Compatibility with Windows is in fact more of a burden than keeping up with GNU Emacs version changes.

    As for a cookbook, well, most differences between versions have to do with features that aren’t very widely used (otherwise the maintainers would give more importance to strict upward compatibility). Since Emacs is big, there’s undoubtedly plenty of it that you use but the cookbook writer wouldn’t have heard of. You’ll have to play it by ear. Fortunately it’s not too hard.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been using Emacs for more than three years now but it still
I have been using Castle MonoRail for the last two years, but in a
I have been using ASP.NET for years, but I can never remember when using
I have been using emacs for a while for mainly python programming, and have
I have been using the CSLA framework for couple of years now for windows
I have been using ClojureBox with great success to learn both Clojure and emacs.
I've been using Emacs for quite some time for basic text editing but as
I've been using Eclipse pretty regularly for several years now, but I admit to
I've been Googling around and looking at Emacs built-in help but I have yet
I've been using regex for years, I've read several tutorials and references (emacs regex

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.