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

  • Home
  • SEARCH
  • 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 84725
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T21:58:36+00:00 2026-05-10T21:58:36+00:00

Having a relative path, how do I turn it into an absolute one from

  • 0

Having a relative path, how do I turn it into an absolute one from the location where the elisp file that I’m loading is. That is, I have an elisp file that I’m loading, it has an relative path and I need an absolute one.

  • 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. 2026-05-10T21:58:36+00:00Added an answer on May 10, 2026 at 9:58 pm
    'file-truename 

    From the documentation:

    Return the truename of FILENAME, which should be absolute. The truename of a file name is found by chasing symbolic links both at the level of the file and at the level of the directories containing it, until no links are left at any level.

    The other solution proffered (‘expand-file-name) leaves symbolic links in place, which may or may not be what you want. ‘file-truename uses ‘expand-file-name, so they both will determine the path relative default-directory for the buffer (which is what you’re asking for).

    After seeing the comment/question to a different answer, the problem is that the default-directory is that of the buffer that is calling ‘load.

    Luckily, there’s a variable that ‘load sets that stores the path to the file being loaded. Try this snippet of code out:

    ;; this is in the file being loaded (let ((default-directory (file-name-directory load-file-name)))    (file-truename 'blih')) 
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 216k
  • Answers 216k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer I recommend using the lockdown gem for authorization. (see http://stonean.com/)… May 12, 2026 at 11:07 pm
  • Editorial Team
    Editorial Team added an answer How about var fileName = System.IO.Path.GetFileName(userFileName); var targetPath = System.IO.Path.Combine(userDirectory,… May 12, 2026 at 11:07 pm
  • Editorial Team
    Editorial Team added an answer To be honest, I'm not too familiar with this control,… May 12, 2026 at 11:07 pm

Related Questions

I'm developing a PHP website that uses url routing. I'd like the site to
I'm trying to learn pygame, And I found the best way to have the
How can I change the current working directory from within a Java program? Everything
Recently I made the decision to port my existing asmx services to WCF. I

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.