From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Dmitry Gutov Newsgroups: gmane.emacs.bugs Subject: bug#33567: Syntactic fontification of diff hunks Date: Mon, 3 Dec 2018 13:24:40 +0200 Message-ID: <67cd7856-d52c-0e00-cc9c-25b833874b15@yandex.ru> References: <878t18j4is.fsf@mail.linkov.net> <83a7lobemr.fsf@gnu.org> <87a7lnv6ex.fsf@mail.linkov.net> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: blaine.gmane.org 1543836191 16754 195.159.176.226 (3 Dec 2018 11:23:11 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 3 Dec 2018 11:23:11 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:64.0) Gecko/20100101 Thunderbird/64.0 Cc: 33567@debbugs.gnu.org To: Juri Linkov , Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Dec 03 12:23:07 2018 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gTmJe-0004BG-Jd for geb-bug-gnu-emacs@m.gmane.org; Mon, 03 Dec 2018 12:23:06 +0100 Original-Received: from localhost ([::1]:48036 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gTmLk-0006i8-Qw for geb-bug-gnu-emacs@m.gmane.org; Mon, 03 Dec 2018 06:25:16 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:56746) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gTmLb-0006h1-IX for bug-gnu-emacs@gnu.org; Mon, 03 Dec 2018 06:25:08 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gTmLY-00088A-7R for bug-gnu-emacs@gnu.org; Mon, 03 Dec 2018 06:25:07 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:54455) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gTmLX-00087s-Qw for bug-gnu-emacs@gnu.org; Mon, 03 Dec 2018 06:25:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gTmLW-0005JH-LJ for bug-gnu-emacs@gnu.org; Mon, 03 Dec 2018 06:25:03 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Dmitry Gutov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 03 Dec 2018 11:25:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 33567 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 33567-submit@debbugs.gnu.org id=B33567.154383629320388 (code B ref 33567); Mon, 03 Dec 2018 11:25:02 +0000 Original-Received: (at 33567) by debbugs.gnu.org; 3 Dec 2018 11:24:53 +0000 Original-Received: from localhost ([127.0.0.1]:58713 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gTmLN-0005Im-8W for submit@debbugs.gnu.org; Mon, 03 Dec 2018 06:24:53 -0500 Original-Received: from mail-wr1-f46.google.com ([209.85.221.46]:33109) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gTmLK-0005IU-US for 33567@debbugs.gnu.org; Mon, 03 Dec 2018 06:24:51 -0500 Original-Received: by mail-wr1-f46.google.com with SMTP id c14so11751841wrr.0 for <33567@debbugs.gnu.org>; Mon, 03 Dec 2018 03:24:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=EwLiECKhjwtPM9XtdcT4mWqPwH7r3bVWLuW5w0x/Qc4=; b=iozzvjzycAWvP8DVP/uy6/5SZchH+fvuuESvrigEVI07zfOKbI2NroCVX3GEl/CPg2 jyyhvssSZt5QaSsNsJmPE5LKlPS/pAKURNDCfxybSxE7Xx0tmNQtd9N6Kolt19MHFOhq e+0c6xtA2aRtp0DwI6UPrJalyLvTp8w2s15EqT4MVQ6cgzSW2fr9xt6GlihYG3I5ImAH GdHoBbVKjWCZRyutcOn9h0kpsEzkDLzCw0IEmNLuOPIHUVpJzjcWnfKhNUf0GwrcACv/ i2x7Ww4Owd2KByuSFmnCejLFWA/+HLJTf3tssz9KQjjeoiRxXg7Nu+qYT1G6icHGGB4u 7dIA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=EwLiECKhjwtPM9XtdcT4mWqPwH7r3bVWLuW5w0x/Qc4=; b=d5KLr85j/lZU2vV6ExS0G6cuAdwKME6KbzltG1PskPEmtFDx2otF1XJwSp2sLLgTis 6VE9gi9QdbI/cOQoVY3wF8GuGx3CQsTXhh43INWdExF4MfU45SvrprtV10JpBPLWfiZk Sf0iLq2E8QHLlXCxEUsQJUxS+8/+KY+Dj38kTM9ZeRuEVq3DXzUDdgVygFTsUO2mmnzr HnpGfxSdBIMWNxXawhbopaF9z57jTRwOpQ2e94qBSzGhW3zq8piBGyOd/1cb98TAhLo6 nmq6XMdh+mb/e6fS0m4sBGPaRVyulmJnqCAkpgbXbevAJB+EhyW2WOsgDYK9C+GCd8Ec oRtg== X-Gm-Message-State: AA+aEWbwEGw80A6MrvL+HcMChBILC8wcYoRkR2Tspu2evO0NceX8548U zxnraiylB+KJ9l9tOa8KlU1qrY0r X-Google-Smtp-Source: AFSGD/U1t/D8poRh3Vyss4/zECb+ceQp7WxJgfTrX2Y19AOxUnBPNIB97Uf2Ajb42TqQM0yxeSSUvw== X-Received: by 2002:a5d:6549:: with SMTP id z9mr13148876wrv.116.1543836284826; Mon, 03 Dec 2018 03:24:44 -0800 (PST) Original-Received: from [192.168.1.3] ([185.105.174.23]) by smtp.googlemail.com with ESMTPSA id 125-v6sm8824495wmr.22.2018.12.03.03.24.42 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 03 Dec 2018 03:24:43 -0800 (PST) In-Reply-To: <87a7lnv6ex.fsf@mail.linkov.net> Content-Language: en-US X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.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" Xref: news.gmane.org gmane.emacs.bugs:153021 Archived-At: On 03.12.2018 2:34, Juri Linkov wrote: > Fixing the described problem will remove this comment, > but I have no idea how better to do this. The problem is that > we need to provide own created buffer to the call to `vc-find-revision'. > Currently it has the following function signature: > > (defun vc-find-revision (file revision &optional backend) > > But VC API in the comments in the beginning of vc.el > is documented with a different function signature: > > ;; * find-revision (file rev buffer) > ;; > ;; Fetch revision REV of file FILE and put it into BUFFER. > ;; If REV is the empty string, fetch the head of the trunk. > ;; The implementation should pass the value of vc-checkout-switches > ;; to the backend command. That is the VC backend API, not the signatures of public functions in vc.el (which would be kinda pointless). vc-git-find-revision and friends do indeed have this signature. Take a look at the uses of vc-call-backend in vc-find-revision[-no]-save. Maybe you need to write a new ???-find-revision function that does what you need.