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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T09:51:03+00:00 2026-06-17T09:51:03+00:00

My emacs.bat rest in the same bin directory as emacs.exe . This directory is

  • 0

My emacs.bat rest in the same bin directory as emacs.exe. This directory is included in the PATH variable (Windows).

Content of emacs.bat:

@echo off "%~dp0emacsclientw.exe" -na "%~dp0runemacs.exe" "%1"

However, whenever I use this command, emacs.exe gets executed instead of the .bat file. How would I go about fixing 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-06-17T09:51:05+00:00Added an answer on June 17, 2026 at 9:51 am

    It seems you could put the emacs.bat in another directory and place that directory earlier in the PATH. Note: if you were to run “emacs” while in the directory containing emacs.exe then the .exe would take precedence.

    Edit: Alternatively, you could just type emacs.bat instead of emacs at the command prompt.

    Edit 2: As seen in this Answer, you could set the PATHEXT environment variable. Something along the lines of:

    PATHEXT=.BAT;.COM;.EXE;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.RB;.RBW

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

Sidebar

Related Questions

In emacs, it is possible to start a file off with a line this:
My .emacs contains (setenv PATH (concat .:/usr/texbin:/opt/local/bin (getenv PATH))) (setq exec-path (append exec-path '(.:/usr/texbin:/opt/local/bin)))
Emacs seems to save synchronously, i.e. the interface locks up during a save. This
In emacs I can specify that a file is SQL using this notation: --
I'm a beginner in this area. I have cloned the sources of emacs from
Emacs usualy automaticaly splits the window horizontaly. How can I change this default behaviour,
In Emacs Lisp, if you have a buffer position stored in a variable, how
I'm running Windows Vista and Emacs 23.1.1 and I have installed Ruby using the
Emacs is confusing syntax after a line like fileparse($file, qr\.[^.]+$); And thinks the rest
In Emacs Lisp, how do I check if a variable is defined?

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.