GNU bug report logs - #23820
25.1.50; Fix caller to ediff-setup

Previous Next

Package: emacs;

Reported by: Tino Calancha <f92capac <at> gmail.com>

Date: Wed, 22 Jun 2016 04:16:01 UTC

Severity: normal

Tags: patch

Found in version 25.1.50

Done: Tino Calancha <tino.calancha <at> gmail.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 23820 in the body.
You can then email your comments to 23820 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#23820; Package emacs. (Wed, 22 Jun 2016 04:16:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Tino Calancha <f92capac <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Wed, 22 Jun 2016 04:16:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Tino Calancha <f92capac <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Cc: f92capac <at> gmail.com
Subject: 25.1.50; Fix caller to ediff-setup
Date: Wed, 22 Jun 2016 13:15:09 +0900 (JST)
Hello,

Seventh argument of ediff-setup is a hook: hilit-chg-get-diff-info
is passing a function.

emacs -Q -eval '(progn (with-temp-file "/tmp/foo" (insert "foo")) 
(switch-to-buffer "bar") (insert "bar"))'
M-: (highlight-compare-with-file "/tmp/foo")
;; error: (wrong-type-argument sequencep hilit-chg-get-diff-list-hk)

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
From d80c1fba56cecd245b90be8f3bddd159e1a9cbdd Mon Sep 17 00:00:00 2001
From: Tino Calancha <f92capac <at> gmail.com>
Date: Wed, 22 Jun 2016 13:04:03 +0900
Subject: [PATCH] Fix caller to ediff-setup

* lisp/hilit-chg.el (hilit-chg-get-diff-info-hook): New variable.
(hilit-chg-get-diff-info): Use it. (#Bug23820).
---
 lisp/hilit-chg.el | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/lisp/hilit-chg.el b/lisp/hilit-chg.el
index 8f042b6..1573b2e 100644
--- a/lisp/hilit-chg.el
+++ b/lisp/hilit-chg.el
@@ -313,6 +313,9 @@ highlight-changes-global-changes-existing-buffers
   :type 'boolean
   :group 'highlight-changes)

+(defvar hilit-chg-get-diff-info-hook nil
+  "Hook argument to `ediff-setup' in `hilit-chg-get-diff-info'.")
+
 ;; These are for internal use.

 (defvar hilit-chg-list nil)
@@ -913,7 +916,7 @@ hilit-chg-get-diff-info
   (let (hilit-e hilit-x hilit-y)
     (ediff-setup buf-a file-a buf-b file-b
 	       nil nil   ; buf-c file-C
-	       'hilit-chg-get-diff-list-hk
+	       hilit-chg-get-diff-info-hook
 	       (list (cons 'ediff-job-name 'something))
 	       )
     (ediff-with-current-buffer hilit-e (ediff-really-quit nil))
@@ -965,6 +968,8 @@ hilit-chg-get-diff-list-hk
     ;; No point in returning a value, since this is a hook function.
     ))

+(add-hook 'hilit-chg-get-diff-info-hook #'hilit-chg-get-diff-list-hk)
+
 ;; ======================= global-highlight-changes-mode ==============

 ;;;###autoload
-- 
2.8.1


In GNU Emacs 25.1.50.2 (x86_64-pc-linux-gnu, GTK+ Version 3.20.6)
Repository revision: 1c0199050bfa594287f3975aca56fc2a57ba0f66





Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#23820; Package emacs. (Wed, 22 Jun 2016 04:34:01 GMT) Full text and rfc822 format available.

Message #8 received at 23820 <at> debbugs.gnu.org (full text, mbox):

From: Noam Postavsky <npostavs <at> users.sourceforge.net>
To: Tino Calancha <f92capac <at> gmail.com>
Cc: 23820 <at> debbugs.gnu.org
Subject: Re: bug#23820: 25.1.50; Fix caller to ediff-setup
Date: Wed, 22 Jun 2016 00:33:20 -0400
On Wed, Jun 22, 2016 at 12:15 AM, Tino Calancha <f92capac <at> gmail.com> wrote:
>
> Hello,
>
> Seventh argument of ediff-setup is a hook: hilit-chg-get-diff-info
> is passing a function.

I think that argument is not a hook but just a list of functions, so
it should suffice to do

@@ -913,7 +916,7 @@ hilit-chg-get-diff-info
   (let (hilit-e hilit-x hilit-y)
     (ediff-setup buf-a file-a buf-b file-b
               nil nil   ; buf-c file-C
-              'hilit-chg-get-diff-list-hk
+              '(hilit-chg-get-diff-info-hk)
               (list (cons 'ediff-job-name 'something))
               )
     (ediff-with-current-buffer hilit-e (ediff-really-quit nil))




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#23820; Package emacs. (Wed, 22 Jun 2016 04:48:02 GMT) Full text and rfc822 format available.

Message #11 received at 23820 <at> debbugs.gnu.org (full text, mbox):

From: Tino Calancha <f92capac <at> gmail.com>
To: Noam Postavsky <npostavs <at> users.sourceforge.net>
Cc: Tino Calancha <f92capac <at> gmail.com>, 23820 <at> debbugs.gnu.org
Subject: Re: bug#23820: 25.1.50; Fix caller to ediff-setup
Date: Wed, 22 Jun 2016 13:47:07 +0900 (JST)
> I think that argument is not a hook but just a list of functions, so
> it should suffice to do
>
> @@ -913,7 +916,7 @@ hilit-chg-get-diff-info
>   (let (hilit-e hilit-x hilit-y)
>     (ediff-setup buf-a file-a buf-b file-b
>               nil nil   ; buf-c file-C
> -              'hilit-chg-get-diff-list-hk
> +              '(hilit-chg-get-diff-info-hk)
>               (list (cons 'ediff-job-name 'something))
>               )
>     (ediff-with-current-buffer hilit-e (ediff-really-quit nil))

Yeah, i tried that first but i thought it could be useful for 
documentation adding the new var.
But if
hilit-chg-get-diff-info-hk
it is a list of functions then let's go with the
'(hilit-chg-get-diff-info-hk)
solution.

emacs25 branch wasn't affected because ediff-setup calls run-hooks
(in master branch use 'mapc).




Reply sent to Tino Calancha <tino.calancha <at> gmail.com>:
You have taken responsibility. (Fri, 24 Jun 2016 15:34:01 GMT) Full text and rfc822 format available.

Notification sent to Tino Calancha <f92capac <at> gmail.com>:
bug acknowledged by developer. (Fri, 24 Jun 2016 15:34:01 GMT) Full text and rfc822 format available.

Message #16 received at 23820-done <at> debbugs.gnu.org (full text, mbox):

From: Tino Calancha <tino.calancha <at> gmail.com>
To: 23820-done <at> debbugs.gnu.org
Date: Sat, 25 Jun 2016 00:33:38 +0900 (JST)
Fixed passing a list as the seventh arg of ediff-setup




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 23 Jul 2016 11:24:03 GMT) Full text and rfc822 format available.

This bug report was last modified 8 years and 334 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.