Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 07-10-2015, 10:32 PM   #1
Registered: May 2011
Posts: 123

Rep: Reputation: 1
Cygwin, emacs and associate it with a file type on Windows ..

Not sure it's a right place for asking this question ... if not ... please advice where should I look for help.

I want to use Emacs as and editor and shell. On Windows 7 I installed cygwin , X11 and emacs. In terminal I added to /etc/profile file these lines:

XWin -multiwindow 2> /dev/null&
export DISPLAY=:0.0
sleep 1
emacs 2> /dev/null&

I created a shortcut that execute this command: C:\rhcygwin64\bin\mintty.exe - Now every time I start that shortcut it starts emacs. No problem. My goal is: associate some file types like .txt , .csv and etc with emacs in order when I start foo.txt it'll open in emacs. When I tried to do it 'Set Associtation' control it accepts only file name and it does not take '-'. Hence when I try to open foo.txt it does not work. I tried to create a shortcut to mintty.exe but it didn't work either. Could someone help me to create association in order to start to mintty.exe but rather mintty.exe - ? Thanks in advance
Old 07-11-2015, 08:37 AM   #2
Senior Member
Registered: Feb 2011
Location: Massachusetts, USA
Distribution: CentOS 7
Posts: 3,496

Rep: Reputation: 933Reputation: 933Reputation: 933Reputation: 933Reputation: 933Reputation: 933Reputation: 933Reputation: 933
This question isn't even about Cygwin, much less Linux. MSDN has good information on how file associations work.
Old 07-11-2015, 10:07 AM   #3
Registered: May 2011
Posts: 123

Original Poster
Rep: Reputation: 1
Thanks for the link. Unfortunately it did not help me. It looks that in my case 'simple' association a file type with a program would not work because it involves a few additional conditions.
Well I am stuck.
The only option that I see is every time I need to open a file just save it somewhere and then open from inside the Emacs.
Not convenient... But I don"t see other option


cygwin, emacs

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
[cygwin] How to use the cygwin.dll in Windows Programming Predatorian Programming 3 07-25-2014 11:45 AM
How to write a batch file for windows that starts cygwin tool and runs unix scripts plasya777 Programming 5 05-04-2009 08:53 AM
How could I associate a file type with a program? antoniog Linux - Newbie 8 04-09-2007 05:49 AM
howto convert .flw (koffice/kivio file) into windows readable type of file? rahmmandel Linux - Desktop 7 01-30-2007 05:12 PM
edb (emacs database) won't open file - emacs 20 & 21 tip184 Linux - Software 0 04-03-2004 08:31 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:40 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration