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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T02:57:10+00:00 2026-05-18T02:57:10+00:00

I am switching to GNU emacs for my python and bash scripting. I really

  • 0

I am switching to GNU emacs for my python and bash scripting. I really enjoy this, but I don’t like the X-window portion of emacs. As such, I always use emacs -nw <my_file> to edit my files. However, when I associate my .py and .sh files with emacs, I end up opening emacs in X-window mode when I double-click on them from gnome-nautilus (Ubuntu 10.10).

What I would like to know is: What should I add to my .emacs file in order to use emacs without X-window when I double click on my files? Note: I do want emacs to open a terminal, possibly resize it according to my specifications (already have a .sh script for that), launch itself and open my file.

How should I accomplish that?

Cheers!

EDIT: Thanks for all the answers! I have to give the check to the most complete one, although of course it builds on the preceding ones.

  • 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-18T02:57:11+00:00Added an answer on May 18, 2026 at 2:57 am

    Building on Gareth’s answer:

    To open a file in an existing emacs session if one is running, but open a new one in a terminal if there isn’t one, you can do the following:

    1. Add (server-start) to your .emacs
    2. Create a script run_emacs with the following contents:

      #!/bin/bash
      gnome-terminal -e "emacs -nw $@"
      

      and make it executable.

    3. Set your application to open python and bash files to be emacsclient -a /path/to/run_emacs %F (if you place run_emacs somewhere in your $PATH, you can leave out the /path/to/ bit).

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

Sidebar

Related Questions

I'm in the process of switching from multiple tabs in iTerm to one GNU
Ever since switching from TABLE-layout to DIV-layout, one common problem remains: PROBLEM : you
I'm switching between different Java SDKs (1.4.2, 1.5.0 and 1.6.0) for various projects. I
We are considering switching from MS Visual Studio 2003 to MS Visual Studio 2005
I am switching to textmate and there are a few things I want to
I am going to switching SSL onto a Rails site of mine pretty soon
We're considering switching our site from Prototype to jQuery. Being all-too-familiar with Prototype, I'm
To make things easier when switching between machines (my workstation at the office and
My question about the reconfiguration delay when switching between Access 2003 and 2007 the
Several people round here recommended switching to the new WD Velociraptor 10000rpm harddisk. Also

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.