From unknown Sat Sep 13 17:18:33 2025 X-Loop: help-debbugs@gnu.org Subject: bug#6910: 23: hl-line-mode fails to work with emacsclient Resent-From: David Reitter Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: konrad.podczeck@univie.ac.at, bug-gnu-emacs@gnu.org Resent-Date: Wed, 25 Aug 2010 14:01:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 6910 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 6910@debbugs.gnu.org Cc: konrad.podczeck@univie.ac.at X-Debbugs-Original-To: Bug-Gnu-Emacs X-Debbugs-Original-Xcc: konrad.podczeck@univie.ac.at Received: via spool by submit@debbugs.gnu.org id=B.128274484631458 (code B ref -1); Wed, 25 Aug 2010 14:01:01 +0000 Received: (at submit) by debbugs.gnu.org; 25 Aug 2010 14:00:46 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OoGWz-0008BL-Bw for submit@debbugs.gnu.org; Wed, 25 Aug 2010 10:00:45 -0400 Received: from mx10.gnu.org ([199.232.76.166]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OoGWw-0008BG-Rm for submit@debbugs.gnu.org; Wed, 25 Aug 2010 10:00:43 -0400 Received: from lists.gnu.org ([199.232.76.165]:46000) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1OoGYH-00046Y-HM for submit@debbugs.gnu.org; Wed, 25 Aug 2010 10:02:05 -0400 Received: from [140.186.70.92] (port=51459 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OoGYG-00014G-Bn for bug-gnu-emacs@gnu.org; Wed, 25 Aug 2010 10:02:05 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,T_DKIM_INVALID autolearn=unavailable version=3.3.1 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OoGYD-0005B7-1v for bug-gnu-emacs@gnu.org; Wed, 25 Aug 2010 10:02:04 -0400 Received: from mail-vw0-f41.google.com ([209.85.212.41]:42315) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OoGYC-0005Az-W1 for bug-gnu-emacs@gnu.org; Wed, 25 Aug 2010 10:02:01 -0400 Received: by vws16 with SMTP id 16so771782vws.0 for ; Wed, 25 Aug 2010 07:02:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:content-type :content-transfer-encoding:subject:date:references:to:message-id :mime-version:x-mailer; bh=bxfrUJkJqoeOfPZXB8mYVTe2PHems80Jrd8kr+aRPOM=; b=bL/OskkKNX3Z3fLS7062zhwuOKukzAK8lu4guUd4jd+mKMTcFIyryZQpEWTmSNB2+i 7U8UH4Myjg6bFuDnDcN0WZxrXWZSqjixlTpryIjQTf0dEzjGEvlclfNgSPXqhJr1Inqv A9BmveVfSnM+zyVIgodMwhIAuouPrAmgtB0Ds= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:content-type:content-transfer-encoding:subject:date:references :to:message-id:mime-version:x-mailer; b=Jce9SMQMVIJHWzy5jYPj4ptJy/vGMx+tTv+F80Re8zHp5eq0jBXEJaONnxwmw9kWWu ntdaToGFXtb+5olcuGfDn5yvI6FEY4BUOlTw1Bd4QaIKKztIqJYN7gFjzwV7PCtHgLsE I5zivVdQTNMRsEXLlnGLEBebUxTt4ZpTKAYpg= Received: by 10.220.95.10 with SMTP id b10mr5365075vcn.64.1282744919918; Wed, 25 Aug 2010 07:01:59 -0700 (PDT) Received: from elin.psy.cmu.edu (ELIN.PSY.CMU.EDU [128.2.248.190]) by mx.google.com with ESMTPS id v11sm855910vbb.11.2010.08.25.07.01.58 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 25 Aug 2010 07:01:59 -0700 (PDT) From: David Reitter Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Date: Wed, 25 Aug 2010 10:02:20 -0400 References: Message-Id: <59C306F3-9B20-4375-853E-1EDD576A0407@gmail.com> Mime-Version: 1.0 (Apple Message framework v1081) X-Mailer: Apple Mail (2.1081) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-Spam-Score: -3.7 (---) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -4.9 (----) X-debbugs-cc: konrad.podczeck@univie.ac.at The report below points out, in essence, that when we jump to a line = with an emacsclient command such as emacsclient --no-wait +55 "~/foo.tex" then the line highlighting is not updated in hl-line-mode. This turns out to be due to server-execute running the = post-command-hooks without the right buffers being current, and = hl-line-mode defines buffer-local hooks. The patch below addresses = that and I'm going to commit it unless somebody objects. diff --git a/lisp/server.el b/lisp/server.el index aadaeae..1905f70 100644 --- a/lisp/server.el +++ b/lisp/server.el @@ -1083,8 +1083,7 @@ The following commands are accepted by the client: (let* ((buffers (when files (run-hooks 'pre-command-hook) - (prog1 (server-visit-files files proc nowait) - (run-hooks 'post-command-hook))))) + (server-visit-files files proc nowait)))) =20 (mapc 'funcall (nreverse commands)) =20 @@ -1169,7 +1168,8 @@ so don't mark these buffers specially, just visit = them normally." (unless server-buffer-clients (setq server-existing-buffer t))) (server-goto-line-column (cdr file)) - (run-hooks 'server-visit-hook)) + (run-hooks 'server-visit-hook) + (run-hooks 'post-command-hook)) ;; hooks may be specific to = current buffer (unless nowait ;; When the buffer is killed, inform the clients. (add-hook 'kill-buffer-hook 'server-kill-buffer nil t) Begin forwarded message: > From: Konrad Podczeck > Date: August 23, 2010 4:22:54 PM EDT > To: aquamacs-devel@aquamacs.org > Cc: Reitter David > Subject: Syncing from Skim to Aquamacs and HL-line mode don't work = together >=20 > Hi David, >=20 > I observe the following with the actual Aquamacs (in contrast to the = 2.0 distribution): >=20 > Turn HL-line mode on. Syncing from Skim (or Xdvi) to Aquamacs makes = the cursor going to the appropriate line, however the line does not get = highlighted.=20 >=20 > Konrad From debbugs-submit-bounces@debbugs.gnu.org Sat Oct 02 18:03:14 2010 Received: (at control) by debbugs.gnu.org; 2 Oct 2010 22:03:14 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1P2AAk-0005Kr-3r for submit@debbugs.gnu.org; Sat, 02 Oct 2010 18:03:14 -0400 Received: from fencepost.gnu.org ([140.186.70.10]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1P2AAi-0005Km-Ox for control@debbugs.gnu.org; Sat, 02 Oct 2010 18:03:13 -0400 Received: from rgm by fencepost.gnu.org with local (Exim 4.69) (envelope-from ) id 1P2ADe-0003cg-Ld; Sat, 02 Oct 2010 18:06:14 -0400 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <19623.44246.574016.968555@fencepost.gnu.org> Date: Sat, 2 Oct 2010 18:06:14 -0400 From: Glenn Morris To: control Subject: control X-Attribution: GM X-Mailer: VM (www.wonderworks.com/vm), GNU Emacs (www.gnu.org/software/emacs) X-Hue: red X-Ran: XTEOY2y3^JQUXXgJZnWgPI:k8)I9O,YYU5g>tbD)fDo2OWr=YTMZZSlYmc[|25fM$btt[N X-Debbugs-No-Ack: yes X-Spam-Score: -5.2 (-----) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -5.2 (-----) close 6910 24.1