* bug#16117: 24.3; emacsclient -q enhancement request please also suppress @ 2013-12-12 2:47 gregrwm 2013-12-13 15:46 ` bug#16117: Patch for Emacsclient Unwanted Warning Scott Turner 0 siblings, 1 reply; 5+ messages in thread From: gregrwm @ 2013-12-12 2:47 UTC (permalink / raw) To: 16117 [-- Attachment #1: Type: text/plain, Size: 2467 bytes --] please have emacsclient -qa suppress the following 2 lines: emacsclient: can't find socket; have you started the server? To start the server in Emacs, type "M-x server-start". In GNU Emacs 24.3.1 (x86_64-unknown-linux-gnu) of 2013-10-03 on rose.fo4.net Configured using: `configure '--without-x'' Important settings: value of $LC_COLLATE: en_DK.UTF-8 value of $LC_TIME: en_DK.UTF-8 value of $LANG: en_US.utf8 locale-coding-system: utf-8-unix default enable-multibyte-characters: t Major mode: Emacs-Lisp Minor modes in effect: shell-dirtrack-mode: t evil-mode: t evil-local-mode: t global-undo-tree-mode: t undo-tree-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t transient-mark-mode: t Recent input: : r e p o r t - e m a c s - b u g RET Recent messages: ("emacs" ".emacs") Loading term/xterm...done For information about GNU Emacs and the GNU system, type C-h C-a. delete-backward-char: Text is read-only [2 times] Load-path shadows: ~/.emacs.d/evil/lib/ert hides /usr/local/share/emacs/24.3/lisp/emacs-lisp/ert Features: (shadow sort mail-extr emacsbug message format-spec rfc822 mml easymenu mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mail-utils shell pcomplete comint regexp-opt ansi-color evil evil-integration warnings evil-maps evil-commands ffap url-parse auth-source eieio byte-opt bytecomp byte-compile cconv gnus-util time-date mm-util mail-prsvr password-cache url-vars evil-types evil-search evil-ex evil-macros evil-repeat evil-states evil-core advice advice-preload evil-common windmove rect evil-digraphs evil-vars ring undo-tree derived easy-mmode help-fns cl-macs gv diff cl cl-lib edmacro kmacro server ediff-hook vc-hooks lisp-float-type tabulated-list newcomment lisp-mode register page menu-bar rfn-eshadow timer 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 minibuffer loaddefs button faces cus-face macroexp files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote make-network-process multi-tty emacs) [-- Attachment #2: Type: text/html, Size: 2864 bytes --] ^ permalink raw reply [flat|nested] 5+ messages in thread
* bug#16117: Patch for Emacsclient Unwanted Warning 2013-12-12 2:47 bug#16117: 24.3; emacsclient -q enhancement request please also suppress gregrwm @ 2013-12-13 15:46 ` Scott Turner 2019-06-26 15:02 ` Lars Ingebrigtsen 0 siblings, 1 reply; 5+ messages in thread From: Scott Turner @ 2013-12-13 15:46 UTC (permalink / raw) To: 16117 [-- Attachment #1: Type: text/plain, Size: 2265 bytes --] In emacsclient, if an existing Emacs server cannot be found and an alternate editor is specified, the alternate editor is started. Along the way, emacsclient generates a warning that the server cannot be found. On Windows, this warning is a pop-up dialog box that must be dismissed by the user. This is an unwanted interruption, and irrelevant, since the user has already indicated by using the --alternated-editor option how to handle this situation. The patch below suppresses this warning when the user has specified both the --quiet option and the --alternate-editor option. The reasoning is that --quiet mutes all messages on success, and that because the --alternate-editor has been specified, this message is not reporting an error. It seems like a reasonable compromise that will allow users to see this warning if they like (by not using --quiet) and allow users to avoid it if they like (by using --quiet). *** emacsclient.c Tue Jan 1 15:37:17 2013 --- emacsclient-nomsg.c Fri Dec 13 10:05:30 2013 *************** *** 1002,1015 **** /* Open up an AF_INET socket. */ if ((s = socket (AF_INET, SOCK_STREAM, IPPROTO_TCP)) < 0) { ! sock_err_message ("socket"); return INVALID_SOCKET; } /* Set up the socket. */ if (connect (s, (struct sockaddr *) &server, sizeof server) < 0) { ! sock_err_message ("connect"); return INVALID_SOCKET; } --- 1002,1027 ---- /* Open up an AF_INET socket. */ if ((s = socket (AF_INET, SOCK_STREAM, IPPROTO_TCP)) < 0) { ! /* ! * If we have an alternate editor specified, then a socket error ! * isn't really an "error" (because we'll end up invoking the ! * alternate editor) so if asked we'll be quiet about this error ! * message. ! * ! */ ! if (!quiet || !alternate_editor) { ! sock_err_message ("socket"); ! }; return INVALID_SOCKET; } /* Set up the socket. */ if (connect (s, (struct sockaddr *) &server, sizeof server) < 0) { ! /* See comment above for rationale about showing/not showing err */ ! if (!quiet || !alternate_editor) { ! sock_err_message ("connect"); ! }; return INVALID_SOCKET; } [-- Attachment #2: Type: text/html, Size: 2581 bytes --] ^ permalink raw reply [flat|nested] 5+ messages in thread
* bug#16117: Patch for Emacsclient Unwanted Warning 2013-12-13 15:46 ` bug#16117: Patch for Emacsclient Unwanted Warning Scott Turner @ 2019-06-26 15:02 ` Lars Ingebrigtsen 2020-08-12 22:23 ` Stefan Kangas 0 siblings, 1 reply; 5+ messages in thread From: Lars Ingebrigtsen @ 2019-06-26 15:02 UTC (permalink / raw) To: Scott Turner; +Cc: 16117 Scott Turner <srt19170@gmail.com> writes: > In emacsclient, if an existing Emacs server cannot be found and an > alternate editor is specified, the alternate editor is started. Along > the way, emacsclient generates a warning that the server cannot be > found. > > On Windows, this warning is a pop-up dialog box that must be dismissed > by the user. This is an unwanted interruption, and irrelevant, since > the user has already indicated by using the --alternated-editor option > how to handle this situation. > > The patch below suppresses this warning when the user has specified > both the --quiet option and the --alternate-editor option. The > reasoning is that --quiet mutes all messages on success, and that > because the --alternate-editor has been specified, this message is not > reporting an error. It seems like a reasonable compromise that will > allow users to see this warning if they like (by not using --quiet) > and allow users to avoid it if they like (by using --quiet). I think your patch makes sense, and the problem is still present in Emacs, five years after your report. --- $ emacsclient --quiet --alternate-editor /usr/bin/vi /tmp/a emacsclient: can't find socket; have you started the server? To start the server in Emacs, type "M-x server-start". --- Does anybody else have an objection to not outputting that error message if both --quiet and --alternate-editor is used? -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no ^ permalink raw reply [flat|nested] 5+ messages in thread
* bug#16117: Patch for Emacsclient Unwanted Warning 2019-06-26 15:02 ` Lars Ingebrigtsen @ 2020-08-12 22:23 ` Stefan Kangas 2020-08-13 8:30 ` Lars Ingebrigtsen 0 siblings, 1 reply; 5+ messages in thread From: Stefan Kangas @ 2020-08-12 22:23 UTC (permalink / raw) To: Lars Ingebrigtsen; +Cc: 16117, Scott Turner Lars Ingebrigtsen <larsi@gnus.org> writes: > Scott Turner <srt19170@gmail.com> writes: > >> In emacsclient, if an existing Emacs server cannot be found and an >> alternate editor is specified, the alternate editor is started. Along >> the way, emacsclient generates a warning that the server cannot be >> found. >> >> On Windows, this warning is a pop-up dialog box that must be dismissed >> by the user. This is an unwanted interruption, and irrelevant, since >> the user has already indicated by using the --alternated-editor option >> how to handle this situation. >> >> The patch below suppresses this warning when the user has specified >> both the --quiet option and the --alternate-editor option. The >> reasoning is that --quiet mutes all messages on success, and that >> because the --alternate-editor has been specified, this message is not >> reporting an error. It seems like a reasonable compromise that will >> allow users to see this warning if they like (by not using --quiet) >> and allow users to avoid it if they like (by using --quiet). > > I think your patch makes sense, and the problem is still present in > Emacs, five years after your report. > > --- > $ emacsclient --quiet --alternate-editor /usr/bin/vi /tmp/a > emacsclient: can't find socket; have you started the server? > To start the server in Emacs, type "M-x server-start". > --- > > Does anybody else have an objection to not outputting that error message > if both --quiet and --alternate-editor is used? I agree, it makes sense to not show the error message in this case. Best regards, Stefan Kangas ^ permalink raw reply [flat|nested] 5+ messages in thread
* bug#16117: Patch for Emacsclient Unwanted Warning 2020-08-12 22:23 ` Stefan Kangas @ 2020-08-13 8:30 ` Lars Ingebrigtsen 0 siblings, 0 replies; 5+ messages in thread From: Lars Ingebrigtsen @ 2020-08-13 8:30 UTC (permalink / raw) To: Stefan Kangas; +Cc: 16117, Scott Turner Stefan Kangas <stefan@marxist.se> writes: > I agree, it makes sense to not show the error message in this case. OK, I've now pushed a fix similar to the suggested patch to Emacs 28. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2020-08-13 8:30 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2013-12-12 2:47 bug#16117: 24.3; emacsclient -q enhancement request please also suppress gregrwm 2013-12-13 15:46 ` bug#16117: Patch for Emacsclient Unwanted Warning Scott Turner 2019-06-26 15:02 ` Lars Ingebrigtsen 2020-08-12 22:23 ` Stefan Kangas 2020-08-13 8:30 ` Lars Ingebrigtsen
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.