From debbugs-submit-bounces@debbugs.gnu.org Wed Apr 15 17:29:48 2015 Received: (at submit) by debbugs.gnu.org; 15 Apr 2015 21:29:49 +0000 Received: from localhost ([127.0.0.1]:57451 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YiUsV-0005fu-RR for submit@debbugs.gnu.org; Wed, 15 Apr 2015 17:29:48 -0400 Received: from eggs.gnu.org ([208.118.235.92]:51737) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YiUjZ-0005Qq-NY for submit@debbugs.gnu.org; Wed, 15 Apr 2015 17:20:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YiUjT-0005Ab-6R for submit@debbugs.gnu.org; Wed, 15 Apr 2015 17:20:28 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM, T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:56590) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YiUjS-0005AU-UM for submit@debbugs.gnu.org; Wed, 15 Apr 2015 17:20:27 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36992) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YiUjR-0002cO-Dr for bug-auctex@gnu.org; Wed, 15 Apr 2015 17:20:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YiUjP-000594-Lc for bug-auctex@gnu.org; Wed, 15 Apr 2015 17:20:25 -0400 Received: from mail-wi0-x22c.google.com ([2a00:1450:400c:c05::22c]:34838) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YiUjP-00058h-AR for bug-auctex@gnu.org; Wed, 15 Apr 2015 17:20:23 -0400 Received: by widdi4 with SMTP id di4so170731890wid.0 for ; Wed, 15 Apr 2015 14:20:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:subject:from:to:date:content-type:mime-version :content-transfer-encoding; bh=0Z30pEM+fTjUOy++iZNacmsGulr4D/v4rBEA3kM07Sk=; b=NpaGf/S2n1aSP5VeHmC2CyKo1vOFY6ajU/ORjwfrgVTc/JAuwxbBCoYWYEWRmf58hs lWiks6LGeu9drdSIHZzzrO/v9vFuX6gQYNIMLYrsoAxObucflZgE5f+OAuK0spQvNapP 8ynZO+E8+altG+0kx8wCJFSFjVJw0EQy5P273fDbNCVOBEAofS75I12LWi7S0a7bxZKm Cjpho4Jmq1U8Ns34lplJjSNGHRSpOIZ4cv0Rxm0gWUP1WAiGt5sSmdTXBkTR5VdU6z9/ D5bqrSvxmpQum5JnaeuG+lZvG6kdnwYJGKqQR/MtCJ5yxCPRLJA8qauKOzSPBJO9E9bz iH8g== X-Received: by 10.180.96.41 with SMTP id dp9mr1519805wib.77.1429132821927; Wed, 15 Apr 2015 14:20:21 -0700 (PDT) Received: from kyoto ([2001:a60:1554:b301:5e51:4fff:fe1d:7f86]) by mx.google.com with ESMTPSA id di7sm6163749wib.23.2015.04.15.14.20.20 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 15 Apr 2015 14:20:21 -0700 (PDT) Message-ID: <1429132820.5656.8.camel@gmail.com> Subject: 11.88; Evince reverse search opens buffer in all frames From: =?ISO-8859-1?Q?I=F1aki_Garc=EDa?= Etxebarria To: bug-auctex@gnu.org Date: Wed, 15 Apr 2015 23:20:20 +0200 Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.12.11 (3.12.11-1.fc21) Mime-Version: 1.0 Content-Transfer-Encoding: 8bit X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.0 (----) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Wed, 15 Apr 2015 17:29:46 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.0 (----) Hello, I am often editing various TeX files at the same time, and try to use evince reverse search from evince, with "Ctrl+Click", in order to make a change to a specific file. Currently TeX-source-correlate-sync-source uses "find-file" in order to load the file. This is very frustrating, since it makes *all* emacs windows switch to that buffer, including those in which you are editing unrelated documents. Observed behavior: All emacs windows editing TeX files jump to the source position for the file associated to the pdf in evince. Expected behavior: Only the window in which you are editing the relevant file reacts. I have replaced TeX-source-correlate-sync-source by the following code in my local instalation, and it is working well. It only reacts to the DBus signal if the current buffer contains the file in the signal (see the (if (string= ...)) part). (defun TeX-source-correlate-sync-source (file linecol &rest ignored) "Show TeX FILE with point at LINECOL. This function is called when emacs receives a SyncSource signal emitted from the Evince document viewer. IGNORED absorbs an unused id field accompanying the DBUS signal sent by Evince-3.0.0 or newer." ;; FILE may be given as relative path to the TeX-master root document or as ;; absolute file:// URL. In the former case, the tex file has to be already ;; opened. (let ((buf (let ((f (condition-case nil (progn (require 'url-parse) (require 'url-util) (url-unhex-string (aref (url-generic-parse-url file) 6))) ;; For Emacs 21 compatibility, which doesn't have the ;; url package. (file-error (replace-regexp-in-string "^file://" "" file))))) (if (string= f (buffer-file-name)) (current-buffer) nil))) (line (car linecol)) (col (cadr linecol))) (when (not (null buf)) (switch-to-buffer buf) (push-mark (point) 'nomsg) (goto-char (point-min)) (forward-line (1- line)) (unless (= col -1) (move-to-column col)) (raise-frame)))) ------------------------------------------------------------------------ Emacs : GNU Emacs 24.4.1 (x86_64-redhat-linux-gnu, GTK+ Version 3.14.5) of 2014-11-19 on buildvm-03.phx2.fedoraproject.org Package: 11.88 current state: ============== (setq AUCTeX-date "2014-10-29" window-system 'x LaTeX-version "2e" TeX-style-path '("/var/auctex" "/usr/share/emacs/site-lisp/auctex/style" "/home/inaki/.emacs.d/auctex/auto" "/home/inaki/.emacs.d/auctex/style" "auto" "style") TeX-auto-save nil TeX-parse-self nil TeX-master t TeX-command-list '(("TeX" "%(PDF)%(tex) %(extraopts) %`%S%(PDFout)%(mode)%' %t" TeX-run-TeX nil (plain-tex-mode ams-tex-mode texinfo-mode) :help "Run plain TeX") ("LaTeX" "%`%l%(mode)%' %t" TeX-run-TeX nil (latex-mode doctex-mode) :help "Run LaTeX") ("Makeinfo" "makeinfo %(extraopts) %t" TeX-run-compile nil (texinfo-mode) :help "Run Makeinfo with Info output") ("Makeinfo HTML" "makeinfo %(extraopts) --html %t" TeX-run-compile nil (texinfo-mode) :help "Run Makeinfo with HTML output") ("AmSTeX" "%(PDF)amstex %(extraopts) %`%S%(PDFout)%(mode)%' %t" TeX-run-TeX nil (ams-tex-mode) :help "Run AMSTeX") ("ConTeXt" "texexec --once --texutil %(extraopts) %(execopts)%t" TeX-run-TeX nil (context-mode) :help "Run ConTeXt once") ("ConTeXt Full" "texexec %(extraopts) %(execopts)%t" TeX-run-TeX nil (context-mode) :help "Run ConTeXt until completion") ("BibTeX" "bibtex %s" TeX-run-BibTeX nil t :help "Run BibTeX") ("Biber" "biber %s" TeX-run-Biber nil t :help "Run Biber") ("View" "%V" TeX-run-discard-or-function t t :help "Run Viewer") ("Print" "%p" TeX-run-command t t :help "Print the file") ("Queue" "%q" TeX-run-background nil t :help "View the printer queue" :visible TeX-queue-command) ("File" "%(o?)dvips %d -o %f " TeX-run-command t t :help "Generate PostScript file") ("Index" "makeindex %s" TeX-run-command nil t :help "Create index file") ("Xindy" "texindy %s" TeX-run-command nil t :help "Run xindy to create index file") ("Check" "lacheck %s" TeX-run-compile nil (latex-mode) :help "Check LaTeX file for correctness") ("ChkTeX" "chktex -v6 %s" TeX-run-compile nil (latex-mode) :help "Check LaTeX file for common mistakes") ("Spell" "(TeX-ispell-document \"\")" TeX-run-function nil t :help "Spell-check the document") ("Clean" "TeX-clean" TeX-run-function nil t :help "Delete generated intermediate files") ("Clean All" "(TeX-clean t)" TeX-run-function nil t :help "Delete generated intermediate and output files") ("Other" "" TeX-run-command t t :help "Run an arbitrary command") ) ) Thanks, Iñaki From debbugs-submit-bounces@debbugs.gnu.org Thu Apr 16 05:04:05 2015 Received: (at 20340) by debbugs.gnu.org; 16 Apr 2015 09:04:05 +0000 Received: from localhost ([127.0.0.1]:57684 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YifiP-0006aX-52 for submit@debbugs.gnu.org; Thu, 16 Apr 2015 05:04:05 -0400 Received: from deliver.uni-koblenz.de ([141.26.64.15]:52607) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YifiM-0006a5-3Y for 20340@debbugs.gnu.org; Thu, 16 Apr 2015 05:04:03 -0400 Received: from thinkpad-t440p (dhcp152.uni-koblenz.de [141.26.71.152]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by deliver.uni-koblenz.de (Postfix) with ESMTPSA id 618F51A86CD; Thu, 16 Apr 2015 11:04:00 +0200 (CEST) From: Tassilo Horn To: =?utf-8?B?ScOxYWtpIEdhcmPDrWE=?= Etxebarria Subject: Re: bug#20340: 11.88; Evince reverse search opens buffer in all frames References: <1429132820.5656.8.camel@gmail.com> Date: Thu, 16 Apr 2015 11:03:59 +0200 In-Reply-To: <1429132820.5656.8.camel@gmail.com> (=?utf-8?Q?=22I=C3=B1aki?= =?utf-8?Q?_Garc=C3=ADa?= Etxebarria"'s message of "Wed, 15 Apr 2015 23:20:20 +0200") Message-ID: <87bnioigw0.fsf@gnu.org> User-Agent: Gnus/5.130012 (Ma Gnus v0.12) Emacs/25.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: 20340 Cc: 20340@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.3 (-) I=C3=B1aki Garc=C3=ADa Etxebarria writes: Hi I=C3=B1aki, > I am often editing various TeX files at the same time, and try to use > evince reverse search from evince, with "Ctrl+Click", in order to make > a change to a specific file. Currently > TeX-source-correlate-sync-source uses "find-file" in order to load the > file. This is very frustrating, since it makes *all* emacs windows > switch to that buffer, including those in which you are editing > unrelated documents. That should definitely not happen. `find-file' should at most change the buffer of one window. And if the file is already shown in some window, then it should just select that. But anyway, there have been other problematic cases with the use of `find-file' so the current version of AUCTeX (e.g., the git version or version 11.88.4 which you can install from ELPA) doesn't use it with `TeX-source-correlate-sync-source' anymore. I just tested with multiple tex documents, and that the current version seems to behave as you would expect. > I have replaced TeX-source-correlate-sync-source by the following code > in my local instalation, and it is working well. It only reacts to > the DBus signal if the current buffer contains the file in the signal > (see the (if (string=3D ...)) part). I don't think that's a good idea. That would do nothing when you work on a multi-file document and the current buffer has another part of the document open. Anyway, please upgrade your AUCTeX version and report back if that works for you. Bye, Tassilo From debbugs-submit-bounces@debbugs.gnu.org Thu Apr 16 10:51:31 2015 Received: (at 20340) by debbugs.gnu.org; 16 Apr 2015 14:51:31 +0000 Received: from localhost ([127.0.0.1]:58194 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Yil8c-0002qp-K1 for submit@debbugs.gnu.org; Thu, 16 Apr 2015 10:51:31 -0400 Received: from mail-wg0-f44.google.com ([74.125.82.44]:35117) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Yil8a-0002qa-Q0 for 20340@debbugs.gnu.org; Thu, 16 Apr 2015 10:51:29 -0400 Received: by wgyo15 with SMTP id o15so83745219wgy.2 for <20340@debbugs.gnu.org>; Thu, 16 Apr 2015 07:51:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:subject:from:to:cc:date:in-reply-to:references :content-type:mime-version:content-transfer-encoding; bh=bRQoNppF4w3fkf8jY6p3zLI+cjPdD/eo6bfLFPn6UyI=; b=j6DaP88+tIMa9bY/6ovvvqqditckMkjrV1qUkWuaLORWOIDQSzpko35ZtvGXy99xtc D0xrBmfbchZRqYJ4RCrbzs9ufgkAGNIXvHWm3yMbBR6HD2KyDrXDQFdu3ZmLTl8ZxBg9 4/Q2wpUgXhwW0AlYpHNm3p3SI/j6yW3nyT2XR2F0q7vM18vEMYcWpeHbz7glFmz+hc72 2kyE0ZMgyN5bz4zvflCvA/gZp2SL5pHsGMmsRd6Zl5WYz7wjkKY2TL7cePSAxWaj1p71 u0lH7TJe8ypGCjp/l8lSYo3I/y6Cw4QZpB9U8BUYNbn36RskZIQPSp0x2CKjN0I6W7i6 ZPLw== X-Received: by 10.180.81.104 with SMTP id z8mr5886102wix.5.1429195883147; Thu, 16 Apr 2015 07:51:23 -0700 (PDT) Received: from pcl320a.mppmu.mpg.de (pcl320a.mppmu.mpg.de. [134.107.3.215]) by mx.google.com with ESMTPSA id i10sm10714922wja.40.2015.04.16.07.51.21 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 16 Apr 2015 07:51:21 -0700 (PDT) Message-ID: <1429195880.20258.28.camel@gmail.com> Subject: Re: bug#20340: 11.88; Evince reverse search opens buffer in all frames From: Inaki Garcia Etxebarria To: Tassilo Horn Date: Thu, 16 Apr 2015 16:51:20 +0200 In-Reply-To: <87bnioigw0.fsf@gnu.org> References: <1429132820.5656.8.camel@gmail.com> <87bnioigw0.fsf@gnu.org> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.12.11 Mime-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 20340 Cc: 20340@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) Hi Tassilo, Thanks for the quick reply: On Thu, 2015-04-16 at 11:03 +0200, Tassilo Horn wrote: > > I am often editing various TeX files at the same time, and try to use > > evince reverse search from evince, with "Ctrl+Click", in order to make > > a change to a specific file. Currently > > TeX-source-correlate-sync-source uses "find-file" in order to load the > > file. This is very frustrating, since it makes *all* emacs windows > > switch to that buffer, including those in which you are editing > > unrelated documents. > > That should definitely not happen. `find-file' should at most change > the buffer of one window. And if the file is already shown in some > window, then it should just select that. > > But anyway, there have been other problematic cases with the use of > `find-file' so the current version of AUCTeX (e.g., the git version or > version 11.88.4 which you can install from ELPA) doesn't use it with > `TeX-source-correlate-sync-source' anymore. > > I just tested with multiple tex documents, and that the current version > seems to behave as you would expect. I removed my .emacs and .emacs.d, upgraded to the latest version in ELPA (11.88.4), and for me it still opens the file in all windows (although it is now a bit better, in that the opened file only takes half the emacs window). I made some screenshots to show better what happens: In https://www.mpp.mpg.de/~inaki/auctex1.png I opened a couple of tex files (draft5.tex and BC-O5.tex), and the pdf corresponding to one of them (draft5.pdf). Then I Ctrl+Clicked in evince, getting the results in https://www.mpp.mpg.de/~inaki/auctex2.png As you can see, draft5.tex got opened in the window for BC-O5.tex too, which is not what I intended. Maybe detailing my usual workflow helps explain why the current behavior will be undesirable for some users like me: I usually work on a file (draft5.tex), and at the same time work on a number (3-4 typically) tikz pictures on the side, which then get independently compiled to pdf (they are their own standalone .tex documents). These pdf files are included, via \includegraphics, into the final pdf. I typically also have some other tex files open in other emacs instances for reference, but they are not necessarily directly related to the main tex file (they contain some equations to copy and paste, or things like that). I use workspaces to manage the emacs windows, not emacs buffers in a single window. As it is right now, when I click in evince, *every* window opens draft5.tex, but I clearly only want the emacs window already showing draft5.tex to react, not the ones containing tikz or reference tex files. > > I have replaced TeX-source-correlate-sync-source by the following code > > in my local instalation, and it is working well. It only reacts to > > the DBus signal if the current buffer contains the file in the signal > > (see the (if (string= ...)) part). > > I don't think that's a good idea. That would do nothing when you work > on a multi-file document and the current buffer has another part of the > document open. Well, that would be preferable for my usecase, to be honest. Perhaps some middle ground is possible: if the .tex file to be opened and the one being shown have the same master document, then switch to that file, but otherwise do nothing (perhaps with a message in case switching was really intended and for some reason it did not work). I don't know enough of the internals of auctex to know how hard this is to implement. It may be easier, and still somewhat sensible, to switch to the file evince tells us to open only if it is already open in some emacs buffer, even if it is not the one being shown currently. Well, just a couple of suggestions anyway. I was surprised by the new behavior when I upgraded AUCTeX (I had some custom code for doing the reverse lookup before), and it broke my workflow, so I wanted to report. Thanks in any case for AUCTeX (which is wonderful in general :) ), Iñaki > > Anyway, please upgrade your AUCTeX version and report back if that works > for you. > > Bye, > Tassilo From debbugs-submit-bounces@debbugs.gnu.org Thu Apr 16 15:58:18 2015 Received: (at 20340) by debbugs.gnu.org; 16 Apr 2015 19:58:18 +0000 Received: from localhost ([127.0.0.1]:58368 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YipvV-0004yg-DQ for submit@debbugs.gnu.org; Thu, 16 Apr 2015 15:58:17 -0400 Received: from out4-smtp.messagingengine.com ([66.111.4.28]:43620) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YipvT-0004yX-BQ for 20340@debbugs.gnu.org; Thu, 16 Apr 2015 15:58:16 -0400 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 6ADE72072F for <20340@debbugs.gnu.org>; Thu, 16 Apr 2015 15:58:13 -0400 (EDT) Received: from frontend2 ([10.202.2.161]) by compute1.internal (MEProxy); Thu, 16 Apr 2015 15:58:13 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-sasl-enc :x-sasl-enc; s=smtpout; bh=MgRuEMvk2+rXQefVsyrZ+rLtjEA=; b=nM/sB Cjte0OhboVKcNuyJ4wJ3DqwCVNx9zPa5MIUYOemZOwcWG965LdFGvcpJcRdyWPp6 s13KGwi6qRmYWzL/UTZ1SzRoOJSOuzO1bG2xlCRhQugdsBF5iA80xRB8Dkq3XT7+ hAQxm0CZUxsAj779Bmzm0m4IbMQEkMxF1WT2Ro= X-Sasl-enc: 2FTzvfF9D75esxU/er7bwoekg90WP5Z0txTgXYgdWR68 1429214292 Received: from thinkpad-t440p (unknown [2.161.96.207]) by mail.messagingengine.com (Postfix) with ESMTPA id D9D4C6800F9; Thu, 16 Apr 2015 15:58:11 -0400 (EDT) From: Tassilo Horn To: Inaki Garcia Etxebarria Subject: Re: bug#20340: 11.88; Evince reverse search opens buffer in all frames References: <1429132820.5656.8.camel@gmail.com> <87bnioigw0.fsf@gnu.org> <1429195880.20258.28.camel@gmail.com> Date: Thu, 16 Apr 2015 21:58:08 +0200 In-Reply-To: <1429195880.20258.28.camel@gmail.com> (Inaki Garcia Etxebarria's message of "Thu, 16 Apr 2015 16:51:20 +0200") Message-ID: <87vbgvzvzj.fsf@gnu.org> User-Agent: Gnus/5.130012 (Ma Gnus v0.12) Emacs/25.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 20340 Cc: 20340@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.3 (/) Inaki Garcia Etxebarria writes: Hi Inaki, > I removed my .emacs and .emacs.d, upgraded to the latest version in > ELPA (11.88.4), and for me it still opens the file in all windows > (although it is now a bit better, in that the opened file only takes > half the emacs window). BTW, what confused me a bit is your wording. Emacs calls the WM windows, i.e., the things with the menu/tool-bar and window decorations "frames". Windows in emacs are the panes that display a buffer which you can split with C-x 2 and C-x 3. So your problem is that after clicking in Evince, all (single) windows of your two emacs frames show the buffer of the tex file from which the pdf was generated. > I made some screenshots to show better what happens: In > https://www.mpp.mpg.de/~inaki/auctex1.png I opened a couple of tex > files (draft5.tex and BC-O5.tex), and the pdf corresponding to one of > them (draft5.pdf). Then I Ctrl+Clicked in evince, getting the results > in https://www.mpp.mpg.de/~inaki/auctex2.png As you can see, > draft5.tex got opened in the window for BC-O5.tex too, which is not > what I intended. Ah, what a luck that you included the terminal window in the screenshot! Now I know what the problem is. You fire up two emacs instances, i.e., two completely separate emacs processes. When Evince sends the SyncSource signal via DBUS, both emacs processe will receive it and act accordingly, i.e., pop to the corresponding tex buffer. There is no (simple) way that these two separate emacs processes could talk to each other in order to negotiate which one should open the file. Since a few years, one single emacs process can have arbitrarily frames no matter if graphical or tty frames. You start emacs once, and when you want to, you can open another frame using `C-x 5 2'. Then use one frame for document1, the other for document2, yet another one for document3. And then, because there is only one single emacs process, inverse search with Evince will magically work. :-) This one emacs, many frames thingy is documented in (info "(emacs)Emacs Server") Bye, Tassilo (Embeddings for the non-toric Pezzo singularities, what?!?) :-) From debbugs-submit-bounces@debbugs.gnu.org Fri Apr 17 06:10:24 2015 Received: (at 20340) by debbugs.gnu.org; 17 Apr 2015 10:10:24 +0000 Received: from localhost ([127.0.0.1]:58626 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Yj3E7-0002f6-R1 for submit@debbugs.gnu.org; Fri, 17 Apr 2015 06:10:24 -0400 Received: from mail-wi0-f174.google.com ([209.85.212.174]:33276) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Yj3E5-0002er-JR for 20340@debbugs.gnu.org; Fri, 17 Apr 2015 06:10:22 -0400 Received: by wiax7 with SMTP id x7so30490901wia.0 for <20340@debbugs.gnu.org>; Fri, 17 Apr 2015 03:10:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:subject:from:to:cc:date:in-reply-to:references :content-type:mime-version:content-transfer-encoding; bh=bF16ZR+HsjZi2cf2yps2jrqjNMmBvcEPkANp3ZPpKr0=; b=0nTynFbF2KuklnWGmb1o8Y82kLiEa1TJvf9T+HKVzirZaiAV29DJQamCraDdxEA6AU L75p6V26E1QhmTmNm+mO0wpPrAo+At/FLBpPJNM67vJLqkA2+FNSZosWCxjGVmnu7f8v WstIR69U0/LCiM1EIcRhh/dv0GZodMbtM8preBGebn6D91xxbNHlgelzKvYyKfysrK0B Y9+6FgZqWitnlt6XbMs+YnWJ/MP+rUGurab/UZYUbCk0X7PP+eVciMTgRIj1L/0HORKa vArqU9av5NDJUOl48yEW+5PMvg/2XxNZbGjP1VxXC2KtjCzs1kA+zyOwIxIKxpi3qFuX 8Glg== X-Received: by 10.194.57.11 with SMTP id e11mr4021806wjq.19.1429265415998; Fri, 17 Apr 2015 03:10:15 -0700 (PDT) Received: from kyoto ([2001:a60:157d:b101:5e51:4fff:fe1d:7f86]) by mx.google.com with ESMTPSA id cf12sm13978299wjb.10.2015.04.17.03.10.14 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 17 Apr 2015 03:10:14 -0700 (PDT) Message-ID: <1429265413.14164.24.camel@gmail.com> Subject: Re: bug#20340: 11.88; Evince reverse search opens buffer in all frames From: =?ISO-8859-1?Q?I=F1aki_Garc=EDa?= Etxebarria To: Tassilo Horn Date: Fri, 17 Apr 2015 12:10:13 +0200 In-Reply-To: <87vbgvzvzj.fsf@gnu.org> References: <1429132820.5656.8.camel@gmail.com> <87bnioigw0.fsf@gnu.org> <1429195880.20258.28.camel@gmail.com> <87vbgvzvzj.fsf@gnu.org> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.12.11 (3.12.11-1.fc21) Mime-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 20340 Cc: 20340@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) Hi Tassilo, On Thu, 2015-04-16 at 21:58 +0200, Tassilo Horn wrote: > BTW, what confused me a bit is your wording. Emacs calls the WM > windows, i.e., the things with the menu/tool-bar and window decorations > "frames". Windows in emacs are the panes that display a buffer which > you can split with C-x 2 and C-x 3. > > So your problem is that after clicking in Evince, all (single) windows > of your two emacs frames show the buffer of the tex file from which the > pdf was generated. Right, exactly. Sorry for the wrong wording! I will try to be more accurate below, let's see how it goes :) > Ah, what a luck that you included the terminal window in the screenshot! > Now I know what the problem is. > > You fire up two emacs instances, i.e., two completely separate emacs > processes. When Evince sends the SyncSource signal via DBUS, both emacs > processe will receive it and act accordingly, i.e., pop to the > corresponding tex buffer. > > There is no (simple) way that these two separate emacs processes could > talk to each other in order to negotiate which one should open the file. > > Since a few years, one single emacs process can have arbitrarily frames > no matter if graphical or tty frames. You start emacs once, and when > you want to, you can open another frame using `C-x 5 2'. Then use one > frame for document1, the other for document2, yet another one for > document3. > > And then, because there is only one single emacs process, inverse search > with Evince will magically work. :-) Thanks for the hint! This works better, but still in a somewhat surprising fashion at times. Again with a clean installation of AUCTeX 11.88.4 (setting "TeX-source-correlate-mode" to t in my .emacs), I observe the following: I run "emacs draft5.tex". Then, inside that emacs frame: "C-x 5 2". That creates a new frame still showing draft5.tex. In that new frame, I open "BC-tiling.tex" using the "Open File" toolbar button. I open draft5.pdf in evince from a terminal. So far so good, this is what I see: https://www.mpp.mpg.de/~inaki/auctex3.png Now select (i.e. give focus in the WM) the frame showing draft5.tex. If I Ctrl+Click in evince this frame changes to the right place, good: https://www.mpp.mpg.de/~inaki/auctex4.png If instead I have the frame showing BC-tiling.tex with focus, and Ctrl+Click in evince, it is the frame showing BC-tiling.tex that reacts, and I get the following: https://www.mpp.mpg.de/~inaki/auctex5.png The frame showing draft5.tex does not react at all in this case (I scrolled a bit the position in that buffer before ctrl+clicking in evince to make that manifest). It seems like in this case emacs should have enough info to say something like "if I am showing draft5.tex in some frame, just bring that (WM) window forward, and don't touch any other frames", which is ideal, I think. Would something like this be possible? > Tassilo (Embeddings for the non-toric Pezzo singularities, what?!?) :-) Sorry, using whatever I have at hand for examples :) Thanks, Iñaki From debbugs-submit-bounces@debbugs.gnu.org Fri Apr 17 10:13:28 2015 Received: (at 20340) by debbugs.gnu.org; 17 Apr 2015 14:13:28 +0000 Received: from localhost ([127.0.0.1]:59082 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Yj71L-0004LE-UR for submit@debbugs.gnu.org; Fri, 17 Apr 2015 10:13:28 -0400 Received: from out4-smtp.messagingengine.com ([66.111.4.28]:54907) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Yj71I-0004Kz-Nm for 20340@debbugs.gnu.org; Fri, 17 Apr 2015 10:13:25 -0400 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.nyi.internal (Postfix) with ESMTP id F3C282048F for <20340@debbugs.gnu.org>; Fri, 17 Apr 2015 10:13:23 -0400 (EDT) Received: from frontend1 ([10.202.2.160]) by compute4.internal (MEProxy); Fri, 17 Apr 2015 10:13:23 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-sasl-enc:x-sasl-enc; s=smtpout; bh=OBDfheHRPQbtiCa As6rtACBxrVA=; b=MG8Ffh6vC6F9TiWF8D3UXotF2N6arVZ6DA4CWrsO0IK+yaB fAyTcoS1Swj8r71+30c2O/aH99UOwIQ5asLLwqCfNNZvHMlRvSAbb9I+r41UFXya STreXmHp8y1/0u7rQndVXcX2GOt5rx3nfD/vGmyaqt2nhvQ8w/d9KQmqXzw0= X-Sasl-enc: 5LbSX84qoZY9V9OvuxAg0Zjtl2/J/ZPMFlsLG2PsU5IU 1429280003 Received: from thinkpad-t440p (unknown [2.161.92.44]) by mail.messagingengine.com (Postfix) with ESMTPA id EE564C00016; Fri, 17 Apr 2015 10:13:22 -0400 (EDT) From: Tassilo Horn To: =?utf-8?B?ScOxYWtpIEdhcmPDrWE=?= Etxebarria Subject: Re: bug#20340: 11.88; Evince reverse search opens buffer in all frames References: <1429132820.5656.8.camel@gmail.com> <87bnioigw0.fsf@gnu.org> <1429195880.20258.28.camel@gmail.com> <87vbgvzvzj.fsf@gnu.org> <1429265413.14164.24.camel@gmail.com> Date: Fri, 17 Apr 2015 16:13:20 +0200 In-Reply-To: <1429265413.14164.24.camel@gmail.com> (=?utf-8?Q?=22I=C3=B1ak?= =?utf-8?Q?i_Garc=C3=ADa?= Etxebarria"'s message of "Fri, 17 Apr 2015 12:10:13 +0200") Message-ID: <877fta6dxb.fsf@gnu.org> User-Agent: Gnus/5.130012 (Ma Gnus v0.12) Emacs/25.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 20340 Cc: 20340@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.3 (/) I=C3=B1aki Garc=C3=ADa Etxebarria writes: Hi I=C3=B1aki, > It seems like in this case emacs should have enough info to say > something like "if I am showing draft5.tex in some frame, just bring > that (WM) window forward, and don't touch any other frames", which is > ideal, I think. Would something like this be possible? Yes, it is. ,----[ C-h v display-buffer-reuse-frames RET ] | display-buffer-reuse-frames is a variable defined in `window.el'. | Its value is nil |=20 | This variable is obsolete since 24.3; | use a `reusable-frames' alist entry in `display-buffer-alist'. |=20 | Documentation: | Non-nil means `display-buffer' should reuse frames. | If the buffer in question is already displayed in a frame, raise | that frame. |=20 | You can customize this variable. |=20 | This variable was introduced, or its default value was changed, in | version 21.1 of Emacs. `---- ,----[ C-h v display-buffer-alist RET ] | display-buffer-alist is a variable defined in `window.el'. | Its value is nil |=20 | This variable may be risky if used as a file-local variable. |=20 | Documentation: | Alist of conditional actions for `display-buffer'. | This is a list of elements (CONDITION . ACTION), where: |=20 | CONDITION is either a regexp matching buffer names, or a | function that takes two arguments - a buffer name and the | ACTION argument of `display-buffer' - and returns a boolean. |=20 | ACTION is a cons cell (FUNCTION . ALIST), where FUNCTION is a | function or a list of functions. Each such function should | accept two arguments: a buffer to display and an alist of the | same form as ALIST. See `display-buffer' for details. |=20 | `display-buffer' scans this alist until it either finds a | matching regular expression or the function specified by a | condition returns non-nil. In any of these cases, it adds the | associated action to the list of actions it will try. |=20 | You can customize this variable. |=20 | This variable was introduced, or its default value was changed, in | version 24.1 of Emacs. `---- Wow, quite complex. But I think this is the value you want: (setq display-buffer-alist '((".*" . (display-buffer-reuse-window . ((reusable-frames . visibl= e)))))) Tested only briefly, though. Bye, Tassilo From debbugs-submit-bounces@debbugs.gnu.org Fri Apr 17 10:36:23 2015 Received: (at 20340) by debbugs.gnu.org; 17 Apr 2015 14:36:23 +0000 Received: from localhost ([127.0.0.1]:59097 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Yj7NW-0005Ig-ID for submit@debbugs.gnu.org; Fri, 17 Apr 2015 10:36:22 -0400 Received: from mail-wg0-f54.google.com ([74.125.82.54]:36163) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Yj7NT-0005IK-Sr for 20340@debbugs.gnu.org; Fri, 17 Apr 2015 10:36:20 -0400 Received: by wgsk9 with SMTP id k9so115128839wgs.3 for <20340@debbugs.gnu.org>; Fri, 17 Apr 2015 07:36:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:subject:from:to:cc:date:in-reply-to:references :content-type:mime-version:content-transfer-encoding; bh=M80gFSKX4S/ifHvhmDuMscySKRglkVv9Dh5jNIJL2SM=; b=a8RfdyBQcDW5tFwps+Be5beypzP8+bc07UbAy0gS2f5aAX09pstNbV2DNHXvpBlbvG jfR4+8b2iQsnhNj9jD+3vWcl1FOjYSEjpW9FD2z0wP7zNAa5tgYD7bVcNxfkJoKU51BG oCC1a1EDQ95BTvZo2W7XnlcFXpt3dxtEdbAEx35W7/wZ8ZK5NNM3jeOsZDmCDL5nGPL1 VqACMIt74u2UvuNM65PKyOl6lvCqlRYNof0vwpLypixvdNOrSwwFpPsrXftAC/+ffXoV bv47Wc/Tt8n848Y6ZJjBtgoXYPnUoglsIrPaf5saOJGl+8WHtgXcz2BmKbfMKpQvWOxm ulqQ== X-Received: by 10.194.177.132 with SMTP id cq4mr6325730wjc.99.1429281373582; Fri, 17 Apr 2015 07:36:13 -0700 (PDT) Received: from kyoto ([2001:a60:157d:b101:5e51:4fff:fe1d:7f86]) by mx.google.com with ESMTPSA id es5sm14917025wjc.30.2015.04.17.07.36.12 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 17 Apr 2015 07:36:12 -0700 (PDT) Message-ID: <1429281371.14164.33.camel@gmail.com> Subject: Re: bug#20340: 11.88; Evince reverse search opens buffer in all frames From: =?ISO-8859-1?Q?I=F1aki_Garc=EDa?= Etxebarria To: Tassilo Horn Date: Fri, 17 Apr 2015 16:36:11 +0200 In-Reply-To: <877fta6dxb.fsf@gnu.org> References: <1429132820.5656.8.camel@gmail.com> <87bnioigw0.fsf@gnu.org> <1429195880.20258.28.camel@gmail.com> <87vbgvzvzj.fsf@gnu.org> <1429265413.14164.24.camel@gmail.com> <877fta6dxb.fsf@gnu.org> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.12.11 (3.12.11-1.fc21) Mime-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 20340 Cc: 20340@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) Hi Tassilo, On Fri, 2015-04-17 at 16:13 +0200, Tassilo Horn wrote: > Wow, quite complex. But I think this is the value you want: > > (setq display-buffer-alist > '((".*" . (display-buffer-reuse-window . ((reusable-frames . visible)))))) > > Tested only briefly, though. This seems to work perfectly, thank you very much! Best, Iñaki From debbugs-submit-bounces@debbugs.gnu.org Fri Apr 17 14:54:51 2015 Received: (at 20340-done) by debbugs.gnu.org; 17 Apr 2015 18:54:51 +0000 Received: from localhost ([127.0.0.1]:59318 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YjBPf-00088W-6Z for submit@debbugs.gnu.org; Fri, 17 Apr 2015 14:54:51 -0400 Received: from out4-smtp.messagingengine.com ([66.111.4.28]:56001) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1YjBPc-00088M-OB for 20340-done@debbugs.gnu.org; Fri, 17 Apr 2015 14:54:49 -0400 Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailout.nyi.internal (Postfix) with ESMTP id 0215D20905 for <20340-done@debbugs.gnu.org>; Fri, 17 Apr 2015 14:54:47 -0400 (EDT) Received: from frontend1 ([10.202.2.160]) by compute2.internal (MEProxy); Fri, 17 Apr 2015 14:54:48 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-sasl-enc:x-sasl-enc; s=smtpout; bh=6PPz2veDT7Bj0eA DlHgNp6/jz5Y=; b=SvRKkPkKwbrPiAKZM9+5M8Ukgci+II5lZjU7qTBx9DqKWVX S3kmKd59hFFDRAk0LuxTk7+GUPsZFzWlDZBuQHCkECRIpv1raB2cd7R2Ru7m6LSB qZZOdlVbubZqgm+ZXPnP3GoufrSDf5vnzhlOo0SlqLtyTzcsU79Le6przDWw= X-Sasl-enc: z9AGP3maEjDyHvoIChuY5K/MFgDCsgUTZmb3Ol2Ydc83 1429296887 Received: from thinkpad-t440p (unknown [2.161.92.44]) by mail.messagingengine.com (Postfix) with ESMTPA id 34649C00016; Fri, 17 Apr 2015 14:54:47 -0400 (EDT) From: Tassilo Horn To: =?utf-8?B?ScOxYWtpIEdhcmPDrWE=?= Etxebarria Subject: Re: bug#20340: 11.88; Evince reverse search opens buffer in all frames References: <1429132820.5656.8.camel@gmail.com> <87bnioigw0.fsf@gnu.org> <1429195880.20258.28.camel@gmail.com> <87vbgvzvzj.fsf@gnu.org> <1429265413.14164.24.camel@gmail.com> <877fta6dxb.fsf@gnu.org> <1429281371.14164.33.camel@gmail.com> Date: Fri, 17 Apr 2015 20:54:45 +0200 In-Reply-To: <1429281371.14164.33.camel@gmail.com> (=?utf-8?Q?=22I=C3=B1ak?= =?utf-8?Q?i_Garc=C3=ADa?= Etxebarria"'s message of "Fri, 17 Apr 2015 16:36:11 +0200") Message-ID: <87383y60wa.fsf@gnu.org> User-Agent: Gnus/5.130012 (Ma Gnus v0.12) Emacs/25.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 20340-done Cc: 20340-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.3 (/) I=C3=B1aki Garc=C3=ADa Etxebarria writes: Hi I=C3=B1aki, >> Wow, quite complex. But I think this is the value you want: >>=20 >> (setq display-buffer-alist >> '((".*" . (display-buffer-reuse-window . ((reusable-frames . vis= ible)))))) >>=20 >> Tested only briefly, though. > This seems to work perfectly, thank you very much! Great to hear, and you're welcome! Bye, Tassilo From unknown Sat Aug 16 19:16:21 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sat, 16 May 2015 11:24:04 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator