* bug#11474: 24.1.50; eval a command does the wrong thing with emacsclientw.exe
@ 2012-05-15 5:27 Jason Lewis
2013-12-13 15:30 ` bug#11474: Patch for Emacsclient --eval bug Scott Turner
0 siblings, 1 reply; 15+ messages in thread
From: Jason Lewis @ 2012-05-15 5:27 UTC (permalink / raw)
To: 11474
When launching a emacs from the command line, in windows, using the
emacsclientw.exe it seems to use the argument to --eval as the file name
if emacs server is not already running.
steps to reproduce:
1. close all instances of emacs that are running.
2. from command line, run emacsclientw.exe -a runemacs -c --eval
"(full-calc)"
the result of this will be a buffer open to /some/path/(full-calc). i
expect it should have opened calc rather than a buffer called full-calc.
3. close emacs again
4. launch emacs with runemacs.exe
5. from the command line run emacsclientw.exe -a runemacs -c --eval "(full-calc)"
6. observe that calc opened in a new frame as expected
let me know if you need any more info
In GNU Emacs 24.1.50.1 (i386-mingw-nt6.1.7601)
of 2012-04-23 on MARVIN
Bzr revision: 108006 agustin.martin@hispalinux.es-20120423103325-xmra3329elgzhmpc
Windowing system distributor `Microsoft Corp.', version 6.1.7601
Configured using:
`configure --with-gcc (4.6) --no-opt --enable-checking --cflags
-ID:/devel/emacs/libs/libXpm-3.5.8/include
-ID:/devel/emacs/libs/libXpm-3.5.8/src
-ID:/devel/emacs/libs/libpng-dev_1.4.3-1/include
-ID:/devel/emacs/libs/zlib-dev_1.2.5-2/include
-ID:/devel/emacs/libs/giflib-4.1.4-1/include
-ID:/devel/emacs/libs/jpeg-6b-4/include
-ID:/devel/emacs/libs/tiff-3.8.2-1/include
-ID:/devel/emacs/libs/gnutls-3.0.9/include
-ID:/devel/emacs/libs/libiconv-1.13.1-1-dev/include
-ID:/devel/emacs/libs/libxml2-2.7.8/include/libxml2'
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: ENA
value of $XMODIFIERS: nil
locale-coding-system: cp1252
default enable-multibyte-characters: t
Major mode: Fundamental
Minor modes in effect:
diff-auto-refine-mode: t
ido-ubiquitous: t
show-paren-mode: t
mouse-wheel-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:
M-x r e p o r t <return>
Recent messages:
Source file `c:/Users/jason/.emacs.d/elpa/color-theme-6.6.1/color-theme.el' newer than byte-compiled file
Source file `c:/Users/jason/.emacs.d/elpa/color-theme-6.6.1/color-theme-pkg.el' newer than byte-compiled file
Source file `c:/Users/jason/.emacs.d/elpa/color-theme-complexity-0.1.1/color-theme-complexity-pkg.el' newer than byte-compiled file
Source file `c:/Users/jason/.emacs.d/elpa/color-theme-emacs-revert-theme-0.1/color-theme-emacs-revert-theme-pkg.el' newer than byte-compiled file
Source file `c:/Users/jason/.emacs.d/elpa/color-theme-solarized-1.0.0/color-theme-solarized-pkg.el' newer than byte-compiled file
Source file `c:/Users/jason/.emacs.d/elpa/color-theme-twilight-0.1/color-theme-twilight-pkg.el' newer than byte-compiled file
Source file `c:/Users/jason/.emacs.d/elpa/color-theme-vim-insert-mode-0.1/color-theme-vim-insert-mode-pkg.el' newer than byte-compiled file
For information about GNU Emacs and the GNU system, type C-h C-a.
(New file)
delete-backward-char: Text is read-only
Load-path shadows:
c:/Users/jason/.emacs.d/elpa/org-20120510/org hides c:/Program Files (x86)/Emacs/emacs/lisp/org/org
c:/Users/jason/.emacs.d/elpa/org-20120510/org-xoxo hides c:/Program Files (x86)/Emacs/emacs/lisp/org/org-xoxo
c:/Users/jason/.emacs.d/elpa/org-20120510/org-wl hides c:/Program Files (x86)/Emacs/emacs/lisp/org/org-wl
c:/Users/jason/.emacs.d/elpa/org-20120510/org-w3m hides c:/Program Files (x86)/Emacs/emacs/lisp/org/org-w3m
c:/Users/jason/.emacs.d/elpa/org-20120510/org-vm hides c:/Program Files (x86)/Emacs/emacs/lisp/org/org-vm
c:/Users/jason/.emacs.d/elpa/org-20120510/org-timer hides c:/Program Files (x86)/Emacs/emacs/lisp/org/org-timer
c:/Users/jason/.emacs.d/elpa/org-20120510/org-taskjuggler hides c:/Program Files (x86)/Emacs/emacs/lisp/org/org-taskjuggler
c:/Users/jason/.emacs.d/elpa/org-20120510/org-table hides c:/Program Files (x86)/Emacs/emacs/lisp/org/org-table
c:/Users/jason/.emacs.d/elpa/org-20120510/org-src hides c:/Program Files (x86)/Emacs/emacs/lisp/org/org-src
c:/Users/jason/.emacs.d/elpa/org-20120510/org-special-blocks hides c:/Program Files (x86)/Emacs/emacs/lisp/org/org-special-blocks
c:/Users/jason/.emacs.d/elpa/org-20120510/org-rmail hides c:/Program Files (x86)/Emacs/emacs/lisp/org/org-rmail
c:/Users/jason/.emacs.d/elpa/org-20120510/org-remember hides c:/Program Files (x86)/Emacs/emacs/lisp/org/org-remember
c:/Users/jason/.emacs.d/elpa/org-20120510/org-publish hides c:/Program Files (x86)/Emacs/emacs/lisp/org/org-publish
c:/Users/jason/.emacs.d/elpa/org-20120510/org-protocol hides c:/Program Files (x86)/Emacs/emacs/lisp/org/org-protocol
c:/Users/jason/.emacs.d/elpa/org-20120510/org-plot hides c:/Program Files (x86)/Emacs/emacs/lisp/org/org-plot
c:/Users/jason/.emacs.d/elpa/org-20120510/org-pcomplete hides c:/Program Files (x86)/Emacs/emacs/lisp/org/org-pcomplete
c:/Users/jason/.emacs.d/elpa/org-20120510/org-odt hides c:/Program Files (x86)/Emacs/emacs/lisp/org/org-odt
c:/Users/jason/.emacs.d/elpa/org-20120510/org-mouse hides c:/Program Files (x86)/Emacs/emacs/lisp/org/org-mouse
c:/Users/jason/.emacs.d/elpa/org-20120510/org-mobile hides c:/Program Files (x86)/Emacs/emacs/lisp/org/org-mobile
c:/Users/jason/.emacs.d/elpa/org-20120510/org-mks hides c:/Program Files (x86)/Emacs/emacs/lisp/org/org-mks
c:/Users/jason/.emacs.d/elpa/org-20120510/org-mhe hides c:/Program Files (x86)/Emacs/emacs/lisp/org/org-mhe
c:/Users/jason/.emacs.d/elpa/org-20120510/org-mew hides c:/Program Files (x86)/Emacs/emacs/lisp/org/org-mew
c:/Users/jason/.emacs.d/elpa/org-20120510/org-macs hides c:/Program Files (x86)/Emacs/emacs/lisp/org/org-macs
c:/Users/jason/.emacs.d/elpa/org-20120510/org-mac-message hides c:/Program Files (x86)/Emacs/emacs/lisp/org/org-mac-message
c:/Users/jason/.emacs.d/elpa/org-20120510/org-lparse hides c:/Program Files (x86)/Emacs/emacs/lisp/org/org-lparse
c:/Users/jason/.emacs.d/elpa/org-20120510/org-list hides c:/Program Files (x86)/Emacs/emacs/lisp/org/org-list
c:/Users/jason/.emacs.d/elpa/org-20120510/org-latex hides c:/Program Files (x86)/Emacs/emacs/lisp/org/org-latex
c:/Users/jason/.emacs.d/elpa/org-20120510/org-jsinfo hides c:/Program Files (x86)/Emacs/emacs/lisp/org/org-jsinfo
c:/Users/jason/.emacs.d/elpa/org-20120510/org-irc hides c:/Program Files (x86)/Emacs/emacs/lisp/org/org-irc
c:/Users/jason/.emacs.d/elpa/org-20120510/org-inlinetask hides c:/Program Files (x86)/Emacs/emacs/lisp/org/org-inlinetask
c:/Users/jason/.emacs.d/elpa/org-20120510/org-info hides c:/Program Files (x86)/Emacs/emacs/lisp/org/org-info
c:/Users/jason/.emacs.d/elpa/org-20120510/org-indent hides c:/Program Files (x86)/Emacs/emacs/lisp/org/org-indent
c:/Users/jason/.emacs.d/elpa/org-20120510/org-id hides c:/Program Files (x86)/Emacs/emacs/lisp/org/org-id
c:/Users/jason/.emacs.d/elpa/org-20120510/org-icalendar hides c:/Program Files (x86)/Emacs/emacs/lisp/org/org-icalendar
c:/Users/jason/.emacs.d/elpa/org-20120510/org-html hides c:/Program Files (x86)/Emacs/emacs/lisp/org/org-html
c:/Users/jason/.emacs.d/elpa/org-20120510/org-habit hides c:/Program Files (x86)/Emacs/emacs/lisp/org/org-habit
c:/Users/jason/.emacs.d/elpa/org-20120510/org-gnus hides c:/Program Files (x86)/Emacs/emacs/lisp/org/org-gnus
c:/Users/jason/.emacs.d/elpa/org-20120510/org-freemind hides c:/Program Files (x86)/Emacs/emacs/lisp/org/org-freemind
c:/Users/jason/.emacs.d/elpa/org-20120510/org-footnote hides c:/Program Files (x86)/Emacs/emacs/lisp/org/org-footnote
c:/Users/jason/.emacs.d/elpa/org-20120510/org-feed hides c:/Program Files (x86)/Emacs/emacs/lisp/org/org-feed
c:/Users/jason/.emacs.d/elpa/org-20120510/org-faces hides c:/Program Files (x86)/Emacs/emacs/lisp/org/org-faces
c:/Users/jason/.emacs.d/elpa/org-20120510/org-exp hides c:/Program Files (x86)/Emacs/emacs/lisp/org/org-exp
c:/Users/jason/.emacs.d/elpa/org-20120510/org-exp-blocks hides c:/Program Files (x86)/Emacs/emacs/lisp/org/org-exp-blocks
c:/Users/jason/.emacs.d/elpa/org-20120510/org-eshell hides c:/Program Files (x86)/Emacs/emacs/lisp/org/org-eshell
c:/Users/jason/.emacs.d/elpa/org-20120510/org-entities hides c:/Program Files (x86)/Emacs/emacs/lisp/org/org-entities
c:/Users/jason/.emacs.d/elpa/org-20120510/org-docview hides c:/Program Files (x86)/Emacs/emacs/lisp/org/org-docview
c:/Users/jason/.emacs.d/elpa/org-20120510/org-docbook hides c:/Program Files (x86)/Emacs/emacs/lisp/org/org-docbook
c:/Users/jason/.emacs.d/elpa/org-20120510/org-datetree hides c:/Program Files (x86)/Emacs/emacs/lisp/org/org-datetree
c:/Users/jason/.emacs.d/elpa/org-20120510/org-ctags hides c:/Program Files (x86)/Emacs/emacs/lisp/org/org-ctags
c:/Users/jason/.emacs.d/elpa/org-20120510/org-crypt hides c:/Program Files (x86)/Emacs/emacs/lisp/org/org-crypt
c:/Users/jason/.emacs.d/elpa/org-20120510/org-compat hides c:/Program Files (x86)/Emacs/emacs/lisp/org/org-compat
c:/Users/jason/.emacs.d/elpa/org-20120510/org-colview hides c:/Program Files (x86)/Emacs/emacs/lisp/org/org-colview
c:/Users/jason/.emacs.d/elpa/org-20120510/org-clock hides c:/Program Files (x86)/Emacs/emacs/lisp/org/org-clock
c:/Users/jason/.emacs.d/elpa/org-20120510/org-capture hides c:/Program Files (x86)/Emacs/emacs/lisp/org/org-capture
c:/Users/jason/.emacs.d/elpa/org-20120510/org-bibtex hides c:/Program Files (x86)/Emacs/emacs/lisp/org/org-bibtex
c:/Users/jason/.emacs.d/elpa/org-20120510/org-beamer hides c:/Program Files (x86)/Emacs/emacs/lisp/org/org-beamer
c:/Users/jason/.emacs.d/elpa/org-20120510/org-bbdb hides c:/Program Files (x86)/Emacs/emacs/lisp/org/org-bbdb
c:/Users/jason/.emacs.d/elpa/org-20120510/org-attach hides c:/Program Files (x86)/Emacs/emacs/lisp/org/org-attach
c:/Users/jason/.emacs.d/elpa/org-20120510/org-ascii hides c:/Program Files (x86)/Emacs/emacs/lisp/org/org-ascii
c:/Users/jason/.emacs.d/elpa/org-20120510/org-archive hides c:/Program Files (x86)/Emacs/emacs/lisp/org/org-archive
c:/Users/jason/.emacs.d/elpa/org-20120510/org-agenda hides c:/Program Files (x86)/Emacs/emacs/lisp/org/org-agenda
c:/Users/jason/.emacs.d/elpa/org-20120510/ob hides c:/Program Files (x86)/Emacs/emacs/lisp/org/ob
c:/Users/jason/.emacs.d/elpa/org-20120510/ob-tangle hides c:/Program Files (x86)/Emacs/emacs/lisp/org/ob-tangle
c:/Users/jason/.emacs.d/elpa/org-20120510/ob-table hides c:/Program Files (x86)/Emacs/emacs/lisp/org/ob-table
c:/Users/jason/.emacs.d/elpa/org-20120510/ob-sqlite hides c:/Program Files (x86)/Emacs/emacs/lisp/org/ob-sqlite
c:/Users/jason/.emacs.d/elpa/org-20120510/ob-sql hides c:/Program Files (x86)/Emacs/emacs/lisp/org/ob-sql
c:/Users/jason/.emacs.d/elpa/org-20120510/ob-shen hides c:/Program Files (x86)/Emacs/emacs/lisp/org/ob-shen
c:/Users/jason/.emacs.d/elpa/org-20120510/ob-sh hides c:/Program Files (x86)/Emacs/emacs/lisp/org/ob-sh
c:/Users/jason/.emacs.d/elpa/org-20120510/ob-screen hides c:/Program Files (x86)/Emacs/emacs/lisp/org/ob-screen
c:/Users/jason/.emacs.d/elpa/org-20120510/ob-scheme hides c:/Program Files (x86)/Emacs/emacs/lisp/org/ob-scheme
c:/Users/jason/.emacs.d/elpa/org-20120510/ob-sass hides c:/Program Files (x86)/Emacs/emacs/lisp/org/ob-sass
c:/Users/jason/.emacs.d/elpa/org-20120510/ob-ruby hides c:/Program Files (x86)/Emacs/emacs/lisp/org/ob-ruby
c:/Users/jason/.emacs.d/elpa/org-20120510/ob-ref hides c:/Program Files (x86)/Emacs/emacs/lisp/org/ob-ref
c:/Users/jason/.emacs.d/elpa/org-20120510/ob-R hides c:/Program Files (x86)/Emacs/emacs/lisp/org/ob-R
c:/Users/jason/.emacs.d/elpa/org-20120510/ob-python hides c:/Program Files (x86)/Emacs/emacs/lisp/org/ob-python
c:/Users/jason/.emacs.d/elpa/org-20120510/ob-plantuml hides c:/Program Files (x86)/Emacs/emacs/lisp/org/ob-plantuml
c:/Users/jason/.emacs.d/elpa/org-20120510/ob-picolisp hides c:/Program Files (x86)/Emacs/emacs/lisp/org/ob-picolisp
c:/Users/jason/.emacs.d/elpa/org-20120510/ob-perl hides c:/Program Files (x86)/Emacs/emacs/lisp/org/ob-perl
c:/Users/jason/.emacs.d/elpa/org-20120510/ob-org hides c:/Program Files (x86)/Emacs/emacs/lisp/org/ob-org
c:/Users/jason/.emacs.d/elpa/org-20120510/ob-octave hides c:/Program Files (x86)/Emacs/emacs/lisp/org/ob-octave
c:/Users/jason/.emacs.d/elpa/org-20120510/ob-ocaml hides c:/Program Files (x86)/Emacs/emacs/lisp/org/ob-ocaml
c:/Users/jason/.emacs.d/elpa/org-20120510/ob-mscgen hides c:/Program Files (x86)/Emacs/emacs/lisp/org/ob-mscgen
c:/Users/jason/.emacs.d/elpa/org-20120510/ob-maxima hides c:/Program Files (x86)/Emacs/emacs/lisp/org/ob-maxima
c:/Users/jason/.emacs.d/elpa/org-20120510/ob-matlab hides c:/Program Files (x86)/Emacs/emacs/lisp/org/ob-matlab
c:/Users/jason/.emacs.d/elpa/org-20120510/ob-lob hides c:/Program Files (x86)/Emacs/emacs/lisp/org/ob-lob
c:/Users/jason/.emacs.d/elpa/org-20120510/ob-lisp hides c:/Program Files (x86)/Emacs/emacs/lisp/org/ob-lisp
c:/Users/jason/.emacs.d/elpa/org-20120510/ob-lilypond hides c:/Program Files (x86)/Emacs/emacs/lisp/org/ob-lilypond
c:/Users/jason/.emacs.d/elpa/org-20120510/ob-ledger hides c:/Program Files (x86)/Emacs/emacs/lisp/org/ob-ledger
c:/Users/jason/.emacs.d/elpa/org-20120510/ob-latex hides c:/Program Files (x86)/Emacs/emacs/lisp/org/ob-latex
c:/Users/jason/.emacs.d/elpa/org-20120510/ob-keys hides c:/Program Files (x86)/Emacs/emacs/lisp/org/ob-keys
c:/Users/jason/.emacs.d/elpa/org-20120510/ob-js hides c:/Program Files (x86)/Emacs/emacs/lisp/org/ob-js
c:/Users/jason/.emacs.d/elpa/org-20120510/ob-java hides c:/Program Files (x86)/Emacs/emacs/lisp/org/ob-java
c:/Users/jason/.emacs.d/elpa/org-20120510/ob-haskell hides c:/Program Files (x86)/Emacs/emacs/lisp/org/ob-haskell
c:/Users/jason/.emacs.d/elpa/org-20120510/ob-gnuplot hides c:/Program Files (x86)/Emacs/emacs/lisp/org/ob-gnuplot
c:/Users/jason/.emacs.d/elpa/org-20120510/ob-fortran hides c:/Program Files (x86)/Emacs/emacs/lisp/org/ob-fortran
c:/Users/jason/.emacs.d/elpa/org-20120510/ob-exp hides c:/Program Files (x86)/Emacs/emacs/lisp/org/ob-exp
c:/Users/jason/.emacs.d/elpa/org-20120510/ob-eval hides c:/Program Files (x86)/Emacs/emacs/lisp/org/ob-eval
c:/Users/jason/.emacs.d/elpa/org-20120510/ob-emacs-lisp hides c:/Program Files (x86)/Emacs/emacs/lisp/org/ob-emacs-lisp
c:/Users/jason/.emacs.d/elpa/org-20120510/ob-dot hides c:/Program Files (x86)/Emacs/emacs/lisp/org/ob-dot
c:/Users/jason/.emacs.d/elpa/org-20120510/ob-ditaa hides c:/Program Files (x86)/Emacs/emacs/lisp/org/ob-ditaa
c:/Users/jason/.emacs.d/elpa/org-20120510/ob-css hides c:/Program Files (x86)/Emacs/emacs/lisp/org/ob-css
c:/Users/jason/.emacs.d/elpa/org-20120510/ob-comint hides c:/Program Files (x86)/Emacs/emacs/lisp/org/ob-comint
c:/Users/jason/.emacs.d/elpa/org-20120510/ob-clojure hides c:/Program Files (x86)/Emacs/emacs/lisp/org/ob-clojure
c:/Users/jason/.emacs.d/elpa/org-20120510/ob-calc hides c:/Program Files (x86)/Emacs/emacs/lisp/org/ob-calc
c:/Users/jason/.emacs.d/elpa/org-20120510/ob-C hides c:/Program Files (x86)/Emacs/emacs/lisp/org/ob-C
c:/Users/jason/.emacs.d/elpa/org-20120510/ob-awk hides c:/Program Files (x86)/Emacs/emacs/lisp/org/ob-awk
c:/Users/jason/.emacs.d/elpa/org-20120510/ob-asymptote hides c:/Program Files (x86)/Emacs/emacs/lisp/org/ob-asymptote
Features:
(shadow sort flyspell ispell gnus-util mail-extr emacsbug message
format-spec rfc822 mml mml-sec mm-decode mm-bodies mm-encode mail-parse
rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045
ietf-drums mm-util mail-prsvr mail-utils eldoc elisp-slime-nav etags
paredit hl-line saveplace idle-highlight-mode thingatpt dired-single
winner color-theme wid-edit color-theme-blackboard server cygwin-mount
ange-ftp comint ansi-color epa-file epa derived epg epg-config
magit-bisect magit-key-mode assoc magit diff-mode log-edit easy-mmode
ring pcvs-util add-log auctex-autoloads tex-site auto-complete-autoloads
color-theme-active-autoloads color-theme-actress-autoloads
color-theme-blackboard-autoloads
color-theme-colorful-obsolescence-autoloads
color-theme-complexity-autoloads color-theme-dg-autoloads
color-theme-dpaste-autoloads color-theme-eclipse-autoloads
color-theme-emacs-revert-theme-autoloads color-theme-github-autoloads
color-theme-ir-black-autoloads color-theme-railscasts-autoloads
color-theme-sanityinc-solarized-autoloads
color-theme-solarized-autoloads color-theme-tango-autoloads
color-theme-tangotango-autoloads color-theme-twilight-autoloads
color-theme-vim-insert-mode-autoloads color-theme-wombat+-autoloads
color-theme-wombat-autoloads color-theme-zenburn-autoloads
color-theme-autoloads cygwin-mount-autoloads dired-single-autoloads
erc-hl-nicks-autoloads markdown-mode-autoloads marmalade-autoloads
furl-autoloads mediawiki-autoloads oddmuse-autoloads org-autoloads info
easymenu php-mode-autoloads scpaste-autoloads finder-inf
session-autoloads starter-kit-bindings-autoloads windmove
starter-kit-eshell-autoloads starter-kit-js-autoloads
starter-kit-lisp-autoloads elisp-slime-nav-autoloads
starter-kit-ruby-autoloads starter-kit-autoloads edmacro kmacro smex
starter-kit-misc ido-ubiquitous cl ido paren starter-kit-defuns uniquify
advice help-fns advice-preload magit-autoloads ido-ubiquitous-autoloads
smex-autoloads find-file-in-project-autoloads
idle-highlight-mode-autoloads paredit-autoloads inf-ruby-autoloads
tuareg-autoloads caml-autoloads yaml-mode-autoloads package
tabulated-list time-date tooltip ediff-hook vc-hooks lisp-float-type
mwheel dos-w32 disp-table ls-lisp w32-win w32-vars tool-bar dnd fontset
image regexp-opt fringe lisp-mode register page menu-bar rfn-eshadow
timer select scroll-bar 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 minibuffer button faces cus-face files
text-properties overlay sha1 md5 base64 format env code-pages mule
custom widget hashtable-print-readable backquote make-network-process
multi-tty emacs)
^ permalink raw reply [flat|nested] 15+ messages in thread
* bug#11474: Patch for Emacsclient --eval bug
2012-05-15 5:27 bug#11474: 24.1.50; eval a command does the wrong thing with emacsclientw.exe Jason Lewis
@ 2013-12-13 15:30 ` Scott Turner
2013-12-24 14:56 ` Scott Turner
2014-04-02 14:57 ` Stefan Monnier
0 siblings, 2 replies; 15+ messages in thread
From: Scott Turner @ 2013-12-13 15:30 UTC (permalink / raw)
To: 11474
[-- Attachment #1: Type: text/plain, Size: 2283 bytes --]
In emacsclient, the --eval option tells emacsclient to treat all arguments
as Elisp to be evaluated by the Emacs server.
The --alternate-editor option specifies an program to start if emacsclient
cannot find an Emacs server.
If both options are used and a server is not found, a bug arises.
Emacsclient sends the arguments that are intended to be interpreted as
Elisp to the alternate editor. If the alternate editor is Emacs, this
results in Emacs creating a buffer named after each argument. So the
command:
emacsclient --alternate-editor "emacs" --eval "(make-frame-visible)"
results in an Emacs with a buffer named "(make-frame-visible)".
Sending the Elisp arguments to the alternate-editor as plain arguments is
clearly wrong. If we knew that the alternate-editor was Emacs, we could
send the argument along with "--eval=" prepended to have the newly started
Emacs evaluate the Elisp, but of course the alternate editor could be
something else entirely, and it's probably not the case that you'd want to
execute the same Elisp on startup as on resume.
The patch provided below simply discards the Elisp arguments when
emacsclient falls through to the alternate editor. There may be better
fixes, but this does the least harm while retaining compatibility.
*** emacsclient.c Tue Jan 1 15:37:17 2013
--- emacsclient-strip-eval.c Thu Dec 12 20:01:06 2013
***************
*** 694,700 ****
{
int i = optind - 1;
! execvp (alternate_editor, main_argv + i);
message (TRUE, "%s: error executing alternate editor \"%s\"\n",
progname, alternate_editor);
}
--- 694,713 ----
{
int i = optind - 1;
! /*
! * If the --eval option has been used, then the remaining
! * arguments are Elisp expressions intended to be evaluated
! * by emacsclient. It doesn't make any sense to pass them
! * along to the alternate_editor to be treated as files.
! *
! */
! if (eval) {
! char *t_argv[] = {alternate_editor, 0 };
! execvp (alternate_editor, t_argv);
! } else {
! execvp (alternate_editor, main_argv + i);
! };
!
message (TRUE, "%s: error executing alternate editor \"%s\"\n",
progname, alternate_editor);
}
[-- Attachment #2: Type: text/html, Size: 2613 bytes --]
^ permalink raw reply [flat|nested] 15+ messages in thread
* bug#11474: Patch for Emacsclient --eval bug
2013-12-13 15:30 ` bug#11474: Patch for Emacsclient --eval bug Scott Turner
@ 2013-12-24 14:56 ` Scott Turner
2013-12-24 16:03 ` Stefan Monnier
2014-04-02 14:57 ` Stefan Monnier
1 sibling, 1 reply; 15+ messages in thread
From: Scott Turner @ 2013-12-24 14:56 UTC (permalink / raw)
To: 11474
[-- Attachment #1: Type: text/plain, Size: 110 bytes --]
Am I expected to see any feedback on this patch? How can I know if it will
be incorporated?
-- Scott Turner
[-- Attachment #2: Type: text/html, Size: 153 bytes --]
^ permalink raw reply [flat|nested] 15+ messages in thread
* bug#11474: Patch for Emacsclient --eval bug
2013-12-24 14:56 ` Scott Turner
@ 2013-12-24 16:03 ` Stefan Monnier
2013-12-24 16:11 ` Scott Turner
0 siblings, 1 reply; 15+ messages in thread
From: Stefan Monnier @ 2013-12-24 16:03 UTC (permalink / raw)
To: Scott Turner; +Cc: 11474
> Am I expected to see any feedback on this patch?
Yes.
> How can I know if it will be incorporated?
It looks like a plain bugfix, so someone should get to it "soonish".
Stefan
^ permalink raw reply [flat|nested] 15+ messages in thread
* bug#11474: Patch for Emacsclient --eval bug
2013-12-24 16:03 ` Stefan Monnier
@ 2013-12-24 16:11 ` Scott Turner
0 siblings, 0 replies; 15+ messages in thread
From: Scott Turner @ 2013-12-24 16:11 UTC (permalink / raw)
To: Stefan Monnier; +Cc: 11474
[-- Attachment #1: Type: text/plain, Size: 195 bytes --]
On Tue, Dec 24, 2013 at 11:03 AM, Stefan Monnier
<monnier@iro.umontreal.ca>wrote:
> It looks like a plain bugfix, so someone should get to it "soonish".
>
Thanks, I'll be patient :-)
-- Scott
[-- Attachment #2: Type: text/html, Size: 676 bytes --]
^ permalink raw reply [flat|nested] 15+ messages in thread
* bug#11474: Patch for Emacsclient --eval bug
2013-12-13 15:30 ` bug#11474: Patch for Emacsclient --eval bug Scott Turner
2013-12-24 14:56 ` Scott Turner
@ 2014-04-02 14:57 ` Stefan Monnier
2014-04-02 15:34 ` Scott Turner
2019-06-27 15:29 ` Lars Ingebrigtsen
1 sibling, 2 replies; 15+ messages in thread
From: Stefan Monnier @ 2014-04-02 14:57 UTC (permalink / raw)
To: Scott Turner; +Cc: 11474
[ Thanks for your patience. ]
> emacsclient --alternate-editor "emacs" --eval "(make-frame-visible)"
> results in an Emacs with a buffer named "(make-frame-visible)".
Hmm... indeed, we have a problem here. But I think the problem is that
it's very unclear what should be the right behavior. IOW using both
"--alternate-editor" and "--eval" at the same time is "ill defined" and
the current behavior in that situation is particularly non-sensical.
> The patch provided below simply discards the Elisp arguments when
> emacsclient falls through to the alternate editor. There may be better
> fixes, but this does the least harm while retaining compatibility.
Silently dropping arguments is not very polite, so I'm not really happy
with your solution. I think the "right" behavior would be to call the
alternate editor while preserving most arguments; IOW the right fix
in this case would be to add a "--eval" argument, so that your
alternate_editor can decide whether to drop args when it gets an
"--eval" or to prepend all other args with a "--eval=" (or do whatever
else it fancies).
WDYT?
Stefan
^ permalink raw reply [flat|nested] 15+ messages in thread
* bug#11474: Patch for Emacsclient --eval bug
2014-04-02 14:57 ` Stefan Monnier
@ 2014-04-02 15:34 ` Scott Turner
2014-04-02 16:34 ` Stefan Monnier
2019-06-27 15:29 ` Lars Ingebrigtsen
1 sibling, 1 reply; 15+ messages in thread
From: Scott Turner @ 2014-04-02 15:34 UTC (permalink / raw)
To: Stefan Monnier; +Cc: 11474
[-- Attachment #1: Type: text/plain, Size: 984 bytes --]
On Wed, Apr 2, 2014 at 10:57 AM, Stefan Monnier <monnier@iro.umontreal.ca>wrote:
> Silently dropping arguments is not very polite, so I'm not really happy
> with your solution.
>
I think as long as it is documented that the alternate_editor is not passed
the arguments intended for Emacs, that behavior is not terrible.
> I think the "right" behavior would be to call the alternate editor while
> preserving most arguments; IOW the right fix
> in this case would be to add a "--eval" argument, so that your
> alternate_editor can decide whether to drop args when it gets an "--eval"
> or to prepend all other args with a "--eval=" (or do whatever else it
> fancies).
>
On a practical level, I doubt the alternate_editor is going to be prepared
to deal with Emacs flags, so that's not terribly useful.
Maybe the best solution would be to have something like
"--alternate-editor-arguments" so that the user can specifically provide
the arguments to use with the alternate editor?
[-- Attachment #2: Type: text/html, Size: 1653 bytes --]
^ permalink raw reply [flat|nested] 15+ messages in thread
* bug#11474: Patch for Emacsclient --eval bug
2014-04-02 15:34 ` Scott Turner
@ 2014-04-02 16:34 ` Stefan Monnier
0 siblings, 0 replies; 15+ messages in thread
From: Stefan Monnier @ 2014-04-02 16:34 UTC (permalink / raw)
To: Scott Turner; +Cc: 11474
>> Silently dropping arguments is not very polite, so I'm not really happy
>> with your solution.
> I think as long as it is documented that the alternate_editor is not passed
> the arguments intended for Emacs, that behavior is not terrible.
The current behavior is not that terrible either. I think a fix should
aim to actually improve the situation.
> On a practical level, I doubt the alternate_editor is going to be prepared
> to deal with Emacs flags, so that's not terribly useful.
But if the user uses --alternate-editor together with --eval, she can
make the alternate editor understand the args by making it a little
script that does what she wants.
Stefan
^ permalink raw reply [flat|nested] 15+ messages in thread
* bug#11474: Patch for Emacsclient --eval bug
2014-04-02 14:57 ` Stefan Monnier
2014-04-02 15:34 ` Scott Turner
@ 2019-06-27 15:29 ` Lars Ingebrigtsen
2019-06-27 18:17 ` Stefan Monnier
1 sibling, 1 reply; 15+ messages in thread
From: Lars Ingebrigtsen @ 2019-06-27 15:29 UTC (permalink / raw)
To: Stefan Monnier; +Cc: 11474, Scott Turner
Stefan Monnier <monnier@IRO.UMontreal.CA> writes:
>> The patch provided below simply discards the Elisp arguments when
>> emacsclient falls through to the alternate editor. There may be better
>> fixes, but this does the least harm while retaining compatibility.
>
> Silently dropping arguments is not very polite, so I'm not really happy
> with your solution. I think the "right" behavior would be to call the
> alternate editor while preserving most arguments; IOW the right fix
> in this case would be to add a "--eval" argument, so that your
> alternate_editor can decide whether to drop args when it gets an
> "--eval" or to prepend all other args with a "--eval=" (or do whatever
> else it fancies).
Hm... I think I agree with the patch Scott posted, and not with this
solution. :-)
The use case here would be if you say something like
$ emacsclient -a nano --eval '(my-emacs-setup-thing)'
The eval bit is meaningful in Emacs, and may be something that the user
feels is something that Emacs should do when called from emacsclient.
But if there's no server, then we should use nano.
The current behaviour is to use nano with the file name
'(my-emacs-setup-thing)', while you propose to call nano with
--eval '(my-emacs-setup-thing)', which would be even worse, I think,
while just dropping the parameters completely in the -a case would make
this usable.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
^ permalink raw reply [flat|nested] 15+ messages in thread
* bug#11474: Patch for Emacsclient --eval bug
2019-06-27 15:29 ` Lars Ingebrigtsen
@ 2019-06-27 18:17 ` Stefan Monnier
2019-06-27 18:40 ` Lars Ingebrigtsen
0 siblings, 1 reply; 15+ messages in thread
From: Stefan Monnier @ 2019-06-27 18:17 UTC (permalink / raw)
To: Lars Ingebrigtsen; +Cc: 11474, Scott Turner
> $ emacsclient -a nano --eval '(my-emacs-setup-thing)'
>
> The eval bit is meaningful in Emacs, and may be something that the user
> feels is something that Emacs should do when called from emacsclient.
> But if there's no server, then we should use nano.
>
> The current behaviour is to use nano with the file name
> '(my-emacs-setup-thing)', while you propose to call nano with
> --eval '(my-emacs-setup-thing)', which would be even worse, I think,
> while just dropping the parameters completely in the -a case would make
> this usable.
I think that nowadays with the `-a ""` option the need to keep
the --eval is indeed not very high, so I retract my objection.
Stefan
^ permalink raw reply [flat|nested] 15+ messages in thread
* bug#11474: Patch for Emacsclient --eval bug
2019-06-27 18:17 ` Stefan Monnier
@ 2019-06-27 18:40 ` Lars Ingebrigtsen
2019-06-27 18:56 ` Lars Ingebrigtsen
0 siblings, 1 reply; 15+ messages in thread
From: Lars Ingebrigtsen @ 2019-06-27 18:40 UTC (permalink / raw)
To: Stefan Monnier; +Cc: 11474, Scott Turner
Stefan Monnier <monnier@iro.umontreal.ca> writes:
>> $ emacsclient -a nano --eval '(my-emacs-setup-thing)'
>>
>> The eval bit is meaningful in Emacs, and may be something that the user
>> feels is something that Emacs should do when called from emacsclient.
>> But if there's no server, then we should use nano.
>>
>> The current behaviour is to use nano with the file name
>> '(my-emacs-setup-thing)', while you propose to call nano with
>> --eval '(my-emacs-setup-thing)', which would be even worse, I think,
>> while just dropping the parameters completely in the -a case would make
>> this usable.
>
> I think that nowadays with the `-a ""` option the need to keep
> the --eval is indeed not very high, so I retract my objection.
Hm... the emacsclient source code has changed substantially over the
years, I see...
if (alternate_editor)
{
size_t extra_args_size = (main_argc - optind + 1) * sizeof (char *);
size_t new_argv_size = extra_args_size;
char **new_argv = xmalloc (new_argv_size);
[...]
/* Append main_argv arguments to new_argv. */
memcpy (&new_argv[toks], main_argv + optind, extra_args_size);
execvp (*new_argv, new_argv);
message (true, "%s: error executing alternate editor \"%s\"\n",
progname, alternate_editor);
}
So it now picks out arguments from the -a="nano --foo" string, and then
appends the rest of the arguments from emacsclient.
The equivalent here would be to set extra_args_size to 0 if eval, I
guess. But... hm.... then we'd lose the file argument too, wouldn't
we?
I mean, if you say
$ ./lib-src/emacsclient -a "nano -v" --eval '(message "foo")' /tmp/a
the you want nano to open /tmp/a...
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
^ permalink raw reply [flat|nested] 15+ messages in thread
* bug#11474: Patch for Emacsclient --eval bug
2019-06-27 18:40 ` Lars Ingebrigtsen
@ 2019-06-27 18:56 ` Lars Ingebrigtsen
2019-06-27 19:00 ` Lars Ingebrigtsen
0 siblings, 1 reply; 15+ messages in thread
From: Lars Ingebrigtsen @ 2019-06-27 18:56 UTC (permalink / raw)
To: Stefan Monnier; +Cc: 11474, Scott Turner
Lars Ingebrigtsen <larsi@gnus.org> writes:
> I mean, if you say
>
> $ ./lib-src/emacsclient -a "nano -v" --eval '(message "foo")' /tmp/a
>
> the you want nano to open /tmp/a...
Oh, I missed the bit about that if you have --eval, then all subsequent
parameters are used as eval. Then that's OK, then.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
^ permalink raw reply [flat|nested] 15+ messages in thread
* bug#11474: Patch for Emacsclient --eval bug
2019-06-27 18:56 ` Lars Ingebrigtsen
@ 2019-06-27 19:00 ` Lars Ingebrigtsen
2019-06-27 19:14 ` Stefan Monnier
0 siblings, 1 reply; 15+ messages in thread
From: Lars Ingebrigtsen @ 2019-06-27 19:00 UTC (permalink / raw)
To: Stefan Monnier; +Cc: 11474, Scott Turner
I've now done this fix -- should there be a NEWS entry? It's arguably
just a bug fix, but it's user visible...
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
^ permalink raw reply [flat|nested] 15+ messages in thread
* bug#11474: Patch for Emacsclient --eval bug
2019-06-27 19:00 ` Lars Ingebrigtsen
@ 2019-06-27 19:14 ` Stefan Monnier
2019-06-27 19:19 ` Lars Ingebrigtsen
0 siblings, 1 reply; 15+ messages in thread
From: Stefan Monnier @ 2019-06-27 19:14 UTC (permalink / raw)
To: Lars Ingebrigtsen; +Cc: 11474, Scott Turner
> I've now done this fix -- should there be a NEWS entry?
Definitely,
Stefan
^ permalink raw reply [flat|nested] 15+ messages in thread
* bug#11474: Patch for Emacsclient --eval bug
2019-06-27 19:14 ` Stefan Monnier
@ 2019-06-27 19:19 ` Lars Ingebrigtsen
0 siblings, 0 replies; 15+ messages in thread
From: Lars Ingebrigtsen @ 2019-06-27 19:19 UTC (permalink / raw)
To: Stefan Monnier; +Cc: 11474, Scott Turner
Stefan Monnier <monnier@iro.umontreal.ca> writes:
>> I've now done this fix -- should there be a NEWS entry?
>
> Definitely,
OK; added.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
^ permalink raw reply [flat|nested] 15+ messages in thread
end of thread, other threads:[~2019-06-27 19:19 UTC | newest]
Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-15 5:27 bug#11474: 24.1.50; eval a command does the wrong thing with emacsclientw.exe Jason Lewis
2013-12-13 15:30 ` bug#11474: Patch for Emacsclient --eval bug Scott Turner
2013-12-24 14:56 ` Scott Turner
2013-12-24 16:03 ` Stefan Monnier
2013-12-24 16:11 ` Scott Turner
2014-04-02 14:57 ` Stefan Monnier
2014-04-02 15:34 ` Scott Turner
2014-04-02 16:34 ` Stefan Monnier
2019-06-27 15:29 ` Lars Ingebrigtsen
2019-06-27 18:17 ` Stefan Monnier
2019-06-27 18:40 ` Lars Ingebrigtsen
2019-06-27 18:56 ` Lars Ingebrigtsen
2019-06-27 19:00 ` Lars Ingebrigtsen
2019-06-27 19:14 ` Stefan Monnier
2019-06-27 19:19 ` Lars Ingebrigtsen
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).