all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#9305: emacsclient -n -c path/to/file   # opens *scratch*
@ 2011-08-15 15:25 Stefan Klinger
  2011-08-20 11:12 ` Stefan Klinger
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Stefan Klinger @ 2011-08-15 15:25 UTC (permalink / raw)
  To: 9305

Hello,

I'm having a problem with newly created frames when running ‘emacsclient -c
path/to/file’: If there is already a frame showing the file, a new frame is
created (as intended) but it displays a *scratch* buffer, instead of the already
existing buffer for that file.

Expecting a configuration problem, I have recently posted this on help-gnu-emacs
[1], but received no reply.


-- Reproduce --

It's not my fault:

  killall -9 emacs
  rm -rf ~/.emacs.d/
  
Now request first frame and start emacs daemon, works as expected (well, almost:
I'd prever emacs not to assign focus to the new frame, but that can be
configured away [2]).

  emacsclient -n -a '' -c ~/.bashrc

Now, as long as the frame showing ‘~/.bashrc’ is visible (potentially on another
desktop), the following three commands each open a new frame, each of them
showing *scratch*:
  
  emacsclient -n -a '' -c ~/.bashrc
  emacsclient -n -c ~/.bashrc
  emacsclient -c ~/.bashrc

When there's no frame showing ‘~/.bashrc’, then each of the above creates a new
frame showing the existing buffer.


-- Expected bahavior --

Check whether there is a buffer visiting test. If so, show that buffer in the
new frame. Otherwise, visit the file in a new buffer and display that one.


-- Information --

‘emacs-version’ reports “GNU Emacs 23.3.1 (x86_64-pc-linux-gnu, X toolkit, Xaw3d
scroll bars) of 2011-04-10 on brahms, modified by Debian”

Actually I still assume this could be configured, but on help-gnu-emacs, nobody seems to know [1].

Thank you!
Stefan

____________________
[1] https://lists.gnu.org/archive/html/help-gnu-emacs/2011-08/msg00056.html
[2] https://bugs.launchpad.net/ubuntu/+source/emacs23/+bug/589035/comments/2


-- 
Stefan Klinger                                      o/klettern
                                                    /\/  bis zum
send plaintext only - max size 32kB - no spam         \   Abfallen
http://stefan-klinger.de





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

* bug#9305: emacsclient -n -c path/to/file   # opens *scratch*
  2011-08-15 15:25 bug#9305: emacsclient -n -c path/to/file # opens *scratch* Stefan Klinger
@ 2011-08-20 11:12 ` Stefan Klinger
  2011-08-20 22:35 ` Chong Yidong
  2012-11-04  3:12 ` Chong Yidong
  2 siblings, 0 replies; 7+ messages in thread
From: Stefan Klinger @ 2011-08-20 11:12 UTC (permalink / raw)
  To: 9305

Could anyone confirm this?


-- 
Stefan Klinger                                      o/klettern
                                                    /\/  bis zum
send plaintext only - max size 32kB - no spam         \   Abfallen
http://stefan-klinger.de





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

* bug#9305: emacsclient -n -c path/to/file   # opens *scratch*
  2011-08-15 15:25 bug#9305: emacsclient -n -c path/to/file # opens *scratch* Stefan Klinger
  2011-08-20 11:12 ` Stefan Klinger
@ 2011-08-20 22:35 ` Chong Yidong
  2011-08-21 11:29   ` Stefan Klinger
  2012-11-04  3:12 ` Chong Yidong
  2 siblings, 1 reply; 7+ messages in thread
From: Chong Yidong @ 2011-08-20 22:35 UTC (permalink / raw)
  To: Stefan Klinger; +Cc: 9305

Stefan Klinger <all-lists@stefan-klinger.de> writes:

> Now request first frame and start emacs daemon, works as expected
>
>   emacsclient -n -a '' -c ~/.bashrc
>
> Now, as long as the frame showing ‘~/.bashrc’ is visible (potentially
> on another desktop), the following three commands each open a new
> frame, each of them showing *scratch*:
>
>   emacsclient -n -a '' -c ~/.bashrc
>   emacsclient -n -c ~/.bashrc
>   emacsclient -c ~/.bashrc
>
> When there's no frame showing ‘~/.bashrc’, then each of the above
> creates a new frame showing the existing buffer.
>
> -- Expected bahavior --
>
> Check whether there is a buffer visiting test. If so, show that buffer
> in the new frame. Otherwise, visit the file in a new buffer and
> display that one.

Yeah, the -c option to emacsclient means "create a new graphical frame".
Currently, you need to omit -c if you want Emacs to reuse an existing
frame.

The trouble with this is that if no existing graphical frame exists,
that will create a tty frame.  Unfortunately, we don't offer an easy way
to change this behavior yet.  This ought to be fixed, though probably
for Emacs 24.2.





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

* bug#9305: emacsclient -n -c path/to/file   # opens *scratch*
  2011-08-20 22:35 ` Chong Yidong
@ 2011-08-21 11:29   ` Stefan Klinger
  0 siblings, 0 replies; 7+ messages in thread
From: Stefan Klinger @ 2011-08-21 11:29 UTC (permalink / raw)
  To: 9305

Sorry, maybe I did not make myself clear

On 20 August 2011, Chong Yidong wrote with possible deletions:
> Yeah, the -c option to emacsclient means "create a new graphical frame".
> Currently, you need to omit -c if you want Emacs to reuse an existing
> frame.

I do not want to reuse an existing frame, I do want to have a new frame created.

But I want the new frame to show an existing buffer, if the requested file is already being visited.


> The trouble with this is that if no existing graphical frame exists,
> that will create a tty frame.

This is not the problem I  encountered.


-- 
Stefan Klinger                                      o/klettern
                                                    /\/  bis zum
send plaintext only - max size 32kB - no spam         \   Abfallen
http://stefan-klinger.de





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

* bug#9305: emacsclient -n -c path/to/file   # opens *scratch*
  2011-08-15 15:25 bug#9305: emacsclient -n -c path/to/file # opens *scratch* Stefan Klinger
  2011-08-20 11:12 ` Stefan Klinger
  2011-08-20 22:35 ` Chong Yidong
@ 2012-11-04  3:12 ` Chong Yidong
  2012-11-04 14:58   ` Stefan Klinger
  2 siblings, 1 reply; 7+ messages in thread
From: Chong Yidong @ 2012-11-04  3:12 UTC (permalink / raw)
  To: Stefan Klinger; +Cc: 9305

Stefan Klinger <all-lists@stefan-klinger.de> writes:

>   emacsclient -n -a '' -c ~/.bashrc
>   emacsclient -n -c ~/.bashrc
>   emacsclient -c ~/.bashrc
>
> When there's no frame showing ~/.bashrc, then each of the above
> creates a new frame showing the existing buffer.

Does this problem still occur for you?  I haven't been able to reproduce
it.  If so, please provide your Emacs version and platform (all the
information which would normally be provided with M-x report-emacs-bug).





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

* bug#9305: emacsclient -n -c path/to/file   # opens *scratch*
  2012-11-04  3:12 ` Chong Yidong
@ 2012-11-04 14:58   ` Stefan Klinger
  2012-12-08  2:40     ` Chong Yidong
  0 siblings, 1 reply; 7+ messages in thread
From: Stefan Klinger @ 2012-11-04 14:58 UTC (permalink / raw)
  To: Chong Yidong; +Cc: 9305

Hello,

and thank you very much for looking into this!

On 2012-Nov-04 11:12 (+0800), Chong Yidong wrote with possible deletions:
> Does this problem still occur for you?  I haven't been able to reproduce
> it.  If so, please provide your Emacs version and platform (all the
> information which would normally be provided with M-x report-emacs-bug).

Unfortunately yes, the problem still persists:


Experiment 1:

    killall -9 emacs
    rm -rf ~/.emacs.d/

    emacsclient -n -a '' -c ~/.bashrc  # first call
    emacsclient -n -a '' -c ~/.bashrc  # second call

The first call starts emacs showing ~/.bashrc.  But the second call
creates a new frame showing *scratch*, and then focuses the other frame
showing ~/.bashrc.  Expected bahavior: Open new frame on current
desktop, showing the buffer visiting ~/.bashrc.


Experiment 2:

    killall -9 emacs
    rm -rf ~/.emacs.d/
    emacsclient -n -a '' -c ~/.bashrc  # first call
    # delete the window using the winidow manager
    emacsclient -n -a '' -c ~/.bashrc  # second call

Good, the second call created a new frame showing the requested file.


Experiment 3:

    killall -9 emacs
    rm -rf ~/.emacs.d/
    emacsclient -n -a '' -c ~/.bashrc  # first call
    # iconify window
    emacsclient -n -a '' -c ~/.bashrc  # second call

Bad: Deiconifies existing window, but also creates a new frame showing
*scratch*, which is unexpected.


Here's the requested information.  Please ask if you need any further
information...

In GNU Emacs 23.4.1 (x86_64-pc-linux-gnu, X toolkit, Xaw3d scroll bars)
 of 2012-09-08 on trouble, modified by Debian
Windowing system distributor `The X.Org Foundation', version 11.0.11204000
configured using `configure  '--build' 'x86_64-linux-gnu' '--build' 'x86_64-linux-gnu' '--prefix=/usr' '--sharedstatedir=/var/lib' '--libexecdir=/usr/lib' '--localstatedir=/var/lib' '--infodir=/usr/share/info' '--mandir=/usr/share/man' '--with-pop=yes' '--enable-locallisppath=/etc/emacs23:/etc/emacs:/usr/local/share/emacs/23.4/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/23.4/site-lisp:/usr/share/emacs/site-lisp' '--with-crt-dir=/usr/lib/x86_64-linux-gnu' '--with-x=yes' '--with-x-toolkit=lucid' '--with-toolkit-scroll-bars' '--without-gconf' 'build_alias=x86_64-linux-gnu' 'CFLAGS=-g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -Wall -DDEBIAN -O2' 'CPPFLAGS=-D_FORTIFY_SOURCE=2''

Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: en_US.UTF-8
  value of $XMODIFIERS: nil
  locale-coding-system: utf-8-unix
  default enable-multibyte-characters: t

Major mode: Lisp Interaction

Minor modes in effect:
  tooltip-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t

Recent input:
M-x <help-echo> <down-mouse-2> <mouse-2> <return>

Recent messages:
Loading /var/cache/dictionaries-common/emacsen-ispell-default.el (source)...done
Loading debian-ispell...done
Loading /var/cache/dictionaries-common/emacsen-ispell-dicts.el (source)...done
Loading /etc/emacs/site-start.d/50dictionaries-common.el (source)...done
Loading /etc/emacs/site-start.d/50haskell-mode.el (source)...
Loading haskell-site-file...done
Loading /etc/emacs/site-start.d/50haskell-mode.el (source)...done
Loading /etc/emacs/site-start.d/50psvn.el (source)...done
Starting Emacs daemon.
When done with this frame, type C-x 5 0

Load-path shadows:
/usr/share/emacs/23.4/site-lisp/debian-startup hides /usr/share/emacs/site-lisp/debian-startup
/usr/share/emacs23/site-lisp/dictionaries-common/ispell hides /usr/share/emacs/23.4/lisp/textmodes/ispell
/usr/share/emacs23/site-lisp/dictionaries-common/flyspell hides /usr/share/emacs/23.4/lisp/textmodes/flyspell

Features:
(shadow sort mail-extr message sendmail regexp-opt ecomplete rfc822 mml
easymenu mml-sec password-cache mm-decode mm-bodies mm-encode mailcap
mail-parse rfc2231 rfc2047 rfc2045 qp ietf-drums mailabbrev nnheader
gnus-util netrc time-date mm-util mail-prsvr gmm-utils wid-edit
mailheader canlock sha1 hex-util hashcash mail-utils emacsbug server
tooltip ediff-hook vc-hooks lisp-float-type mwheel x-win x-dnd
font-setting tool-bar dnd fontset image fringe lisp-mode register page
menu-bar rfn-eshadow timer select scroll-bar mldrag mouse jit-lock
font-lock syntax facemenu font-core frame cham georgian utf-8-lang
misc-lang vietnamese tibetan thai tai-viet lao korean japanese hebrew
greek romanian slovak czech european ethiopic indian cyrillic chinese
case-table epa-hook jka-cmpr-hook help simple abbrev loaddefs button
minibuffer faces cus-face files text-properties overlay md5 base64
format env code-pages mule custom widget hashtable-print-readable
backquote make-network-process dbusbind font-render-setting x-toolkit x
multi-tty emacs)


-- 
Stefan Klinger                                      o/klettern
                                                    /\/  bis zum
send plaintext only - max size 32kB - no spam         \   Abfallen
http://stefan-klinger.de





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

* bug#9305: emacsclient -n -c path/to/file   # opens *scratch*
  2012-11-04 14:58   ` Stefan Klinger
@ 2012-12-08  2:40     ` Chong Yidong
  0 siblings, 0 replies; 7+ messages in thread
From: Chong Yidong @ 2012-12-08  2:40 UTC (permalink / raw)
  To: Stefan Klinger; +Cc: 9305

Stefan Klinger <all-lists@stefan-klinger.de> writes:

>     killall -9 emacs
>     rm -rf ~/.emacs.d/
>
>     emacsclient -n -a '' -c ~/.bashrc  # first call
>     emacsclient -n -a '' -c ~/.bashrc  # second call
>
> The first call starts emacs showing ~/.bashrc.  But the second call
> creates a new frame showing *scratch*, and then focuses the other frame
> showing ~/.bashrc.  Expected bahavior: Open new frame on current
> desktop, showing the buffer visiting ~/.bashrc.

Thanks, I can reproduce this in Emacs 23.4.  It is already fixed in
Emacs 24.  Thanks for the bug report.





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

end of thread, other threads:[~2012-12-08  2:40 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-08-15 15:25 bug#9305: emacsclient -n -c path/to/file # opens *scratch* Stefan Klinger
2011-08-20 11:12 ` Stefan Klinger
2011-08-20 22:35 ` Chong Yidong
2011-08-21 11:29   ` Stefan Klinger
2012-11-04  3:12 ` Chong Yidong
2012-11-04 14:58   ` Stefan Klinger
2012-12-08  2:40     ` Chong Yidong

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.