all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Per Starbäck" <per@starback.se>
To: Juri Linkov <juri@jurta.org>
Cc: Deniz Dogan <deniz.a.m.dogan@gmail.com>,
	Stefan Monnier <monnier@iro.umontreal.ca>,
	emacs-devel@gnu.org
Subject: Re: C-j considered harmful (not really)
Date: Mon, 23 Nov 2009 12:11:02 +0100	[thread overview]
Message-ID: <912155b0911230311m60103693j6331866d97ab8179@mail.gmail.com> (raw)
In-Reply-To: <87zl6dk2pz.fsf@mail.jurta.org>

2009/11/23 Juri Linkov <juri@jurta.org>:
>> > Evidently <S-return> is used to insert newlines in lots of programs.
>> > I've just searched for "shift-return" and "shift-enter" on the web and
>> > seen many examples.
>> >
>> > After reconsidering this I then suggest just that <S-return> should be
>> > usable as an alternative to C-j.
>>
>> So you suggest
>>
>>   (define-key function-key-map [S-return] [?\C-j])
>>
>> ?
>
> I guess the initial suggestion was rather:
>
>  (define-key minibuffer-local-map [S-return] 'newline)

I changed my mind, so my current suggestion is the function-key-map
thing. I realized that
this alternative to a real linefeed key would be useful elsewhere too, for
newline-and-indent and other functions that are "natural" for a linefeed key.
Also I think it makes sense in general to have
keys-that-can't-be-typed-everywhere
be aliases for something that can be typed everywhere instead of doing
their own thing.

> I guess I could live with that.  But you'd still need to prefix it with
> C-q in minibuffer prompts, wouldn't you?  So we'd need more changes,
> e.g. making LF in minibuffer input not exit the minibuffer.  I've never
> used an LF key, so I could live with that, but I don't know what other
> people think about it.

Right. I'd like to see that as another question (regardless of whether
S-return = C-j or not),
that it's unnecessary to have both RET and C-j for
minibuffer-complete-and-exit, so it would
be better to have C-j do newline there. Probably some people are used to using
C-j there? So then I suggest an option for that, with the default
being that C-j does newline,
to make it easier for new users.

I think this would be useful even for very casual new users, at least
with replace-string.
And I think it would be useful for all current users who only use RET
for minibuffer-complete-and-exit
(like myself).




  reply	other threads:[~2009-11-23 11:11 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-16 22:37 C-j considered harmful (not really) Per Starbäck
2009-11-16 22:51 ` Deniz Dogan
2009-11-17 10:09   ` Juri Linkov
2009-11-17 23:17     ` Xavier Maillard
2009-11-18  9:54       ` Juri Linkov
2009-11-22 20:36     ` Per Starbäck
2009-11-22 20:53       ` Deniz Dogan
2009-11-23  2:57       ` Stefan Monnier
2009-11-23  9:54         ` Juri Linkov
2009-11-23 11:11           ` Per Starbäck [this message]
2009-11-23 15:05             ` Drew Adams
2009-11-23 15:05           ` Drew Adams
2009-11-23 16:09             ` Per Starbäck
2009-11-24 17:12             ` Juri Linkov
2009-11-24 17:51               ` Drew Adams

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

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

  git send-email \
    --in-reply-to=912155b0911230311m60103693j6331866d97ab8179@mail.gmail.com \
    --to=per@starback.se \
    --cc=deniz.a.m.dogan@gmail.com \
    --cc=emacs-devel@gnu.org \
    --cc=juri@jurta.org \
    --cc=monnier@iro.umontreal.ca \
    /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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.