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 6214589
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T06:54:18+00:00 2026-05-24T06:54:18+00:00

I am trying to make my Emacs configuration file written for OS X work

  • 0

I am trying to make my Emacs configuration file written for OS X work on Ubuntu. I have this line:

(add-to-list 'load-path "/usr/local/Cellar/emacs/23.3/share/emacs/site-lisp/w3m")

It is used to load emacs-w3m. On OS X I installed Emacs using Homebrew, thus it is in /usr/local/Cellar/.The site-lisp directory on Ubuntu is in a different place. How can I write this line in a way that will work on both operating systems? Is there an Emacs Lisp function to retrieve the site-lisp directory?

  • 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-24T06:54:18+00:00Added an answer on May 24, 2026 at 6:54 am

    No, there’s no way. The site-lisp directory is a convention and only its existence not its path is agreed on.

    Either you set a symbolic link on your Mac/Ubuntu or you use a system switch:

    (defconst my-lisp-dir (cond
        ((equal system-type 'gnu/linux) "/usr/share/emacs/site-lisp/")
        ((equal system-type 'darwin) (concat "/usr/local/Cellar/emacs/" (number-to-string emacs-major-version) "." (number-to-string emacs-minor-version) "/share/emacs/site-lisp/"))
        (t (concat "/usr/local/emacs/site-lisp/")))
    

    and then

    (add-to-list 'load-path (concat my-lisp-dir "w3m"))
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

im trying make one replace in string from a array but this dont work
I'm trying to make emacs' delete-file function delete files with exclamation marks in their
I am trying to generate functions using a macro: (defmacro make-my-emacs-command-region (cmd name) (list
I've been trying all day to make git work inside emacs shells (version 24)
I'm using folding-mode in emacs and was trying to make a function to insert
Trying to make this jQuery filter that uses .find case-insensitive. For example, when the
Trying to make a simple number clicker control for BlackBerry 6/7, like this: At
I'm trying to make Emacs position definitions of functions and variables in Emacs Lisp
I am trying to make shortcuts for portable emacs linking to a portable LaTeX
I want to have a command in Emacs to make it as opaque/transparent as

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.