From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Eric Abrahamsen Newsgroups: gmane.emacs.help Subject: Re: Emacs as a translator's tool Date: Sat, 30 May 2020 09:46:10 -0700 Message-ID: <87y2p9nzfx.fsf@ericabrahamsen.net> References: <871rn35lqc.fsf@mbork.pl> <87zh9r45ad.fsf@mbork.pl> <87h7vz2m5g.fsf@ebih.ebihd> <87zh9qr67n.fsf@ericabrahamsen.net> <3DBA2692-28A0-4AC3-B884-78763A9C7B16@traduction-libre.org> <87tuzyr474.fsf@ericabrahamsen.net> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="62547"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: help-gnu-emacs , Emanuel Berg , Yuri Khan To: Jean-Christophe Helary Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Sat May 30 18:47:44 2020 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jf4e8-000GAl-Jo for geh-help-gnu-emacs@m.gmane-mx.org; Sat, 30 May 2020 18:47:44 +0200 Original-Received: from localhost ([::1]:42376 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jf4e7-0004TN-LZ for geh-help-gnu-emacs@m.gmane-mx.org; Sat, 30 May 2020 12:47:43 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:50484) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jf4ci-0004E5-K5 for help-gnu-emacs@gnu.org; Sat, 30 May 2020 12:46:16 -0400 Original-Received: from ericabrahamsen.net ([52.70.2.18]:34070 helo=mail.ericabrahamsen.net) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jf4ch-000758-18 for help-gnu-emacs@gnu.org; Sat, 30 May 2020 12:46:16 -0400 Original-Received: from localhost (c-73-254-86-141.hsd1.wa.comcast.net [73.254.86.141]) (Authenticated sender: eric@ericabrahamsen.net) by mail.ericabrahamsen.net (Postfix) with ESMTPSA id 6D139FA0E2; Sat, 30 May 2020 16:46:12 +0000 (UTC) In-Reply-To: (Jean-Christophe Helary's message of "Sat, 30 May 2020 12:20:14 +0900") Received-SPF: pass client-ip=52.70.2.18; envelope-from=eric@ericabrahamsen.net; helo=mail.ericabrahamsen.net X-detected-operating-system: by eggs.gnu.org: First seen = 2020/05/30 12:46:14 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -41 X-Spam_score: -4.2 X-Spam_bar: ---- X-Spam_report: (-4.2 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.23 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-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:123192 Archived-At: Jean-Christophe Helary writes: >> On May 30, 2020, at 3:22, Eric Abrahamsen wrote: >> >>>> I >>>> imagined this would happen when the mode was turned on: it would run >>>> down the file and insert markers that would be used to find >>>> correspondences. Special characters could be inserted into the file >>>> to indicate that two paragraphs should be joined, or one paragraph >>>> split. >>> >>> What would be the use of such a marking ? [...] >> I want to be able to go to the >> bottom of the translation, run a command, and have the second window >> display the corresponding original. If I realize I've done something >> wrong a couple of chapters previously, and I skip back up to that >> location in the translation, I want to run the same command to display >> the corresponding spot in the original. > > I seem to remember a long discussion about bookmarks here or on devel > a while ago. Did you consider that ? The only part of this code I ever actually wrote used bookmarks to save where I was at the end of the work day. But usually you just save one bookmark per file, indicating "where you are" in the file. That's a different concern than splitting the two texts into segments, and recording correspondences between segments in the texts. If you segmented a whole novel by sentences, and then saved a bookmark per sentence, I'm sure it would cause something to catch on fire. At first I thought I'd run through the text when the mode was turned on, insert a whole bunch of markers, then keep a list of marker-pairs. That seemed like it would be hard to keep properly in sync, though, so now I'm thinking of running through the text and actually inserting separator characters, perhaps #x1f, either making them invisible or putting some other nice display on them. That makes it easier to sync, and has the advantage that it persists to disk and you only have to do the major parsing once. Then strip them out during export. Anyway, still experimenting...