From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Vitalie Spinu Newsgroups: gmane.emacs.bugs Subject: bug#13248: 24.2.50; select-window moves point (in comint-postoutput-scroll-to-bottom) Date: Fri, 21 Dec 2012 14:14:31 +0100 Message-ID: <87a9t7bl8o.fsf@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1356095767 18490 80.91.229.3 (21 Dec 2012 13:16:07 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 21 Dec 2012 13:16:07 +0000 (UTC) To: 13248@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Dec 21 14:16:21 2012 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Tm2SZ-0005HC-OG for geb-bug-gnu-emacs@m.gmane.org; Fri, 21 Dec 2012 14:16:20 +0100 Original-Received: from localhost ([::1]:54488 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tm2SL-0007bg-Vn for geb-bug-gnu-emacs@m.gmane.org; Fri, 21 Dec 2012 08:16:05 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:50029) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tm2SC-0007bZ-QI for bug-gnu-emacs@gnu.org; Fri, 21 Dec 2012 08:16:04 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Tm2S5-0002H2-N3 for bug-gnu-emacs@gnu.org; Fri, 21 Dec 2012 08:15:56 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:43361) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tm2S5-0002Gy-J9 for bug-gnu-emacs@gnu.org; Fri, 21 Dec 2012 08:15:49 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1Tm2SI-0004CS-JR for bug-gnu-emacs@gnu.org; Fri, 21 Dec 2012 08:16:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Vitalie Spinu Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 21 Dec 2012 13:16:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 13248 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.135609572116093 (code B ref -1); Fri, 21 Dec 2012 13:16:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 21 Dec 2012 13:15:21 +0000 Original-Received: from localhost ([127.0.0.1]:53612 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Tm2Rb-0004BT-Pk for submit@debbugs.gnu.org; Fri, 21 Dec 2012 08:15:21 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:38570) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Tm2RX-0004BI-JM for submit@debbugs.gnu.org; Fri, 21 Dec 2012 08:15:18 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Tm2RA-0001uP-Jm for submit@debbugs.gnu.org; Fri, 21 Dec 2012 08:15:01 -0500 Original-Received: from lists.gnu.org ([208.118.235.17]:35826) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tm2RA-0001uL-Gc for submit@debbugs.gnu.org; Fri, 21 Dec 2012 08:14:52 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:49913) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tm2R2-0007Ug-26 for bug-gnu-emacs@gnu.org; Fri, 21 Dec 2012 08:14:52 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Tm2Qu-0001s8-CE for bug-gnu-emacs@gnu.org; Fri, 21 Dec 2012 08:14:43 -0500 Original-Received: from mail-ea0-f178.google.com ([209.85.215.178]:39719) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Tm2Qu-0001rz-2o for bug-gnu-emacs@gnu.org; Fri, 21 Dec 2012 08:14:36 -0500 Original-Received: by mail-ea0-f178.google.com with SMTP id k11so1919578eaa.23 for ; Fri, 21 Dec 2012 05:14:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:from:to:subject:date:message-id:mime-version :content-type:content-transfer-encoding; bh=s40aVUQyranEECoS+skoJ2Q+FjizuarsVcHY8jq1FuU=; b=cyoD8I9Vrhhtkt8VtPkgFgMCWF37y9bG6B5wHiSYjibIp2L7yViz3+komkcAvqnFJc NVjvX/tAlydVsN7GGOKsmMHKEumStCAtN+HAQpNiXlLI+qfveWFKOpQRH1LiNba45rCe Des49n+aMyawH91zXt7nf+yZUMpMGizveJjX4ybiz9IbcQMa0pFPS/+V5yeZsqBWzvsx p6/XxqkE6Zi2AzrI2ZKyKgSZ4nz+EFyE3y6HOEgiO+DfVuouvBteUhB4IEja2Ev0IguH QwDdHB6q5KgKF2rlssN9RJttq5Ir+xo1joNoyUEPZMTn5CAhUJwAHjEJP//6kfkYNaUm DjOg== X-Received: by 10.14.204.198 with SMTP id h46mr32213089eeo.1.1356095674638; Fri, 21 Dec 2012 05:14:34 -0800 (PST) Original-Received: from localhost (i108036.upc-i.chello.nl. [62.195.108.36]) by mx.google.com with ESMTPS id l3sm21594481eem.14.2012.12.21.05.14.32 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 21 Dec 2012 05:14:33 -0800 (PST) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:68848 Archived-At: Hi,=20 I am struggling with a-not-so-easily reproducible bug that occurs only with ESS when sending input from a buffer to a sub-process.=20 Whenever I send a string to a subprocess, the point in process buffer jumps to the middle of the buffer, instead of staying at the process-mark at eob, where it supposed to be. And this is not ESS problem. Here is what I found during my investigation. It happens with (select-window w) in the `comint-postoutput-scroll-to-bottom' (reproduced below). I was monitoring the value of the (point) just before and after it, and it looks like this: before (point):9943 after (point):8619 So the point is clearly moved in select-window. Moreover the (point) equals (window-end) just before select-window is called, so it is visible. Consequently, the following (comint-adjust-point selected) is completely screwed because it relies on point *not* being moved!=20=20 Here is a relevant piece of `comint-postoutput-scroll-to-bottom' =E2=95=AD=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2= =94=80 #2124 =E2=94=80 /home/vitoshka/TVC/emacs/lisp/comint.el =E2=94=80=E2= =94=80 =E2=94=82 (dolist (w (get-buffer-window-list current nil t)) =E2=94=82 (select-window w) =E2=94=82 (unwind-protect =E2=94=82 (progn =E2=94=82 (comint-adjust-point selected) =E2=94=82 ;; Optionally scroll to the bottom of the window. =E2=94=82 (and comint-scroll-show-maximum-output =E2=94=82 (eobp) =E2=94=82 (recenter (- -1 scroll-margin)))) =E2=94=82 (select-window selected)))))) =E2=94=82 (set-buffer current)))) =E2=95=B0=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2=94=80=E2= =94=80 #2134 =E2=94=80 The variable `comint-scroll-show-maximum-output' is the default t, this is why comint runs `comint-postoutput-scroll-to-bottom' in its `comint-output-filter-functions'. I can propose a patch for commit to reset the point, but it looks like there is something much more fundamental going on in here. Thanks,=20 Vitalie =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D Important settings: value of $LANG: en_US.UTF-8 locale-coding-system: utf-8-unix default enable-multibyte-characters: t Major mode: Emacs-Lisp Minor modes in effect: sr-popviewer-mode: t TeX-PDF-mode: t rainbow-delimiters-mode: t global-auto-complete-mode: t auto-complete-mode: t diff-auto-refine-mode: t helm-match-plugin-mode: t shell-dirtrack-mode: t eldoc-mode: t show-paren-mode: t savehist-mode: t display-time-mode: t ido-everywhere: t global-auto-revert-mode: t global-subword-mode: t subword-mode: t tooltip-mode: t mouse-wheel-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t column-number-mode: t line-number-mode: t transient-mark-mode: t hs-minor-mode: t Recent input: C-p C-p C-u C-M-x C-n C-SPC=20 C-n C-n C-c C-r c c c C-o C-o M-> C-o =20 C-M-p C-p C-p C-p=20 C-p C-p C-p C-p C-SPC C-n C-n C-c C-r n n n n n n n=20 n n n n n n n n n n n n n n n n n n n n n n n n n n=20 n n n n n n n n n n n n n n n n n n n n n n n n n n=20 n n n n n n n C-p C-p C-SPC C-n C-n C-c C-r n n n n=20 n n n n n n n n n n n n n n n n n n n n n n n n n n=20 n n n n n n n n n n n n n n n n n n n n n n n n n n=20 n n n n n n n n n n n C-a C-p C-p C-p C-e=20 C-n C-n C-o C-x C-f ~ / t v e m a c =20 c o m i M-o s c r o l M-o=20 s c r o C-SPC o u t C-s M-k M-k M-k M-k M-k=20 M-k M-k C-n C-n C-n C-n C-n C-n C-n C-SPC C-n C-n C-n=20 C-n C-n C-n C-n C-n C-n C-n C-n M-x k i l =20 C-x b C-g M-x e s s - v e r M-x v e r s =20 M-x b u g - r e s e n d=20 C-SPC b u g C-g M-x e m a c s C-SPC b u g Recent messages: Opening TLS connection to `imap.gmail.com'... Opening TLS connection with `gnutls-cli --insecure -p 993 imap.gmail.com'..= .failed Opening TLS connection with `gnutls-cli --insecure -p 993 imap.gmail.com --= protocols ssl3'...failed Opening TLS connection with `openssl s_client -connect imap.gmail.com:993 -= no_ssl2 -ign_eof'...done Opening TLS connection to `imap.gmail.com'...done Auto-saving... Mark set Quit ess-version : 12.09-1 [] GNU Emacs 24.2.50.1 (i686-pc-linux-gnu, GTK+ Version 2.24.13) of 2012-11-15= on vitoshka-home Quit Load-path shadows: /home/vitoshka/Dropbox/ELPA/magit-20121030.2025/.dir-locals hides /home/vit= oshka/Dropbox/ELPA/sunrise-commander-20121117.2055/.dir-locals /home/vitoshka/Dropbox/ELPA/magit-20121030.2025/.dir-locals hides ~/VC/gnus= /.dir-locals ~/VC/gnus/lisp/lpath hides ~/VC/auctex/lpath /home/vitoshka/Dropbox/ELPA/popup-20121020.1203/popup hides ~/VC/popup-el/p= opup ~/VC/org-mode/lisp/org-remember hides /usr/local/share/emacs/24.2.50/lisp/o= rg/org-remember ~/VC/org-mode/lisp/org-protocol hides /usr/local/share/emacs/24.2.50/lisp/o= rg/org-protocol ~/VC/org-mode/lisp/ob-dot hides /usr/local/share/emacs/24.2.50/lisp/org/ob-= dot ~/VC/gnus/lisp/nnweb hides /usr/local/share/emacs/24.2.50/lisp/gnus/nnweb ~/VC/gnus/lisp/yenc hides /usr/local/share/emacs/24.2.50/lisp/gnus/yenc ~/VC/gnus/lisp/gnus-srvr hides /usr/local/share/emacs/24.2.50/lisp/gnus/gnu= s-srvr /home/vitoshka/Dropbox/ELPA/rebox2-20121113.2100/rebox2 hides /home/vitoshk= a/Dropbox/.emacs.d/site-lisp/rebox2/rebox2 Features: (shadow emacsbug edebug essddr helm-elisp helm-eval url-cache nnfolder bbdb-message sendmail flymake qp shr-color color shr url-http url-auth url-gw org-wl org-w3m org-vm org-rmail org-mhe org-mew org-irc org-jsinfo org-infojs org-html org-info org-gnus org-docview org-bibtex bibtex org-bbdb wdired reftex-auc igrep tex-info texinfo two-column iso-transl vc-dispatcher vc-svn helm-mode url-handlers smiley gnus-cite flow-fill mm-archive mail-extr gnus-bcklg gnus-async gnus-ml gnus-topic utf-7 nndraft nnmh nnimap parse-time utf7 gnus-agent gnus-srvr gnus-score score-mode nnvirtual gnus-msg gnus-cache bbdb-gnus gnus-art mm-uu mml2015 epg-config mm-view mml-smime smime dig bbdb-mua bbdb-com netrc network-stream starttls tls gnus-notify gnus-demon nntp bbdb timezone supercite regi nnir gnus-sum gnus-group gnus-undo nnmail mail-source nnoo gnus-start gnus-spec gnus-int gnus-range message rfc822 mml mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 rfc2047 rfc2045 ietf-drums mailabbrev gmm-utils mailheader gnus-win gnus-load gnus gnus-ems gnus-compat nnheader mail-utils sunrise-x-popviewer sunrise-x-checkpoints bookmark sunrise-x-modeline sunrise-x-loop sunrise-x-tree sunrise-commander term ehelp electric hl-line find-dired esh-var esh-io esh-cmd esh-opt esh-ext esh-proc esh-arg esh-groups eshell esh-util esh-module esh-mode disp-table enriched desktop debug view magithub crm json magit-bisect magit-key-mode magit sort smex dabbrev skeleton helm-imenu misearch multi-isearch texmathp vc-git preview prv-emacs tex-buf reftex-dcr zotelo flyspell ispell font-latex latex tex-style tex dbus latexenc mule-util help-mode rainbow-delimiters helm-misc helm-files image-dired dired-x dired-aux helm-tags helm-bookmark helm-adaptative helm-info helm-net xml url url-proxy url-privacy url-expand url-methods url-history url-cookie url-domsuf url-util mailcap helm-plugin helm-locate helm-help helm-external helm-buffers helm-grep helm-regexp grep helm-elscreen helm-utils ffap url-parse url-vars ob-latex ob-R appt diary-lib diary-loaddefs org-clock org-exp ob-exp org-agenda org ob-tangle ob-ref ob-lob ob-table org-footnote org-src ob-comint ob-keys org-pcomplete org-list org-faces org-entities noutline outline org-version ob-emacs-lisp ob org-compat org-macs ob-eval org-loaddefs find-func cal-menu calendar cal-loaddefs iimage pos-tip ac-octave octave-inf octave-mod ac-math auto-complete-config auto-complete popup saveplace doc-view jka-compr image-mode reftex reftex-vars reftex-cite preview-latex tex-site auto-loads info-look psvn log-edit pcvs-util add-log diff-mode elp ediff-merg ediff-diff ediff-wind ediff-mult ediff-help ediff-init ediff-util dired xquery-mode generic rng-nxml rng-valid rng-loc rng-uri rng-parse nxml-parse rng-match rng-dt rng-util rng-pttrn nxml-ns nxml-mode nxml-outln nxml-rap nxml-util nxml-glyph nxml-enc xmltok smart-operator rx rebox2 warnings slime-media slime-presentations slime-scratch slime-asdf slime-repl slime derived pp hyperspec menu-bar+ helm-descbinds helm-match-plugin helm helm-config mic-paren eldoc-eval adaptive-wrap-autoloads bbdb-autoloads bm-autoloads bookmark+-autoloads edit-server-autoloads eldoc-eval-autoloads esk-autoloads flex-isearch-autoloads fuzzy-autoloads fuzzy-match-autoloads git-blame-autoloads helm-autoloads helm-descbinds-autoloads htmlize-autoloads ido-load-library-autoloads ido-ubiquitous-autoloads ido-yes-or-no-autoloads igrep-autoloads jabber-autoloads js2-mode-autoloads lacarte-autoloads magit-gh-pulls-autoloads gh-autoloads logito-autoloads magit-push-remote-autoloads magithub-autoloads magit-autoloads markdown-mode+-autoloads markdown-mode-autoloads memory-usage-autoloads mic-paren-autoloads minimap-autoloads oauth2-autoloads persistent-soft-autoloads list-utils-autoloads pcache-autoloads finder-inf popup-autoloads rainbow-delimiters-autoloads rainbow-mode-autoloads rebox2-autoloads smex-autoloads stem-autoloads sunrise-commander-autoloads synonyms-autoloads w3m-autoloads zotelo-autoloads package tramp tramp-compat auth-source eieio byte-opt bytecomp byte-compile cconv assoc gnus-util mm-util mail-prsvr password-cache tramp-loaddefs format-spec ess-toolbar ess-mouse mouseme thingatpt browse-url ess-menu ess-swv ess-noweb ess-noweb-font-lock-mode ess-bugs-l essd-els ess-sas-d ess-sas-l ess-sas-a shell pcomplete ess-arc-d ess-vst-d ess-xls-d ess-lsp-l ess-sta-d ess-sta-l cc-vars cc-defs make-regexp ess-sp6-d ess-sp5-d ess-sp3-d ess-julia ess-r-d ess-tracebug compile ess-roxy easy-mmode hideshow ess-help info reporter ess-developer ess-r-args eldoc ess-s-l speedbar sb-image ezimage dframe ess ess-inf comint ansi-color ring ess-mode ess-noweb-mode edmacro kmacro ess-utils ess-custom ess-compat ess-site ibuf-ext ibuffer recentf tree-widget wid-edit easymenu uniquify paren savehist time cus-start cus-load solarized-dark-theme solarized imenu-anywhere cl-macs gv imenu iflipb ido sh-script smie executable advice help-fns advice-preload autorevert subword server cl cl-lib time-date tooltip ediff-hook vc-hooks lisp-float-type mwheel x-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list newcomment 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 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 dbusbind dynamic-setting system-font-setting font-render-setting move-toolbar gtk x-toolkit x multi-tty emacs)