all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* How to jump to running emacs with emacsclient
@ 2010-06-27 19:33 Dan Davison
  2010-06-27 22:11 ` Juanma Barranquero
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Dan Davison @ 2010-06-27 19:33 UTC (permalink / raw)
  To: help-gnu-emacs

Using gnome on ubuntu, a shell command like

emacsclient /some/file

switches window focus to the running emacs and visits the file.

I'd like to do this without specifying a file to visit, so that I can
(in gnome) bind a command to a key that will cause my window manager to
simply jump to emacs and show the current buffer. How?

Dan



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: How to jump to running emacs with emacsclient
  2010-06-27 19:33 How to jump to running emacs with emacsclient Dan Davison
@ 2010-06-27 22:11 ` Juanma Barranquero
  2010-06-28  1:42   ` Lennart Borgman
       [not found] ` <AANLkTinClSWqC70gNbqJIgjca4YbJyHOSGohcBz1ib8a@mail.gmail.com>
  2010-06-30  4:26 ` Pranav Peshwe
  2 siblings, 1 reply; 10+ messages in thread
From: Juanma Barranquero @ 2010-06-27 22:11 UTC (permalink / raw)
  To: Dan Davison; +Cc: help-gnu-emacs

On Sun, Jun 27, 2010 at 21:33, Dan Davison <dandavison7@gmail.com> wrote:
> Using gnome on ubuntu, a shell command like

> I'd like to do this without specifying a file to visit, so that I can
> (in gnome) bind a command to a key that will cause my window manager to
> simply jump to emacs and show the current buffer. How?

You could try perhaps

   emacsclient -n --eval '(progn (raise-frame)
(select-frame-set-input-focus (selected-frame)))'

    Juanma



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: How to jump to running emacs with emacsclient
  2010-06-27 22:11 ` Juanma Barranquero
@ 2010-06-28  1:42   ` Lennart Borgman
  2010-06-28  1:54     ` Juanma Barranquero
  0 siblings, 1 reply; 10+ messages in thread
From: Lennart Borgman @ 2010-06-28  1:42 UTC (permalink / raw)
  To: Juanma Barranquero; +Cc: help-gnu-emacs, Dan Davison

On Mon, Jun 28, 2010 at 12:11 AM, Juanma Barranquero <lekktu@gmail.com> wrote:
> On Sun, Jun 27, 2010 at 21:33, Dan Davison <dandavison7@gmail.com> wrote:
>> Using gnome on ubuntu, a shell command like
>
>> I'd like to do this without specifying a file to visit, so that I can
>> (in gnome) bind a command to a key that will cause my window manager to
>> simply jump to emacs and show the current buffer. How?
>
> You could try perhaps
>
>   emacsclient -n --eval '(progn (raise-frame)
> (select-frame-set-input-focus (selected-frame)))'


Doesn't select-frame-set-input-focus do raise-frame?



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: How to jump to running emacs with emacsclient
  2010-06-28  1:42   ` Lennart Borgman
@ 2010-06-28  1:54     ` Juanma Barranquero
  2010-06-28  1:57       ` Lennart Borgman
  0 siblings, 1 reply; 10+ messages in thread
From: Juanma Barranquero @ 2010-06-28  1:54 UTC (permalink / raw)
  To: Lennart Borgman; +Cc: help-gnu-emacs, Dan Davison

On Mon, Jun 28, 2010 at 03:42, Lennart Borgman
<lennart.borgman@gmail.com> wrote:

> Doesn't select-frame-set-input-focus do raise-frame?

Perhaps. I just did cursory testing.

    Juanma



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: How to jump to running emacs with emacsclient
  2010-06-28  1:54     ` Juanma Barranquero
@ 2010-06-28  1:57       ` Lennart Borgman
  2010-06-28  2:16         ` Juanma Barranquero
  0 siblings, 1 reply; 10+ messages in thread
From: Lennart Borgman @ 2010-06-28  1:57 UTC (permalink / raw)
  To: Juanma Barranquero; +Cc: help-gnu-emacs, Dan Davison

On Mon, Jun 28, 2010 at 3:54 AM, Juanma Barranquero <lekktu@gmail.com> wrote:
> On Mon, Jun 28, 2010 at 03:42, Lennart Borgman
> <lennart.borgman@gmail.com> wrote:
>
>> Doesn't select-frame-set-input-focus do raise-frame?
>
> Perhaps. I just did cursory testing.


It does call raise-frame, but I get a bit curious. Was there something
in your testing that indicated that you needed another raise-frame or
was it "just to be sure"?



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: How to jump to running emacs with emacsclient
  2010-06-28  1:57       ` Lennart Borgman
@ 2010-06-28  2:16         ` Juanma Barranquero
  0 siblings, 0 replies; 10+ messages in thread
From: Juanma Barranquero @ 2010-06-28  2:16 UTC (permalink / raw)
  To: Lennart Borgman; +Cc: help-gnu-emacs, Dan Davison

On Mon, Jun 28, 2010 at 03:57, Lennart Borgman
<lennart.borgman@gmail.com> wrote:

> It does call raise-frame, but I get a bit curious. Was there something
> in your testing that indicated that you needed another raise-frame or
> was it "just to be sure"?

Neither. It was just that I started from

   emacsclient -n --eval '(raise-frame)'

and then needed to get the focus and I added it without checking
whether select-frame-set-input-focus already raised the frame. I
wasn't writing code, just trying to find a workaround for the OP's
request.

    Juanma



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: How to jump to running emacs with emacsclient
       [not found] <mailman.6.1277675708.16637.help-gnu-emacs@gnu.org>
@ 2010-06-28 10:36 ` Pranav Peshwe
  0 siblings, 0 replies; 10+ messages in thread
From: Pranav Peshwe @ 2010-06-28 10:36 UTC (permalink / raw)
  To: help-gnu-emacs

On Jun 28, 12:33 am, Dan Davison <dandavis...@gmail.com> wrote:
> Using gnome on ubuntu, a shell command like
>
> emacsclient /some/file
>
> switches window focus to the running emacs and visits the file.
>
> I'd like to do this without specifying a file to visit, so that I can
> (in gnome) bind a command to a key that will cause my window manager to
> simply jump to emacs and show the current buffer. How?
>
> Dan

Hi Dan,
           A crude but practical way to accomplish that is - open
emacs(or any app for that matter) in its own workspace and assign a
shortcut key in gnome to switch to that workspace.

HTH.

Best regards,
Pranav


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: How to jump to running emacs with emacsclient
       [not found] ` <AANLkTinClSWqC70gNbqJIgjca4YbJyHOSGohcBz1ib8a@mail.gmail.com>
@ 2010-06-29 15:02   ` Chris Newton
  2010-06-29 15:53     ` Dan Davison
  0 siblings, 1 reply; 10+ messages in thread
From: Chris Newton @ 2010-06-29 15:02 UTC (permalink / raw)
  To: Dan Davison; +Cc: help-gnu-emacs

[-- Attachment #1: Type: text/plain, Size: 632 bytes --]

Are you using metacity or compiz for your window manager? Metacity ignores
raise requests in many versions. I noticed that raise finally works well in
stock ubuntu 10.4 with gnome and compiz. Not sure about metacity though.

On Jun 27, 2010 3:56 PM, "Dan Davison" <dandavison7@gmail.com> wrote:

Using gnome on ubuntu, a shell command like

emacsclient /some/file

switches window focus to the running emacs and visits the file.

I'd like to do this without specifying a file to visit, so that I can
(in gnome) bind a command to a key that will cause my window manager to
simply jump to emacs and show the current buffer. How?

Dan

[-- Attachment #2: Type: text/html, Size: 831 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: How to jump to running emacs with emacsclient
  2010-06-29 15:02   ` Chris Newton
@ 2010-06-29 15:53     ` Dan Davison
  0 siblings, 0 replies; 10+ messages in thread
From: Dan Davison @ 2010-06-29 15:53 UTC (permalink / raw)
  To: Chris Newton; +Cc: help-gnu-emacs

Chris Newton <redshodan@gmail.com> writes:

> Are you using metacity or compiz for your window manager? Metacity ignores
> raise requests in many versions. I noticed that raise finally works well in
> stock ubuntu 10.4 with gnome and compiz. Not sure about metacity though.

I'm using gnome with compiz under ubuntu 10.04. I was surprised to learn
that Emacs could order the WM around in this fashion but it seems to
work perfectly. I haven't tried metacity as my compiz settings tend to
get screwed up when I switch compiz off and on again. As per the
subsequent discussion in the thread, I am now using the simplified
version

emacsclient -n --eval '(select-frame-set-input-focus (selected-frame))'

Dan

>
> On Jun 27, 2010 3:56 PM, "Dan Davison" <dandavison7@gmail.com> wrote:
>
> Using gnome on ubuntu, a shell command like
>
> emacsclient /some/file
>
> switches window focus to the running emacs and visits the file.
>
> I'd like to do this without specifying a file to visit, so that I can
> (in gnome) bind a command to a key that will cause my window manager to
> simply jump to emacs and show the current buffer. How?
>
> Dan



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: How to jump to running emacs with emacsclient
  2010-06-27 19:33 How to jump to running emacs with emacsclient Dan Davison
  2010-06-27 22:11 ` Juanma Barranquero
       [not found] ` <AANLkTinClSWqC70gNbqJIgjca4YbJyHOSGohcBz1ib8a@mail.gmail.com>
@ 2010-06-30  4:26 ` Pranav Peshwe
  2 siblings, 0 replies; 10+ messages in thread
From: Pranav Peshwe @ 2010-06-30  4:26 UTC (permalink / raw)
  To: Dan Davison; +Cc: help-gnu-emacs

[-- Attachment #1: Type: text/plain, Size: 647 bytes --]

On Mon, Jun 28, 2010 at 1:03 AM, Dan Davison <dandavison7@gmail.com> wrote:

> Using gnome on ubuntu, a shell command like
>
> emacsclient /some/file
>
> switches window focus to the running emacs and visits the file.
>
> I'd like to do this without specifying a file to visit, so that I can
> (in gnome) bind a command to a key that will cause my window manager to
> simply jump to emacs and show the current buffer. How?
>
>
Hi Dan,
           A crude but practical way to accomplish that is - open
emacs(or any app for that matter) in its own workspace and assign a
shortcut key in gnome to switch to that workspace.

HTH.
Best regards,
Pranav

[-- Attachment #2: Type: text/html, Size: 1053 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2010-06-30  4:26 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-06-27 19:33 How to jump to running emacs with emacsclient Dan Davison
2010-06-27 22:11 ` Juanma Barranquero
2010-06-28  1:42   ` Lennart Borgman
2010-06-28  1:54     ` Juanma Barranquero
2010-06-28  1:57       ` Lennart Borgman
2010-06-28  2:16         ` Juanma Barranquero
     [not found] ` <AANLkTinClSWqC70gNbqJIgjca4YbJyHOSGohcBz1ib8a@mail.gmail.com>
2010-06-29 15:02   ` Chris Newton
2010-06-29 15:53     ` Dan Davison
2010-06-30  4:26 ` Pranav Peshwe
     [not found] <mailman.6.1277675708.16637.help-gnu-emacs@gnu.org>
2010-06-28 10:36 ` Pranav Peshwe

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.