LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


Reply
  Search this Thread
Old 07-10-2015, 09:32 PM   #1
susja
Member
 
Registered: May 2011
Posts: 125

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


Hello,
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, 07:37 AM   #2
smallpond
Senior Member
 
Registered: Feb 2011
Location: Massachusetts, USA
Distribution: Fedora
Posts: 4,140

Rep: Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263
This question isn't even about Cygwin, much less Linux. MSDN has good information on how file associations work.
https://msdn.microsoft.com/en-us/lib...(v=vs.85).aspx
 
Old 07-11-2015, 09:07 AM   #3
susja
Member
 
Registered: May 2011
Posts: 125

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
Thanks
 
  


Reply

Tags
cygwin, emacs



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 10:45 AM
How to write a batch file for windows that starts cygwin tool and runs unix scripts plasya777 Programming 5 05-04-2009 07:53 AM
How could I associate a file type with a program? antoniog Linux - Newbie 8 04-09-2007 04:49 AM
howto convert .flw (koffice/kivio file) into windows readable type of file? rahmmandel Linux - Desktop 7 01-30-2007 04:12 PM
edb (emacs database) won't open file - emacs 20 & 21 tip184 Linux - Software 0 04-03-2004 07:31 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:10 PM.

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