unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Karthik Chikmagalur <karthikchikmagalur@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 68692-done@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	[thread overview]
Message-ID: <87y1cbj2n4.fsf@gmail.com> (raw)
In-Reply-To: <86a5osbjxl.fsf@gnu.org>

>> 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





  reply	other threads:[~2024-01-26 19:49 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-24 17:21 bug#68692: 29.1; File-local variable storage for strings with newlines Karthik Chikmagalur
2024-01-24 17:31 ` Eli Zaretskii
     [not found]   ` <877cjw3hwc.fsf@gmail.com>
2024-01-26  8:03     ` Eli Zaretskii
2024-01-26 19:49       ` Karthik Chikmagalur [this message]
2024-01-26 20:16         ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87y1cbj2n4.fsf@gmail.com \
    --to=karthikchikmagalur@gmail.com \
    --cc=68692-done@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).