From: "David De La Harpe Golden" <david.delaharpe.golden@gmail.com>
To: emacs-devel@gnu.org
Subject: Re: emacsclient bug
Date: Mon, 4 Feb 2008 14:56:53 +0000 [thread overview]
Message-ID: <8e24944a0802040656y9695bcbr97900dfb3a2ee63a@mail.gmail.com> (raw)
In-Reply-To: <m2y7a1q70d.fsf@kenny.sha-bang.de>
[-- Attachment #1: Type: text/plain, Size: 263 bytes --]
On 04/02/2008, Sascha Wilde <wilde@sha-bang.de> wrote:
> emacsclient -D -c
> emacsclient: invalid option -- D
>
Sorry, I was suggesting adding a -D meaning "use display from
$DISPLAY", I know emacsclient doesn't have it. Very trivial patch to
do this attached.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: emacsclient-disp-from-env.diff --]
[-- Type: text/x-diff; name=emacsclient-disp-from-env.diff, Size: 2074 bytes --]
Index: emacsclient.c
===================================================================
RCS file: /sources/emacs/emacs/lib-src/emacsclient.c,v
retrieving revision 1.121
diff -U 4 -r1.121 emacsclient.c
--- emacsclient.c 26 Jan 2008 21:27:38 -0000 1.121
+++ emacsclient.c 4 Feb 2008 14:50:22 -0000
@@ -171,8 +171,9 @@
#endif
{ "server-file", required_argument, NULL, 'f' },
#ifndef WINDOWSNT
{ "display", required_argument, NULL, 'd' },
+ { "this-display", no_argument, NULL, 'D'},
#endif
{ 0, 0, 0, 0 }
};
@@ -479,24 +480,15 @@
char **argv;
{
alternate_editor = egetenv ("ALTERNATE_EDITOR");
- /* We used to set `display' to $DISPLAY by default, but this changed the
- default behavior and is sometimes inconvenient. So instead of forcing
- users to say "--display ''" when they want to use Emacs's existing tty
- or display connection, we force them to use "--display $DISPLAY" if
- they want Emacs to connect to their current display. */
-#if 0
- display = egetenv ("DISPLAY");
-#endif
-
while (1)
{
int opt = getopt_long (argc, argv,
#ifndef NO_SOCKETS_IN_FILE_SYSTEM
- "VHnea:s:f:d:tc",
+ "VHnea:s:f:d:Dtc",
#else
- "VHnea:f:d:tc",
+ "VHnea:f:d:Dtc",
#endif
longopts, 0);
if (opt == EOF)
@@ -530,8 +522,11 @@
#if 1 /* !defined WINDOWS */
case 'd':
display = optarg;
break;
+ case 'D':
+ display = egetenv ("DISPLAY");
+ break;
#endif
case 'n':
nowait = 1;
@@ -612,9 +607,11 @@
use the current Emacs frame\n\
-e, --eval Evaluate the FILE arguments as ELisp expressions\n\
-n, --no-wait Don't wait for the server to return\n"
#ifndef WINDOWSNT
-"-d, --display=DISPLAY Visit the file in the given display\n"
+"-d, --display=DISPLAY Visit the file in the given X11 display\n"
+"-D, --this-display Visit the file in current X11 display\n\
+ (found in environment variable $DISPLAY)\n"
#endif
#ifndef NO_SOCKETS_IN_FILE_SYSTEM
"-s, --socket-name=FILENAME\n\
Set filename of the UNIX socket for communication\n"
next prev parent reply other threads:[~2008-02-04 14:56 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-17 0:07 emacsclient bug Len Trigg
2008-01-17 15:42 ` Stefan Monnier
2008-01-17 17:48 ` Len Trigg
2008-01-17 17:56 ` Len Trigg
2008-01-17 18:42 ` Stefan Monnier
2008-01-17 19:00 ` Len Trigg
2008-01-20 20:41 ` Stefan Monnier
2008-01-20 21:56 ` Len Trigg
2008-01-21 1:45 ` Stefan Monnier
2008-01-21 3:16 ` Len Trigg
2008-01-21 9:54 ` Andreas Schwab
2008-01-21 15:52 ` Stefan Monnier
2008-01-22 11:30 ` Richard Stallman
2008-01-26 21:58 ` Stefan Monnier
2008-01-27 2:06 ` Dan Nicolaescu
[not found] ` <ur9odb89g39.fsf@totally-fudged-out-message-id>
2008-01-27 15:41 ` Dan Nicolaescu
2008-01-28 7:57 ` KOBAYASHI Yasuhiro
2008-01-31 17:15 ` Sascha Wilde
2008-02-03 0:10 ` David De La Harpe Golden
2008-02-04 11:46 ` Sascha Wilde
2008-02-04 14:56 ` David De La Harpe Golden [this message]
2008-02-04 15:04 ` David De La Harpe Golden
2008-02-04 17:33 ` Sascha Wilde
2008-02-06 17:29 ` Stefan Monnier
2008-02-06 17:40 ` Dan Nicolaescu
2008-02-06 19:31 ` Stefan Monnier
2008-02-07 0:44 ` Richard Stallman
2008-02-07 0:50 ` Leo
2008-02-07 1:00 ` Dan Nicolaescu
2008-02-07 9:03 ` Sascha Wilde
2008-02-08 4:16 ` Richard Stallman
2008-02-07 9:05 ` Sascha Wilde
2008-02-08 15:27 ` Stefan Monnier
2008-02-09 14:50 ` Sascha Wilde
2008-02-07 8:56 ` Sascha Wilde
2008-02-04 4:57 ` Leo
2008-01-27 16:03 ` Richard Stallman
2008-01-20 21:56 ` Len Trigg
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8e24944a0802040656y9695bcbr97900dfb3a2ee63a@mail.gmail.com \
--to=david.delaharpe.golden@gmail.com \
--cc=emacs-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
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).