prohibit the launching of two emacs [closed] - emacs

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 12 years ago.
Improve this question
When you double click on a file opens a new window emacs. Tell me how to do to open in the same
I beg your pardon, Linux OS
I installed emacs23
Then i run the command:
emacs --daemon &&
emacsclien -c &&
emacsclien -c
And i have opened 2 windows instead of one

You don't provide enough information, such as what OS/windowing system you're using, but the answer involves using emacsclient. The wiki page has all the details of using emacsclient, though not how to set up your OS/windowing system to associate the file types with emacsclient (instead of emacs).

You have a single Emacs instance with two windows. You have two windows because you explicitly asked for them by passing the -c option to emacsclient.

Related

How to launch vscode installed on Windows 10 with winget from powershell? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 2 years ago.
Improve this question
Trying out Windows 10 for first time. Installed winget onto my powershell, and then used winget to install vscode: winget install vscode. When I install vscode on a Mac/Linux, I get a command-line tool code that I like to use to launch vscode from my PWD: code -n .
But being new to Powershell and winget, I have no idea how to determine exactly what/where/how things got installed. In summary:
Is there a command-line tool like code installed by winget?
If not, how else might I launch vscode with a window on my PWD?
OK, after rebooting code -n . works as expected.

where do I select the terminal in Github? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 6 years ago.
Improve this question
First time working in GitHub, and I am not sure how to access to the "terminal". Any idea? Do I need to install it?
It depends on your platform.
Windows:
Right click the start menu and select command prompt. Or search for command prompt in the start menu.
Mac:
Search for 'terminal' using spotlight.
Linux:
Search for 'terminal' in the menu, or use the shortcut ctrl + alt + t
Many people use the commandline, in a terminal to interact with github remote repositories. Depending on the OS you're using, the terminal works in different ways.
In any case, git is the application/commandline software your looking for. With git you can create, commit, etc:
> git init
> git add -A
> git commit -m 'first commit!'
> git push origin master
If you're not terminal-ly inclined, you could try the desktop client: https://desktop.github.com/

emacs server not persisting across SSH sessions [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 8 years ago.
Improve this question
I am having difficulties with emacs server closing unexpectedly. I am connecting over SSH with PuTTY from a Windows 7 machine to an ubuntu machine, using xming to handle x11 windows. It seems to be something to do with the way putty closes connections.
I start an emacs server using emacs --daemon. I then connect to it using emacsclient -c. When I close the resulting window, the emacs server stays running, as it should, and I can reconnect using emacsclient -c again. I can then close the putty session, reopen it, and reconnect again. This is all as I expected.
The trouble comes when I close the SSH session without first closing the emacs window. When reconnecting, the emacs server is no longer running. This only happens when the x11 version of emacs is running. If I start emacs in the terminal with emacsclient -c -nw, the emacs server stays running even if I don't exit emacs before closing PuTTY.
I'm not sure what could be causing this, or where to look to trouble-shoot this more.
There is apparently a bug in the Gtk libraries used by the default emacs binary in Ubuntu.
If you use the lucid variant (eg emacs23-lucid) then things do indeed work swimmingly. I connect, drop, reconnect, ... hundreds of times between reboots.
I re-connect either in text mode, or x11 mode, and set up simple aliases for this:
alias emt='TERM=vt100 emacsclient -nw'
alias emx='emacsclient -c'

how to find and replace with sed [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
have heard a lot about SED and downloaded and installed GNU SED for my Windows XP. 1) The install program installed it c:\program files. 2) I have a file in directory C:\lewisC\bm_pg0001.txt. The file has text, 1.pdf in it. 3) I want to change 1.pdf to bm_pg0001.pdf
4) after messing around to invoke SED with paths etc. I copied all the files in sed bin folder to C:\lewisC\ used command here for DOS prompt and finally able to invoke SED.
Now can somebody help with the sed command to change 1.pdf to bm_pg0001.pdf in the file bm_pg0001.txt. Thanks- I now realize why Windows was a success. Thanks
Like this:
sed "s/1\.pdf/bm_pg0001.pdf/g" < input_file > output_file
Enjoy!
Yes, it seems Windows is a better platform for those unwilling to do even the most basic research. Take a look at http://www.grymoire.com/Unix/Sed.html.

How to open a file in the Mac version of Eclipse? [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 11 years ago.
Improve this question
Goal: Under OSX, From the command line, open a file in eclipse.
Environment:
OSX 10.7
Eclipse Indigo Java EE bundle (3.7.1)
Expectation:
cd to directory eclipse is installed from.
run:
./eclipse --launcher.openFile notice.html
Eclipse opens with the file 'notice.html' open/editable
What happens:
Eclipse opens but the file isn't loaded. :(
I explicitly want to do this from the command line, I'm NOT interested in opening the file via Finder->Open With->Choose Eclipse.app
Here is an article that seems to indicate that I should be able to do this:
http://aniefer.blogspot.com/2010/05/opening-files-in-eclipse-from-command.html
If there is another way to communicate with an already open eclipse to open a file that would be acceptable as well.
Eventually I'd like to use:
open //path-to-Eclipse.app --args --launcher.openFile //path-to-file
...to communicate my desire for the file to open in the current instance of the running eclipse.
But for now I'm just trying to see if there is ANY way to open a file
Anyone have any ideas?
Thanks in advance for any help/pointers :)
I agree with Bavarious. I always use open -a to open a specific file in a GUI app from the command line.