all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* C-c C-c to close the buffer in *Org Src ...* buffers
@ 2020-01-31 11:03 Bastien
  2020-01-31 11:14 ` Fraga, Eric
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Bastien @ 2020-01-31 11:03 UTC (permalink / raw)
  To: emacs-orgmode

Hi all,

I'd like to make <C-c C-c> an equivalent to <C-c '> in Org Src buffers
so that hitting <C-c C-c> will close the buffer, which seems natural.

WDYT?

-- 
 Bastien

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: C-c C-c to close the buffer in *Org Src ...* buffers
  2020-01-31 11:03 C-c C-c to close the buffer in *Org Src ...* buffers Bastien
@ 2020-01-31 11:14 ` Fraga, Eric
  2020-02-01  9:31   ` Marcin Borkowski
  2020-01-31 11:20 ` Neil Jerram
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 8+ messages in thread
From: Fraga, Eric @ 2020-01-31 11:14 UTC (permalink / raw)
  To: Bastien; +Cc: emacs-orgmode@gnu.org

On Friday, 31 Jan 2020 at 12:03, Bastien wrote:
> Hi all,
>
> I'd like to make <C-c C-c> an equivalent to <C-c '> in Org Src buffers
> so that hitting <C-c C-c> will close the buffer, which seems natural.

It does seem natural and generally support this idea.

However, it could potentially cause me a minor annoyance: I often (in
manuals and other forms of dissemination) use org src blocks (i.e. src
blocks with org code) and I would expect C-c C-c to do whatever it would
normally do in an org file (e.g. add tag) while editing that
block.  Would the normal C-c C-c behaviour take precedence?

If not, this is a very minor issue so I'm sure I would adjust!

-- 
Eric S Fraga via Emacs 28.0.50, Org release_9.3.1-94-g0ac6a9

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: C-c C-c to close the buffer in *Org Src ...* buffers
  2020-01-31 11:03 C-c C-c to close the buffer in *Org Src ...* buffers Bastien
  2020-01-31 11:14 ` Fraga, Eric
@ 2020-01-31 11:20 ` Neil Jerram
  2020-01-31 15:00 ` William Denton
  2020-01-31 18:04 ` Berry, Charles via General discussions about Org-mode.
  3 siblings, 0 replies; 8+ messages in thread
From: Neil Jerram @ 2020-01-31 11:20 UTC (permalink / raw)
  To: Bastien; +Cc: Org Mode List

[-- Attachment #1: Type: text/plain, Size: 258 bytes --]

On Fri, 31 Jan 2020 at 11:05, Bastien <bzg@gnu.org> wrote:

> Hi all,
>
> I'd like to make <C-c C-c> an equivalent to <C-c '> in Org Src buffers
> so that hitting <C-c C-c> will close the buffer, which seems natural.
>
> WDYT?
>

SGTM.

Best wishes,
   Neil

[-- Attachment #2: Type: text/html, Size: 610 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: C-c C-c to close the buffer in *Org Src ...* buffers
  2020-01-31 11:03 C-c C-c to close the buffer in *Org Src ...* buffers Bastien
  2020-01-31 11:14 ` Fraga, Eric
  2020-01-31 11:20 ` Neil Jerram
@ 2020-01-31 15:00 ` William Denton
  2020-01-31 18:04 ` Berry, Charles via General discussions about Org-mode.
  3 siblings, 0 replies; 8+ messages in thread
From: William Denton @ 2020-01-31 15:00 UTC (permalink / raw)
  To: Bastien; +Cc: emacs-orgmode

On 31 January 2020, Bastien wrote:

> I'd like to make <C-c C-c> an equivalent to <C-c '> in Org Src buffers
> so that hitting <C-c C-c> will close the buffer, which seems natural.

Sound sensible.

I use a tip from Artur Malabarba 
(http://endlessparentheses.com/emacs-narrow-or-widen-dwim.html) to use C-x C-s 
to save and close the buffer, which is easy to remember, but C-c C-c is natural 
and very Orgish.

Bill
--
William Denton :: Toronto, Canada   ---   Listening to Art: https://listeningtoart.org/
https://www.miskatonic.org/         ---   GHG.EARTH: https://ghg.earth/
Caveat lector.                      ---   STAPLR: https://staplr.org/

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: C-c C-c to close the buffer in *Org Src ...* buffers
  2020-01-31 11:03 C-c C-c to close the buffer in *Org Src ...* buffers Bastien
                   ` (2 preceding siblings ...)
  2020-01-31 15:00 ` William Denton
@ 2020-01-31 18:04 ` Berry, Charles via General discussions about Org-mode.
  2020-01-31 20:01   ` Matthew Lundin
  2020-02-01  8:48   ` Bastien
  3 siblings, 2 replies; 8+ messages in thread
From: Berry, Charles via General discussions about Org-mode. @ 2020-01-31 18:04 UTC (permalink / raw)
  To: Bastien; +Cc: emacs-orgmode@gnu.org



> On Jan 31, 2020, at 3:03 AM, Bastien <bzg@gnu.org> wrote:
> 
> Hi all,
> 
> I'd like to make <C-c C-c> an equivalent to <C-c '> in Org Src buffers
> so that hitting <C-c C-c> will close the buffer, which seems natural.
> 
> WDYT?

Many modes used in org src buffers have C-c C-c in their maps. python, latex, c++, shell, R, ...

I often use C-c C-c in R src edit buffers to eval functions and code blocks, so this will be an inconvenience for me (and I suspect for others).

HTH,

Chuck

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: C-c C-c to close the buffer in *Org Src ...* buffers
  2020-01-31 18:04 ` Berry, Charles via General discussions about Org-mode.
@ 2020-01-31 20:01   ` Matthew Lundin
  2020-02-01  8:48   ` Bastien
  1 sibling, 0 replies; 8+ messages in thread
From: Matthew Lundin @ 2020-01-31 20:01 UTC (permalink / raw)
  To: Berry, Charles, Bastien; +Cc: emacs-orgmode@gnu.org

"Berry, Charles" via "General discussions about Org-mode." <emacs-orgmode@gnu.org> writes:

>> On Jan 31, 2020, at 3:03 AM, Bastien <bzg@gnu.org> wrote:
>> 
>> Hi all,
>> 
>> I'd like to make <C-c C-c> an equivalent to <C-c '> in Org Src
>> buffers so that hitting <C-c C-c> will close the buffer, which seems
>> natural.
>> 
>> WDYT?
>
> Many modes used in org src buffers have C-c C-c in their maps. python,
> latex, c++, shell, R, ...
>
> I often use C-c C-c in R src edit buffers to eval functions and code
> blocks, so this will be an inconvenience for me (and I suspect for
> others).

Agreed. C-c C-c in python-mode is bound to python-shell-send-buffer,
which evaluates the buffer in a running instance of python. I think
<C-c '> has fewer conflicts with existing bindings. 

Matt

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: C-c C-c to close the buffer in *Org Src ...* buffers
  2020-01-31 18:04 ` Berry, Charles via General discussions about Org-mode.
  2020-01-31 20:01   ` Matthew Lundin
@ 2020-02-01  8:48   ` Bastien
  1 sibling, 0 replies; 8+ messages in thread
From: Bastien @ 2020-02-01  8:48 UTC (permalink / raw)
  To: Berry, Charles via General discussions about Org-mode.; +Cc: Berry, Charles

Thanks Charles, Matt and Eric for your feedback.

I'd rather stick to the current keybindings for now,
let's resist the temptation to supercharge `C-c C-c'.

-- 
 Bastien

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: C-c C-c to close the buffer in *Org Src ...* buffers
  2020-01-31 11:14 ` Fraga, Eric
@ 2020-02-01  9:31   ` Marcin Borkowski
  0 siblings, 0 replies; 8+ messages in thread
From: Marcin Borkowski @ 2020-02-01  9:31 UTC (permalink / raw)
  To: Fraga, Eric; +Cc: Bastien, emacs-orgmode@gnu.org


On 2020-01-31, at 12:14, Fraga, Eric <e.fraga@ucl.ac.uk> wrote:

> On Friday, 31 Jan 2020 at 12:03, Bastien wrote:
>> Hi all,
>>
>> I'd like to make <C-c C-c> an equivalent to <C-c '> in Org Src buffers
>> so that hitting <C-c C-c> will close the buffer, which seems natural.
>
> It does seem natural and generally support this idea.
>
> However, it could potentially cause me a minor annoyance: I often (in
> manuals and other forms of dissemination) use org src blocks (i.e. src
> blocks with org code) and I would expect C-c C-c to do whatever it would
> normally do in an org file (e.g. add tag) while editing that
> block.  Would the normal C-c C-c behaviour take precedence?
>
> If not, this is a very minor issue so I'm sure I would adjust!

A similar issue was the reason I stopped using C-c C-c to add tags in
favor of C-c C-q: I wanted to add tags while capturing notes.

What I'm saying is that maybe C-c C-c tries to be too clever, and it may
be better not to rely on it too much.

Just my 2 cents,

-- 
Marcin Borkowski
http://mbork.pl

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2020-02-01  9:31 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-01-31 11:03 C-c C-c to close the buffer in *Org Src ...* buffers Bastien
2020-01-31 11:14 ` Fraga, Eric
2020-02-01  9:31   ` Marcin Borkowski
2020-01-31 11:20 ` Neil Jerram
2020-01-31 15:00 ` William Denton
2020-01-31 18:04 ` Berry, Charles via General discussions about Org-mode.
2020-01-31 20:01   ` Matthew Lundin
2020-02-01  8:48   ` Bastien

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.