aboutsummaryrefslogtreecommitdiffstats
path: root/lib-src
diff options
context:
space:
mode:
authorEli Zaretskii2022-11-19 21:34:07 +0200
committerEli Zaretskii2022-11-19 21:34:07 +0200
commit1682bd18f50ed2095b2162207603c6b8a3f0225f (patch)
treef0eda12f210d0403c916046add26c3855aa21cca /lib-src
parent2ec39734ca03e075f2515f178ed789872e52f98f (diff)
downloademacs-1682bd18f50ed2095b2162207603c6b8a3f0225f.tar.gz
emacs-1682bd18f50ed2095b2162207603c6b8a3f0225f.zip
Fix encoding and display of messages sent by server to emacsclient
* lisp/server.el (server-start): Use 'locale-coding-system' to encode messages sent back to the client. * lib-src/emacsclient.c (main): Print '-error' messages via 'message', not directly via 'fprintf'. This shows the error on MS-Windows when the client is invoked as 'emacsclientw', since stderr goes to the bit bucket in that case.
Diffstat (limited to 'lib-src')
-rw-r--r--lib-src/emacsclient.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib-src/emacsclient.c b/lib-src/emacsclient.c
index 425db8cface..ee124ea135c 100644
--- a/lib-src/emacsclient.c
+++ b/lib-src/emacsclient.c
@@ -2240,7 +2240,7 @@ main (int argc, char **argv)
2240 char *str = unquote_argument (p + strlen ("-error ")); 2240 char *str = unquote_argument (p + strlen ("-error "));
2241 if (!skiplf) 2241 if (!skiplf)
2242 printf ("\n"); 2242 printf ("\n");
2243 fprintf (stderr, "*ERROR*: %s", str); 2243 message (true, "*ERROR*: %s", str);
2244 if (str[0]) 2244 if (str[0])
2245 skiplf = str[strlen (str) - 1] == '\n'; 2245 skiplf = str[strlen (str) - 1] == '\n';
2246 exit_status = EXIT_FAILURE; 2246 exit_status = EXIT_FAILURE;