* Gnuserv vs Emacsserver
@ 2008-11-26 13:14 Magnus Berg
2008-11-26 15:13 ` Lennart Borgman
0 siblings, 1 reply; 11+ messages in thread
From: Magnus Berg @ 2008-11-26 13:14 UTC (permalink / raw
To: help-gnu-emacs
Hi!
I'm little confused about the possibilities with Emacsserver in Emacs 23
(cvs). I had used Gnuserv before because it makes it possible to open a
new buffers/files, from the filemanager etc, in the initial frame (whith
dtemacs). I don't want to have my screen cluttered with frames.
Now I wonder if it's possible to do the same with Emacs 23:s Emacsserver
or if I should continue to use Gnuserver for that. If it's possible with
Emacsserver, can you tell me how.
Magnus Berg
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Gnuserv vs Emacsserver
2008-11-26 13:14 Magnus Berg
@ 2008-11-26 15:13 ` Lennart Borgman
0 siblings, 0 replies; 11+ messages in thread
From: Lennart Borgman @ 2008-11-26 15:13 UTC (permalink / raw
To: Magnus Berg; +Cc: help-gnu-emacs
On Wed, Nov 26, 2008 at 2:14 PM, Magnus Berg
<debianmailinglistspam@burgsvik.se> wrote:
> Hi!
>
> I'm little confused about the possibilities with Emacsserver in Emacs 23
> (cvs). I had used Gnuserv before because it makes it possible to open a new
> buffers/files, from the filemanager etc, in the initial frame (whith
> dtemacs). I don't want to have my screen cluttered with frames.
> Now I wonder if it's possible to do the same with Emacs 23:s Emacsserver or
> if I should continue to use Gnuserver for that. If it's possible with
> Emacsserver, can you tell me how.
Maybe you can find your answer here:
http://www.emacswiki.org/emacs/EmacsClient
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Gnuserv vs Emacsserver
@ 2008-11-27 13:03 Magnus Berg
2008-11-27 14:16 ` Lennart Borgman
0 siblings, 1 reply; 11+ messages in thread
From: Magnus Berg @ 2008-11-27 13:03 UTC (permalink / raw
To: help-gnu-emacs
>
> >/ Hi!/
> >
> >/ I'm little confused about the possibilities with Emacsserver in Emacs 23/
> >/ (cvs). I had used Gnuserv before because it makes it possible to open a new/
> >/ buffers/files, from the filemanager etc, in the initial frame (whith/
> >/ dtemacs). I don't want to have my screen cluttered with frames./
> >/ Now I wonder if it's possible to do the same with Emacs 23:s Emacsserver or/
> >/ if I should continue to use Gnuserver for that. If it's possible with/
> >/ Emacsserver, can you tell me how./
>
> Maybe you can find your answer here:
>
> http://www.emacswiki.org/emacs/EmacsClient
>
No, there was nothing about opening new buffers/files in the initial frame.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Gnuserv vs Emacsserver
2008-11-27 13:03 Magnus Berg
@ 2008-11-27 14:16 ` Lennart Borgman
0 siblings, 0 replies; 11+ messages in thread
From: Lennart Borgman @ 2008-11-27 14:16 UTC (permalink / raw
To: Magnus Berg; +Cc: help-gnu-emacs
On Thu, Nov 27, 2008 at 2:03 PM, Magnus Berg
<debianmailinglistspam@burgsvik.se> wrote:
>>
>> >/ Hi!/
>> >
>> >/ I'm little confused about the possibilities with Emacsserver in Emacs
>> > 23/
>> >/ (cvs). I had used Gnuserv before because it makes it possible to open a
>> > new/
>> >/ buffers/files, from the filemanager etc, in the initial frame (whith/
>> >/ dtemacs). I don't want to have my screen cluttered with frames./
>> >/ Now I wonder if it's possible to do the same with Emacs 23:s
>> > Emacsserver or/
>> >/ if I should continue to use Gnuserver for that. If it's possible with/
>> >/ Emacsserver, can you tell me how./
>>
>> Maybe you can find your answer here:
>>
>> http://www.emacswiki.org/emacs/EmacsClient
>>
>
> No, there was nothing about opening new buffers/files in the initial frame.
Sorry, you are right. Look at the option server-window in Emacs. (I am
surprised it is not mentioned.) Does that help you?
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Gnuserv vs Emacsserver
@ 2008-11-28 19:41 Magnus Berg
2008-11-28 19:46 ` Lennart Borgman
0 siblings, 1 reply; 11+ messages in thread
From: Magnus Berg @ 2008-11-28 19:41 UTC (permalink / raw
To: help-gnu-emacs
>>> >/ Hi!/
>>> >
>>> >/ I'm little confused about the possibilities with Emacsserver in Emacs
>>> > 23/
>>> >/ (cvs). I had used Gnuserv before because it makes it possible to open a
>>> > new/
>>> >/ buffers/files, from the filemanager etc, in the initial frame (whith/
>>> >/ dtemacs). I don't want to have my screen cluttered with frames./
>>> >/ Now I wonder if it's possible to do the same with Emacs 23:s
>>> > Emacsserver or/
>>> >/ if I should continue to use Gnuserver for that. If it's possible with/
>>> >/ Emacsserver, can you tell me how./
>>>
>>> Maybe you can find your answer here:
>>>
>>> http://www.emacswiki.org/emacs/EmacsClient
>>>
>>
>> No, there was nothing about opening new buffers/files in the initial frame.
>
> Sorry, you are right. Look at the option server-window in Emacs. (I am
> surprised it is not mentioned.) Does that help you?
No! :-) I have read quite a lot about emacsserver. (I got the "GNU Emacs
manual" as a book and it covers version 22) I have searched and looked
up the options but I don't get a grip of it. I found a option for
emacsserver there I can set the variable "server-window" to a window or
a frame. And it is by default set to "Use selected window" and it is
possible to chose "Display in new frame", "Use pop-to-buffer" and "Other
function". I suppose the last alternative could include some smart
setting for the ones who knows lisp or what to do. But I don't.
But I'm not sitting here crying :-) I installed Gnuserv and it does what
I want. But it should be fun to now how to do it without extra lisp
packages, if it is possible with the included emacsserver.
Thanks for your interest in my question Lennart!
>
> >/ Hi!/
> >
> >/ I'm little confused about the possibilities with Emacsserver in Emacs 23/
> >/ (cvs). I had used Gnuserv before because it makes it possible to open a new/
> >/ buffers/files, from the filemanager etc, in the initial frame (whith/
> >/ dtemacs). I don't want to have my screen cluttered with frames./
> >/ Now I wonder if it's possible to do the same with Emacs 23:s Emacsserver or/
> >/ if I should continue to use Gnuserver for that. If it's possible with/
> >/ Emacsserver, can you tell me how./
>
> Maybe you can find your answer here:
>
> http://www.emacswiki.org/emacs/EmacsClient
>
No, there was nothing about opening new buffers/files in the initial frame.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Gnuserv vs Emacsserver
2008-11-28 19:41 Magnus Berg
@ 2008-11-28 19:46 ` Lennart Borgman
0 siblings, 0 replies; 11+ messages in thread
From: Lennart Borgman @ 2008-11-28 19:46 UTC (permalink / raw
To: Magnus Berg; +Cc: help-gnu-emacs
On Fri, Nov 28, 2008 at 8:41 PM, Magnus Berg
<debianmailinglistspam@burgsvik.se> wrote:
>>>> >/ Hi!/
>>>> >
>>>> >/ I'm little confused about the possibilities with Emacsserver in Emacs
>>>> > 23/
>>>> >/ (cvs). I had used Gnuserv before because it makes it possible to open
>>>> > a
>>>> > new/
>>>> >/ buffers/files, from the filemanager etc, in the initial frame (whith/
>>>> >/ dtemacs). I don't want to have my screen cluttered with frames./
>>>> >/ Now I wonder if it's possible to do the same with Emacs 23:s
>>>> > Emacsserver or/
>>>> >/ if I should continue to use Gnuserver for that. If it's possible
>>>> > with/
>>>> >/ Emacsserver, can you tell me how./
>>>>
>>>> Maybe you can find your answer here:
>>>>
>>>> http://www.emacswiki.org/emacs/EmacsClient
>>>>
>>>
>>> No, there was nothing about opening new buffers/files in the initial
>>> frame.
>>
>> Sorry, you are right. Look at the option server-window in Emacs. (I am
>> surprised it is not mentioned.) Does that help you?
>
> No! :-) I have read quite a lot about emacsserver. (I got the "GNU Emacs
> manual" as a book and it covers version 22) I have searched and looked up
> the options but I don't get a grip of it. I found a option for emacsserver
> there I can set the variable "server-window" to a window or a frame. And it
> is by default set to "Use selected window" and it is possible to chose
> "Display in new frame", "Use pop-to-buffer" and "Other function". I suppose
> the last alternative could include some smart setting for the ones who knows
> lisp or what to do. But I don't.
>
> But I'm not sitting here crying :-) I installed Gnuserv and it does what I
> want. But it should be fun to now how to do it without extra lisp packages,
> if it is possible with the included emacsserver.
>
> Thanks for your interest in my question Lennart!
But can you then please explain what you want to do then? I thought
you wanted to open a file in a specific Emacs frame. Is not that what
you want to do?
>> >/ Hi!/
>> >
>> >/ I'm little confused about the possibilities with Emacsserver in Emacs
>> > 23/
>> >/ (cvs). I had used Gnuserv before because it makes it possible to open a
>> > new/
>> >/ buffers/files, from the filemanager etc, in the initial frame (whith/
>> >/ dtemacs). I don't want to have my screen cluttered with frames./
>> >/ Now I wonder if it's possible to do the same with Emacs 23:s
>> > Emacsserver or/
>> >/ if I should continue to use Gnuserver for that. If it's possible with/
>> >/ Emacsserver, can you tell me how./
>>
>> Maybe you can find your answer here:
>>
>> http://www.emacswiki.org/emacs/EmacsClient
>>
>
> No, there was nothing about opening new buffers/files in the initial frame.
>
>
>
>
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Gnuserv vs Emacsserver
[not found] <mailman.1447.1227901272.26697.help-gnu-emacs@gnu.org>
@ 2008-11-28 22:26 ` Chetan
2008-11-29 10:04 ` Eli Zaretskii
` (2 more replies)
0 siblings, 3 replies; 11+ messages in thread
From: Chetan @ 2008-11-28 22:26 UTC (permalink / raw
To: help-gnu-emacs
Magnus Berg <debianmailinglistspam@burgsvik.se> writes:
>>>> >/ Hi!/
>>>> >
>>>> >/ I'm little confused about the possibilities with Emacsserver in Emacs
>>>> > 23/
>>>> >/ (cvs). I had used Gnuserv before because it makes it possible to open a
>>>> > new/
>>>> >/ buffers/files, from the filemanager etc, in the initial frame (whith/
>>>> >/ dtemacs). I don't want to have my screen cluttered with frames./
>>>> >/ Now I wonder if it's possible to do the same with Emacs 23:s
>>>> > Emacsserver or/
>>>> >/ if I should continue to use Gnuserver for that. If it's possible with/
>>>> >/ Emacsserver, can you tell me how./
>>>>
>>>> Maybe you can find your answer here:
>>>>
>>>> http://www.emacswiki.org/emacs/EmacsClient
>>>>
>>>
>>> No, there was nothing about opening new buffers/files in the initial frame.
>>
>> Sorry, you are right. Look at the option server-window in Emacs. (I am
>> surprised it is not mentioned.) Does that help you?
>
> No! :-) I have read quite a lot about emacsserver. (I got the "GNU Emacs
> manual" as a book and it covers version 22) I have searched and looked up the
> options but I don't get a grip of it. I found a option for emacsserver there I
> can set the variable "server-window" to a window or a frame. And it is by
> default set to "Use selected window" and it is possible to chose "Display in
> new frame", "Use pop-to-buffer" and "Other function". I suppose the last
> alternative could include some smart setting for the ones who knows lisp or
> what to do. But I don't.
>
> But I'm not sitting here crying :-) I installed Gnuserv and it does what I
> want. But it should be fun to now how to do it without extra lisp packages, if
> it is possible with the included emacsserver.
>
> Thanks for your interest in my question Lennart!
I have wondered about swithing to emacsserver for some time. I have
been using gnuclient for a long time (on W32). Changing over to
emacsserver became a possibility with emacs 22, but I haven't yet done
it.
For my style of working, I find there are irritations in switching
over. I wonder if anybody has any solution.
1. My version of gnuclient starts emacs (if it can find it) if it
cannot connect to a running instance. I could, of course, make sure it
is running before I use it.
2. Irrespective of whether I am running emacs 21 or 22, it can still
connect.
3. The biggest irritant is that if I start another instance of emacs,
either by mistake or because I want to do something in a console
window, it clobbers my previous instance. With gnuserve, it fails with
a dialog box, which is also irritating, but it works the way I want
it. Ideally I would not like to keep changing the commandline, but I
don't see how I would do it even with that.
4. I need to change too many places in the system registry where it
invokes gnuclient. I can perhaps do that if I can handle the others.
Chetan
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Gnuserv vs Emacsserver
2008-11-28 22:26 ` Gnuserv vs Emacsserver Chetan
@ 2008-11-29 10:04 ` Eli Zaretskii
[not found] ` <mailman.1476.1227953070.26697.help-gnu-emacs@gnu.org>
2008-12-02 3:32 ` Chetan
2 siblings, 0 replies; 11+ messages in thread
From: Eli Zaretskii @ 2008-11-29 10:04 UTC (permalink / raw
To: help-gnu-emacs
> From: Chetan <Chetan.xspam@xspam.sbcglobal.net>
> Date: Fri, 28 Nov 2008 14:26:28 -0800
>
> 1. My version of gnuclient starts emacs (if it can find it) if it
> cannot connect to a running instance.
I believe "emacsclient -a" can do that, too.
> 2. Irrespective of whether I am running emacs 21 or 22, it can still
> connect.
Do you really need to run Emacs 21 from time to time?
> 3. The biggest irritant is that if I start another instance of emacs,
> either by mistake or because I want to do something in a console
> window, it clobbers my previous instance.
You can arrange for it to not do that in your .emacs: just don't start
the server if there's evidence that one other instance is already up
and running.
> 4. I need to change too many places in the system registry where it
> invokes gnuclient.
You could have a script called gnuclient.cmd that just invoked
emacsclient.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Gnuserv vs Emacsserver
[not found] ` <mailman.1476.1227953070.26697.help-gnu-emacs@gnu.org>
@ 2008-11-29 13:10 ` Will Parsons
0 siblings, 0 replies; 11+ messages in thread
From: Will Parsons @ 2008-11-29 13:10 UTC (permalink / raw
To: help-gnu-emacs
Eli Zaretskii wrote:
> Do you really need to run Emacs 21 from time to time?
I don't know about the OP, but I *definitely* need to run Emacs 21, due to
problems editing remote files with tramp/ange-ftp under Emacs 22 (as I've
posted previously).
--
Will
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Gnuserv vs Emacsserver
@ 2008-11-30 18:46 Magnus Berg
0 siblings, 0 replies; 11+ messages in thread
From: Magnus Berg @ 2008-11-30 18:46 UTC (permalink / raw
To: help-gnu-emacs
>>>>> >/ Hi!/
>>>>> >
>>>>> >/ I'm little confused about the possibilities with Emacsserver in Emacs
>>>>> > 23/
>>>>> >/ (cvs). I had used Gnuserv before because it makes it possible to open
>>>>> > a
>>>>> > new/
>>>>> >/ buffers/files, from the filemanager etc, in the initial frame (whith/
>>>>> >/ dtemacs). I don't want to have my screen cluttered with frames./
>>>>> >/ Now I wonder if it's possible to do the same with Emacs 23:s
>>>>> > Emacsserver or/
>>>>> >/ if I should continue to use Gnuserver for that. If it's possible
>>>>> > with/
>>>>> >/ Emacsserver, can you tell me how./
>>>>>
>>>>> Maybe you can find your answer here:
>>>>>
>>>>> http://www.emacswiki.org/emacs/EmacsClient
>>>>>
>>>>
>>>> No, there was nothing about opening new buffers/files in the initial
>>>> frame.
>>>
>>> Sorry, you are right. Look at the option server-window in Emacs. (I am
>>> surprised it is not mentioned.) Does that help you?
>>
>> No! :-) I have read quite a lot about emacsserver. (I got the "GNU Emacs
>> manual" as a book and it covers version 22) I have searched and looked up
>> the options but I don't get a grip of it. I found a option for emacsserver
>> there I can set the variable "server-window" to a window or a frame. And it
>> is by default set to "Use selected window" and it is possible to chose
>> "Display in new frame", "Use pop-to-buffer" and "Other function". I suppose
>> the last alternative could include some smart setting for the ones who knows
>> lisp or what to do. But I don't.
>>
>> But I'm not sitting here crying :-) I installed Gnuserv and it does what I
>> want. But it should be fun to now how to do it without extra lisp packages,
>> if it is possible with the included emacsserver.
>>
>> Thanks for your interest in my question Lennart!
>
>
> But can you then please explain what you want to do then? I thought
> you wanted to open a file in a specific Emacs frame. Is not that what
> you want to do?
Yes!
But the defult "Use selected window" in the the variable "server-window"
doesn't, even if it maybe should. And I had the argument
(server-start) in my .emacs As I understand it that should run Emacs as
Emacsserver. And I choose to open new files, from the filemanager with
the application/command emacsclient. But all opened files creates a new
frame.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: Gnuserv vs Emacsserver
2008-11-28 22:26 ` Gnuserv vs Emacsserver Chetan
2008-11-29 10:04 ` Eli Zaretskii
[not found] ` <mailman.1476.1227953070.26697.help-gnu-emacs@gnu.org>
@ 2008-12-02 3:32 ` Chetan
2 siblings, 0 replies; 11+ messages in thread
From: Chetan @ 2008-12-02 3:32 UTC (permalink / raw
To: help-gnu-emacs
[-- Attachment #1: Type: text/plain, Size: 1501 bytes --]
Chetan <Chetan.xspam@xspam.sbcglobal.net> writes:
...
> I have wondered about swithing to emacsserver for some time. I have
> been using gnuclient for a long time (on W32). Changing over to
> emacsserver became a possibility with emacs 22, but I haven't yet done
> it.
>
> For my style of working, I find there are irritations in switching
> over. I wonder if anybody has any solution.
>
> 1. My version of gnuclient starts emacs (if it can find it) if it
> cannot connect to a running instance. I could, of course, make sure it
> is running before I use it.
>
> 2. Irrespective of whether I am running emacs 21 or 22, it can still
> connect.
>
> 3. The biggest irritant is that if I start another instance of emacs,
> either by mistake or because I want to do something in a console
> window, it clobbers my previous instance. With gnuserve, it fails with
> a dialog box, which is also irritating, but it works the way I want
> it. Ideally I would not like to keep changing the commandline, but I
> don't see how I would do it even with that.
>
> 4. I need to change too many places in the system registry where it
> invokes gnuclient. I can perhaps do that if I can handle the others.
>
> Chetan
After looking at the suggestions, I have tried to work on my most
irritant point 3.
Here is a package that does what I want.
Now the next is to try item 4. Looks like creating an executable that
handles the same arguments but uses emacsserver is the simplest.
I will try to do that for me.
Chetan
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Extension to server-start in `server' --]
[-- Type: text/emacs-lisp, Size: 3721 bytes --]
;; server-x.el -- provide functions for starting emacsserver differently
;; Copyright 2008 by Chetan Pandya <pandyacus@yahoo.com>
;;
;; This file is NOT (yet) part of GNU Emacs.
;;
;; This program is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation; either version 3, or (at your option)
;; any later version.
;;
;; This program is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details.
;;
;; You should have received a copy of the GNU General Public License
;; along with this program; if not, you can either send email to this
;; program's maintainer or write to: The Free Software Foundation,
;; Inc.; 59 Temple Place, Suite 330; Boston, MA 02111-1307, USA.
;;
;;; Commentary:
;;
;; This emacs script provides functions starting emacsserver with
;; additional information than server-start.
;;
;; Installation:
;;
;; Simplest way is to `load' or `require' the file.
;; Customize the startup action, if desired.
;;
;;; Code:
;; User configurable variables:
(if (< emacs-major-version 22)
(error "Not supported on emacs version before 22.0"))
(defcustom server-startup 'check
"Deal with existing files at startup"
:type '(choice
(const :tag "Ignore - delete file. Default in absence of server-x" nil)
(const :tag "Search - set server name" search)
(const :tag "Abort" check))
:group 'server)
(defvar server-file-name nil "Name of the server file")
(defvar server-name-base nil "Internal: name of the server to use as base")
(defvar server-name-prev "" "Internal: name of the server started earlier")
(require 'server)
(defadvice server-start (around sstart-around protect)
(let ((kill-only (ad-get-arg 0)) ret bypass (i 0)
(sname server-name) s-dir s-file)
(when (not kill-only) ; killing the server
(setq s-dir (if server-use-tcp server-auth-dir server-socket-dir))
(setq s-file (expand-file-name sname s-dir))
(cond ((eq server-startup 'check)
(when (file-exists-p s-file)
(message "File %s exists.\nPlease delete file if another emacs is not using it or change the value of server-name and try again." s-file)
(setq bypass t)))
((eq server-startup 'search)
(if (or (null server-name-base)
(not (string= server-name server-name-prev)))
(setq server-name-base server-name))
(while (file-exists-p s-file)
(setq i (1+ i))
(setq sname (format "%s%d" server-name-base i))
(setq s-file (expand-file-name sname s-dir))))))
(let ((server-name sname))
(setq ret (if bypass nil
;;
ad-do-it
;;
)))
(cond (kill-only
(if server-file-name
(ignore-errors (delete-file server-file-name)))
(setq server-process nil
server-file-name nil)
(remove-hook 'kill-emacs-hook 'server-kill-on-exit))
(t
(cond (server-process
(setq server-name sname
server-name-prev sname ; if user changes it
server-file-name s-file)
(add-hook 'kill-emacs-hook 'server-kill-on-exit))
(t
(setq server-file-name nil)
(remove-hook 'kill-emacs-hook 'server-kill-on-exit)))))
ret))
(defun server-kill-on-exit ()
(when (and server-file-name server-process)
;; killing the server tries to close connections, which could hang.
;; (server-start t) ; kill the server
;; Disable new connections
(ignore-errors (delete-file server-file-name))))
(unless (featurep 'gnuserv)
(ad-activate 'server-start))
;;(provide 'server-x)
;; server-x.el ends here
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2008-12-02 3:32 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <mailman.1447.1227901272.26697.help-gnu-emacs@gnu.org>
2008-11-28 22:26 ` Gnuserv vs Emacsserver Chetan
2008-11-29 10:04 ` Eli Zaretskii
[not found] ` <mailman.1476.1227953070.26697.help-gnu-emacs@gnu.org>
2008-11-29 13:10 ` Will Parsons
2008-12-02 3:32 ` Chetan
2008-11-30 18:46 Magnus Berg
-- strict thread matches above, loose matches on Subject: below --
2008-11-28 19:41 Magnus Berg
2008-11-28 19:46 ` Lennart Borgman
2008-11-27 13:03 Magnus Berg
2008-11-27 14:16 ` Lennart Borgman
2008-11-26 13:14 Magnus Berg
2008-11-26 15:13 ` Lennart Borgman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).