From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Tom Gillespie Newsgroups: gmane.emacs.devel Subject: Re: [PATCH] Fix hack-local-variables for find-file-literally with dos encoding Date: Sun, 15 Aug 2021 15:31:40 -0700 Message-ID: References: <87o89ygyu8.fsf@gnus.org> <87fsvagxt8.fsf@gnus.org> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="18529"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Emacs developers To: Lars Ingebrigtsen Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Aug 16 00:32:40 2021 Return-path: Envelope-to: ged-emacs-devel@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 1mFOgJ-0004hR-9A for ged-emacs-devel@m.gmane-mx.org; Mon, 16 Aug 2021 00:32:39 +0200 Original-Received: from localhost ([::1]:40828 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mFOgI-0002js-Bw for ged-emacs-devel@m.gmane-mx.org; Sun, 15 Aug 2021 18:32:38 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:60576) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mFOfa-00024J-HF for emacs-devel@gnu.org; Sun, 15 Aug 2021 18:31:54 -0400 Original-Received: from mail-wr1-x434.google.com ([2a00:1450:4864:20::434]:41751) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mFOfZ-0002Ch-4a for emacs-devel@gnu.org; Sun, 15 Aug 2021 18:31:54 -0400 Original-Received: by mail-wr1-x434.google.com with SMTP id x10so14718786wrt.8 for ; Sun, 15 Aug 2021 15:31:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=ynAydKC1Z9Jg0tXL2zwTGShwA2AwoP5XsI3ljeMCAfM=; b=mYgE5UeTDtbwNHyeg95TxqIeFOBv58G454+PYPmtAeyp7ySl8/DHgFN/mX97A1PEG6 hKcsXWrnK5aVYR+FKTiRzrlQHECh1mIbvY5qTY9LN941NZoKaF67rAZzslEr7MWrgAvR oDjkcVtPyO3kWbNb0dz0EybToADUQMndIKpcU9Wv5cxPSkolIecbBHUVF4rZQc8uvCDV c6ev8BPNlaV1XTZWr/VfxgR6ppqjyzMIYohqp9MijD6wxHT1QSxfErOWMicP1mkZxQ84 dXrze7vbqCzlpEMBioREY+cWvDuQOTTHtyusTpn4y7ZqWIrMHIaIC2xbZlZxU5N4GEgT Ipag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=ynAydKC1Z9Jg0tXL2zwTGShwA2AwoP5XsI3ljeMCAfM=; b=lAta6RnJFpJVSOELXvopD+el2zNlI7OfdLgiT/XtTI9/0fHIEb8R47f9YOn7tueOk8 SBtF8DL0EvTmVuMWUqn012GzJHBPwUnyFOPfOiYZOobBd6jI84gd1hj/pM1gK76oYk5u nEpLIQeSZn9HbM1vQi5QapRDoGyKKNWCPlP2mIxv62em5iK90Mv/3wEMuZIX3bQZH3Ns HGhs8Innfw8ChvKUOKTxygdNoWNJ0bUyLxf0p/KQ+7SUmQN0wkt7+1FFdRbaHDj5bhRN 9+VEf2TNeEC56BK+dzM+Oa7qWsBTID0riLfYsd8FuVKrMP3rVzpnOP8oZE5CIV7WycVV nr9g== X-Gm-Message-State: AOAM5303jCfKcNvY3ywj1xzr5xXamChsTef+JQBb/FerzFYp06NlQjfZ GpPHgfG7ImAg4aHeh+MCpu3QICKGm2zdpQTjoDc= X-Google-Smtp-Source: ABdhPJzlLNjkJGj5Bn6SUHD+1f0rdTmGGNsXNIY5JNtS0cER0Ro9xgMLPgbL3Pr7EYHcxujPWokF5fO7HdgTmM2PXKU= X-Received: by 2002:a5d:6108:: with SMTP id v8mr3566222wrt.96.1629066711101; Sun, 15 Aug 2021 15:31:51 -0700 (PDT) In-Reply-To: <87fsvagxt8.fsf@gnus.org> Received-SPF: pass client-ip=2a00:1450:4864:20::434; envelope-from=tgbugs@gmail.com; helo=mail-wr1-x434.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:272416 Archived-At: > Looking at the existing code here, I think that `subst-char-in-region' > is wrong in any case, but following the history of that function is > pretty difficult. It might have originated here? I was equally confused, so I left it alone. > If the intention is to fix up DOS line endings, when it's the wrong > thing -- it should transform \r\n to \n, not transform any \r anywhere > in a line to \n... I agree, what is strange to me is that as far as I can tell it should be causing a bug by introducing blank lines in the temporary buffer but somehow is not? I think the reason it is not might be because subst-char-in-region doesn't actually do anything if the buffer has dos encoding. I think we might be able to remove the line entirely?