emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: "Kévin Le Gouguec" <kevin.legouguec@gmail.com>
To: emacs-orgmode@gnu.org
Subject: Re: [bug] error on RET in read-only buffer with org-return-follows-link set to t
Date: Thu, 14 May 2020 23:57:31 +0200	[thread overview]
Message-ID: <87lfluuqlw.fsf@gmail.com> (raw)
In-Reply-To: <87eerm6wae.fsf@nicolasgoaziou.fr> (Nicolas Goaziou's message of "Thu, 14 May 2020 23:28:41 +0200")

Nicolas Goaziou <mail@nicolasgoaziou.fr> writes:

> Hello,
>
> Gregor Zattler <telegraph@gmx.net> writes:
>
>> with `org-return-follows-link` set to `t` in a read-only
>> buffer I now get a `Buffer is read-only: #<buffer
>> notmuch-startpage.org>` error when pressing ENTER/RETURN
>> with point on an org-mode link.
>
> Fixed. Thank you.

Thanks for fixing this Nicolas, and for adding a unit test.

Shouldn't the call to org-return be wrapped in (call-interactively …)
though?  Since the problem was with the interactive spec, org-return
will work (i.e. follow links) in read-only buffers if called
programmatically, so the test will fail to catch a regression if I'm not
mistaken.

IOW: if I revert the fix, the new test still passes.


  reply	other threads:[~2020-05-14 21:58 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-14 19:40 [bug] error on RET in read-only buffer with org-return-follows-link set to t Gregor Zattler
2020-05-14 21:28 ` Nicolas Goaziou
2020-05-14 21:57   ` Kévin Le Gouguec [this message]
2020-05-14 22:49     ` Nicolas Goaziou
     [not found]       ` <87a72a6sj6.fsf@nicolasgoaziou.Freitag>
2020-05-15 12:54         ` Gregor Zattler
2020-05-14 21:32 ` Kévin Le Gouguec

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.orgmode.org/

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

  git send-email \
    --in-reply-to=87lfluuqlw.fsf@gmail.com \
    --to=kevin.legouguec@gmail.com \
    --cc=emacs-orgmode@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/org-mode.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).