GNU bug report logs - #68692
29.1; File-local variable storage for strings with newlines

Previous Next

Package: emacs;

Reported by: Karthik Chikmagalur <karthikchikmagalur <at> gmail.com>

Date: Wed, 24 Jan 2024 17:23:01 UTC

Severity: normal

Found in version 29.1

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Karthik Chikmagalur <karthikchikmagalur <at> gmail.com>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 68692-done <at> debbugs.gnu.org
Subject: bug#68692: 29.1; File-local variable storage for strings with newlines
Date: Fri, 26 Jan 2024 11:49:51 -0800
>> 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




This bug report was last modified 1 year and 173 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.