From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: ST Newsgroups: gmane.emacs.help Subject: Re: Ediff: compare two (long) buffers Word-by-word Date: Sun, 25 Nov 2018 15:48:32 +0200 Message-ID: <1543153712.1859.6.camel@gmail.com> References: <1543088011.1851.5.camel@gmail.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit X-Trace: blaine.gmane.org 1543153624 23516 195.159.176.226 (25 Nov 2018 13:47:04 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 25 Nov 2018 13:47:04 +0000 (UTC) Cc: help-gnu-emacs To: Yuri Khan Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Nov 25 14:47:00 2018 Return-path: Envelope-to: geh-help-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 1gQukV-0005y8-Vb for geh-help-gnu-emacs@m.gmane.org; Sun, 25 Nov 2018 14:47:00 +0100 Original-Received: from localhost ([::1]:59972 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gQumc-0004os-5D for geh-help-gnu-emacs@m.gmane.org; Sun, 25 Nov 2018 08:49:10 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:55168) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gQum8-0004oc-7O for help-gnu-emacs@gnu.org; Sun, 25 Nov 2018 08:48:41 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gQum5-0005PW-32 for help-gnu-emacs@gnu.org; Sun, 25 Nov 2018 08:48:40 -0500 Original-Received: from mail-wm1-x32a.google.com ([2a00:1450:4864:20::32a]:52725) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gQum4-0005P9-Sx for help-gnu-emacs@gnu.org; Sun, 25 Nov 2018 08:48:37 -0500 Original-Received: by mail-wm1-x32a.google.com with SMTP id r11-v6so15581902wmb.2 for ; Sun, 25 Nov 2018 05:48:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=message-id:subject:from:to:cc:date:in-reply-to:references :mime-version:content-transfer-encoding; bh=h8ph5dQG/ENChOUzZKfWroyStaaIon5YLSS1QnRugcs=; b=C7dUdjuJaHlkW8FLR0SFH5eI7PHmHesFv5Htp+zdp8esX4Xt6JX6LnG08mTnLmVsf6 ZmgvipRDlBkbiKan+67uNTD2aAr4YF/NBxx5qFU3Unl54MQjiad4nxrLMiOiu9HaSRDx BEE5zIEIttFqBAfmVO6OLnxp16QKAVut4dYaNCPNLQTNjs9ngUhtOJ+vChUAZgixJ8xL 0AZn74NzyQ0tWRuWfmzv2vcluJZWvFivfZvV/GVdZL/5zLxGfuR4P5tJprRbaIo7PCR8 FXHeSV8mcbnznVmvdfTMV0RPB5Kl5w2VcOsBb9e0lK/o1L9yvmnHeqSH22exQAzhfTpy o47g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:subject:from:to:cc:date:in-reply-to :references:mime-version:content-transfer-encoding; bh=h8ph5dQG/ENChOUzZKfWroyStaaIon5YLSS1QnRugcs=; b=oBjU3xJ9D+ARvE5Huc7A1cfgMNebjesypNfJlw4YqfHVAaXQYvnm8clOtUezm8CAv6 /mX4XSz5WFU6YE6RDqvbk8lxbJHaJ6ZWEi1A3qvcaYZvgF0p/nmTI2Hatq4bDj+RvVRr HWeDZnqvI9JQhPLzsH/Lc6PF4WutF97VyUFl+tb2ILqLoh+AMeYacBrWdw7b/FOiBP8w RHIgQAKouwfR954ir2DqfIWgUJCa1N2MNFKGH9kpaSRJOGFcQOr/anL1wZxcsM298stD QOuSjlLoPHyvPa37DFS/pidRLoQbkUgWMGOq01r3m2OJ7Gv8E3QrSLMSz9bxxloVRtOL LP3w== X-Gm-Message-State: AA+aEWa+5THb295t9Q/MUss+9aTI52BQnBqx6gr/DW3qUCuX8Clf9ypQ B9ityrAU6dtO98S4rPrQh+4= X-Google-Smtp-Source: AFSGD/VgE9zLJjHzNGjzS70+7sEKWTb+MiHCk+GLkvE5iOYNrIGCzwrwVWXgwBY36y+Gnhmoatjijg== X-Received: by 2002:a1c:ed18:: with SMTP id l24mr19266817wmh.12.1543153715814; Sun, 25 Nov 2018 05:48:35 -0800 (PST) Original-Received: from debox ([37.26.147.164]) by smtp.gmail.com with ESMTPSA id e17sm15979791wrs.79.2018.11.25.05.48.34 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 25 Nov 2018 05:48:35 -0800 (PST) In-Reply-To: X-Mailer: Evolution 3.12.9-1+b1 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::32a X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:118750 Archived-At: On Sun, 2018-11-25 at 16:17 +0700, Yuri Khan wrote: > On Sun, Nov 25, 2018 at 4:02 AM ST wrote: > > > I use Emacs 26.1 and try to compare two (long) buffers (opened side by > > side) by clicking Tools -> Compare (Ediff) -> Windows Word-by-word... > > Then I choose both Windows (A and B) by clicking on each opened buffer. > > However it looks like Emacs compares only the visible parts of the two > > buffers, not the whole buffers. Why? > > > > I saw there is a command `ediff-windows-wordwise`... How is "Window" > > defined? - as "currently visible part of a buffer"? If yes, is there > > something like `ediff-buffers-wordwise`? > > ‘ediff-windows-wordwise’ calls ‘ediff-windows’ which calls > ‘ediff-regions-internal’, passing to it the two chosen windows and > their respective visible parts. ‘ediff-windows-linewise’ behaves the > same way. > > This is not documented in their docstrings nor in Info. Moreover, > (info "(ediff) Major Entry Points") contains the following wording: > > > The commands ‘ediff-windows-wordwise’ > > and ‘ediff-regions-wordwise’ are intended for relatively small segments > > of buffers (e.g., up to 100 lines, depending on the speed of your > > machine) > > which suggests that ‘ediff-windows-*’ should work for 100-line > fragments, and that will only fit in a visible part of a window with a > very small font. > > There is no command ‘ediff-buffers-wordwise’; maybe this is because of > performance concerns. You can compare buffers using > ‘ediff-regions-wordwise’; after you specify two buffers, it will ask > you to select a region and press C-M-c to proceed, in each buffer. Somebody has provided a solution which seems to work very good without any performance issues. There is a small error message, though... https://emacs.stackexchange.com/questions/46161/ediff-compare-two-long-buffers-word-by-word I assume the performance concerns where relevant 15-20 years ago (presumably the time when those lines of the docs were written). If it is easier, then comparing two files word-by-word, would also be a nice feature: https://emacs.stackexchange.com/questions/46206/ediff-compare-two-files-word-by-word If this mailing list is the proper place to ask for enhancements: could those two functions(/menu options) be added to Emacs, please? Thank you!