From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: function for inserting a block Date: Wed, 18 Oct 2017 08:45:40 +0200 Message-ID: References: <877exghblx.fsf@ericabrahamsen.net> <87efromccg.fsf@nicolasgoaziou.fr> <87ziabepxt.fsf@ericabrahamsen.net> <87bmml2fb0.fsf@ericabrahamsen.net> <87fubuzpsa.fsf@nicolasgoaziou.fr> <874lsabdop.fsf@ericabrahamsen.net> <87vak1l11m.fsf@nicolasgoaziou.fr> <87r2uoc4q7.fsf@ericabrahamsen.net> <87bmllk5xy.fsf@nicolasgoaziou.fr> <878tgmwwsa.fsf@ericabrahamsen.net> <87po9q2e8k.fsf@nicolasgoaziou.fr> <87tvyyvpst.fsf@ericabrahamsen.net> <87fuaiz069.fsf@nicolasgoaziou.fr> <87lgk9eo4d.fsf@ericabrahamsen.net> <87fuahxxvs.fsf@nicolasgoaziou.fr> <87r2u1cuwj.fsf@ericabrahamsen.net> <87infdctzq.fsf@ericabrahamsen.net> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="f403045c1690c77a15055bcc971e" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:40823) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e4i7B-0005E4-5Z for emacs-orgmode@gnu.org; Wed, 18 Oct 2017 02:46:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e4i7A-0005AR-4s for emacs-orgmode@gnu.org; Wed, 18 Oct 2017 02:46:05 -0400 Received: from mail-wm0-x229.google.com ([2a00:1450:400c:c09::229]:53538) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1e4i79-00059W-U0 for emacs-orgmode@gnu.org; Wed, 18 Oct 2017 02:46:04 -0400 Received: by mail-wm0-x229.google.com with SMTP id q132so7979805wmd.2 for ; Tue, 17 Oct 2017 23:46:02 -0700 (PDT) In-Reply-To: <87infdctzq.fsf@ericabrahamsen.net> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: Eric Abrahamsen Cc: org-mode list --f403045c1690c77a15055bcc971e Content-Type: text/plain; charset="UTF-8" Dear all, this is great added functionality that I have missed a lot myself. Thanks for this! Also, I like the key binding. One improvement I can think of it to read the block type with completion (but still allow any word to be used). Carsten On Wed, Oct 18, 2017 at 12:03 AM, Eric Abrahamsen wrote: > Eric Abrahamsen writes: > > > Nicolas Goaziou writes: > > > >> Eric Abrahamsen writes: > >> > >>> I'm still not quite seeing this. This chunk should take care of it: > >>> > >>> (goto-char e) > >>> (if (bolp) > >>> (progn > >>> (skip-chars-backward " \n\t") > >>> (forward-line)) > >>> (end-of-line) > >>> (insert "\n")) > >>> > >>> If "e" is EOB, we do `end-of-line' and insert a newline, it should be > >>> taken care of. I added a new clause in the test for this case, and it > >>> seems to work fine... Am I missing anything? > >> > >> I don't think so. It looks correct, indeed. > >> > >> However, you sent the wrong patch. Could you send the updated patch > >> again? > > > > Ooof, maybe I need to take a little vacation from the computer. This > > should be the right one. > > Backing away from the keyboard now... > > --f403045c1690c77a15055bcc971e Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Dear all,

this is great added functiona= lity that I have missed a lot myself.=C2=A0 Thanks for this!=C2=A0 Also, I = like the key binding.

One improvement I can think = of it to read the block type with completion (but still allow any word to b= e used).

Carsten

On Wed, Oct 18, 2017 at 12:03 AM, Eric = Abrahamsen <eric@ericabrahamsen.net> wrote:
Eric Abrahamsen <eric@ericabrahamsen.net> writes:

> Nicolas Goaziou <mail@nic= olasgoaziou.fr> writes:
>
>> Eric Abrahamsen <eri= c@ericabrahamsen.net> writes:
>>
>>> I'm still not quite seeing this. This chunk should take ca= re of it:
>>>
>>>=C2=A0 =C2=A0 =C2=A0(goto-char e)
>>>=C2=A0 =C2=A0 =C2=A0(if (bolp)
>>>=C2=A0 =C2=A0 =C2=A0(progn
>>>=C2=A0 =C2=A0 =C2=A0 =C2=A0(skip-chars-backward " \n\t&quo= t;)
>>>=C2=A0 =C2=A0 =C2=A0 =C2=A0(forward-line))
>>>=C2=A0 =C2=A0 =C2=A0 =C2=A0(end-of-line)
>>>=C2=A0 =C2=A0 =C2=A0 =C2=A0(insert "\n"))
>>>
>>> If "e" is EOB, we do `end-of-line' and insert a = newline, it should be
>>> taken care of. I added a new clause in the test for this case,= and it
>>> seems to work fine... Am I missing anything?
>>
>> I don't think so. It looks correct, indeed.
>>
>> However, you sent the wrong patch. Could you send the updated patc= h
>> again?
>
> Ooof, maybe I need to take a little vacation from the computer. This > should be the right one.

Backing away from the keyboard now...


--f403045c1690c77a15055bcc971e--