From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Karthik Chikmagalur Newsgroups: gmane.emacs.bugs Subject: bug#68692: 29.1; File-local variable storage for strings with newlines Date: Fri, 26 Jan 2024 11:49:51 -0800 Message-ID: <87y1cbj2n4.fsf@gmail.com> References: <87il3ir6j8.fsf@gmail.com> <86y1ced4dx.fsf@gnu.org> <877cjw3hwc.fsf@gmail.com> <86a5osbjxl.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="9491"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 68692-done@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Jan 26 20:51:26 2024 Return-path: Envelope-to: geb-bug-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 1rTSEW-0002IO-W3 for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 26 Jan 2024 20:51:25 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rTSE5-0008B4-2H; Fri, 26 Jan 2024 14:50:57 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rTSE3-0008AV-IG for bug-gnu-emacs@gnu.org; Fri, 26 Jan 2024 14:50:55 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rTSE3-0006GD-BN for bug-gnu-emacs@gnu.org; Fri, 26 Jan 2024 14:50:55 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rTSE9-0000NG-MY for bug-gnu-emacs@gnu.org; Fri, 26 Jan 2024 14:51:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Karthik Chikmagalur Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 26 Jan 2024 19:51:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 68692 X-GNU-PR-Package: emacs Original-Received: via spool by 68692-done@debbugs.gnu.org id=D68692.17062986061374 (code D ref 68692); Fri, 26 Jan 2024 19:51:01 +0000 Original-Received: (at 68692-done) by debbugs.gnu.org; 26 Jan 2024 19:50:06 +0000 Original-Received: from localhost ([127.0.0.1]:52786 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rTSDG-0000M6-2r for submit@debbugs.gnu.org; Fri, 26 Jan 2024 14:50:06 -0500 Original-Received: from mail-pl1-x635.google.com ([2607:f8b0:4864:20::635]:45235) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rTSDF-0000LU-2a for 68692-done@debbugs.gnu.org; Fri, 26 Jan 2024 14:50:05 -0500 Original-Received: by mail-pl1-x635.google.com with SMTP id d9443c01a7336-1d76943baafso7085115ad.2 for <68692-done@debbugs.gnu.org>; Fri, 26 Jan 2024 11:49:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1706298592; x=1706903392; darn=debbugs.gnu.org; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:from:to:cc:subject:date:message-id:reply-to; bh=ivDSw51HXhZxQ7ZBiShCVqUa5mJTuTChexl8XZbcgpE=; b=LScKmrkKgbo5LMpIjoPNTvGOmMdZyD7WGYA390YHuGpUerqv7hG1HsWn8tyeLwEugX 8n+r0It1ZlZeAZscfX7IMGbq8xdNifv4eXS+5MeO2IHynKfiy9gY+ALISUQdrUktilm5 Bk1kX+Ynsd9TolWjA1W8HVq4/rh6exRD8xepHJza159lYV/RymFmahe72wvdAtqcERou RSAirMk+QZgQ425fE+gWZYpFAKM7IjT7x3agseOyH7qvXIhaLwo4Nuxadtz5w31Jej/R xpOtGvNwWDugzjf149HWkF01BbBnC/WrvAXQ5fll7KcPrQfDTUg6osH4UQj/TguzCI1W ONUQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706298592; x=1706903392; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=ivDSw51HXhZxQ7ZBiShCVqUa5mJTuTChexl8XZbcgpE=; b=R5QtTpDA8mqpMVXePIBbhKrQ19Fs1AncMMpVxRDzuJfB9s3gMHMnD+m+n+s2rLMOrq wJG4aXaN19jLvoe0nS9VLLwkTTw8myXoE9pwFmBrD0AUr8sngK+2GWwNdgAVMW4y+atL GdQqZE/ZhUvdo74UPRDKtErgymn1M6jpAPaJHzWBcwwlpbQlONKIgJyL19+dWsWdhqeV hWxlc80cG3t+4L0fMFwsFzc8COvzcCZJYDckiqcjH9ouszhdo37MHjR45zUrgchFsIFy T1CGCIf/0bisnuTgVQcSWhnaKIrTUCYVADjgbGv6aSjw+r1nD3UMXuq+zjUdx7aATys7 tyWQ== X-Gm-Message-State: AOJu0YzLai8nV24R+RgXXhe8kukMOBDBZ1UJnb2j8Wx5CjnAenXh4+c1 xqNWeBPtnKcF0qUSslYpsuVRLABXLAH8Tkw1YAk3kp3hGnCBYD9v X-Google-Smtp-Source: AGHT+IHygZBS8d+i/EgCAHWxli23phgY4tG5N0vzSKlMTzUDsOB1SKirqdeftIWc/9jOhP8WAXqasg== X-Received: by 2002:a17:902:f693:b0:1d7:4670:ffb0 with SMTP id l19-20020a170902f69300b001d74670ffb0mr327336plg.9.1706298592429; Fri, 26 Jan 2024 11:49:52 -0800 (PST) Original-Received: from localhost (169-231-128-39.wireless.ucsb.edu. [169.231.128.39]) by smtp.gmail.com with ESMTPSA id s2-20020a170902ea0200b001d748fb211csm1292965plg.276.2024.01.26.11.49.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Jan 2024 11:49:51 -0800 (PST) In-Reply-To: <86a5osbjxl.fsf@gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:278945 Archived-At: >> Is there a programmatic way (using elisp) to insert a local variable >> value that is a string that extends over multiple lines, as in my >> original example? I can write a helper function to replace newlines >> with backslash-newlines, but determining the right suffix to add at the >> end of each line is tricky. > > We have add-file-local-variable and modify-file-local-variable -- did > you try any of them? If they don't handle this case, we need to fix > them so they do. Yes, I tried both, and they don't handle this case correctly. (My original bug report used add-file-local-variable in the reproduction instructions.) Should this be filed as a bug, or should I email emacs-devel about this? I don't know how to solve it beyond let-binding print-escape-newlines to t in modify-file-local-variable -- I don't know if this can cause other problems. Karthik