unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Christopher Schmidt <christopher@ch.ristopher.com>
To: 11156@debbugs.gnu.org
Subject: bug#11156: 24.2.50; require-final-newline and read-only files (was: bug#11156: 24.0.95; require-final-newline and read-only files)
Date: Sun,  2 Sep 2012 19:55:34 +0100 (BST)	[thread overview]
Message-ID: <87ligsw8yy.fsf_-_@earth.home> (raw)
In-Reply-To: <87k41d4kvj.fsf@gnu.org> (Chong Yidong's message of "Wed, 18 Apr 2012 14:25:20 +0800")

reopen 11156

Chong Yidong <cyd@gnu.org> writes:
> Christopher Schmidt <christopher@ch.ristopher.com> writes:
>
>>> `after-find-file' shouldn't try adding a newline if
>>> `buffer-read-only' is non-nil.  And the values 'visit and
>>> 'visit-save should be documented in the Elisp manual.
>>
>> === modified file 'doc/lispref/ChangeLog'
>> ...
>
> Thanks, committed to the repository.

There is still a minor bug in regard to require-final-newline.

Recipe:
emacs -q
M-: (setq require-final-newline 'visit)
Open an image file via C-x C-f

There is a new buffer but no window displays it.  The *Messages*-buffer
contains "find-file-noselect-1: Text is read-only".

This is because image-mode sets the read-only property of the whole
buffer string to t.  buffer-read-only is nil in this case, though.

I think all code fragments that try to add new lines due to
require-final-newline should ignore text-read-only errors.

        Christopher





  parent reply	other threads:[~2012-09-02 18:55 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-02 21:52 bug#11156: 24.0.95; require-final-newline and read-only files Christopher Schmidt
2012-04-14 13:49 ` Christopher Schmidt
2012-04-14 18:56   ` martin rudalics
2012-04-15 13:48     ` Christopher Schmidt
2012-04-18  6:25       ` Chong Yidong
2012-05-01 17:02         ` Christopher Schmidt
2012-05-06  5:01           ` Chong Yidong
2012-09-02 18:55         ` Christopher Schmidt [this message]
2012-09-07 10:53           ` bug#11156: 24.2.50; " Chong Yidong

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=87ligsw8yy.fsf_-_@earth.home \
    --to=christopher@ch.ristopher.com \
    --cc=11156@debbugs.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).