From mboxrd@z Thu Jan 1 00:00:00 1970 From: areiner at tph.tuwien.ac.at (Albert REINER) Date: Sat, 10 Sep 2016 17:46:28 +0200 Subject: [Howm-eng 114] How to bind M-RET to insert { } in howm buffers? Message-ID: <20160910154628.GA9883@qohelet.reiner> Hi, hoping that this list is still functional, here is something that I have been longing for for quite some time; but, alas!, my Emacs skills are insufficient to implement this myself. What I would like is to make M-RET, inside howm buffers, insert a new item in a to do list, i.e. insert a newline, followed by "{ } " indented by the same amount as any preceding item. (This would be analogous to, e.g., various TeX modes that start a new \item.) E.g., given the following buffer contents: ________________________________________________________________ foo bar baz foo bar baz foo bar baz foo bar baz foo bar baz foo bar baz foo bar baz foo bar baz foo bar baz foo bar baz foo bar baz foo bar baz foo bar baz AAA foo bar baz foo bar baz BBB { } foo CCC bar DDD { } baz { } foo EEE bar FFF GGG ________________________________________________________________ Hitting M-RET should have this effect: - on AAA or BBB or CCC or DDD: insert "\n{ } " (since no indentation is implied by previous lines); - on EEE or FFF: insert "\n { } " (since we are on an item indented by four spaces already) While this is not in any way urgent, any help would be very much appreciated. (BTW, I have been using Howm heavily for about a year, and it has become very important to me. Thank you so much for writing and maintaining Howm!) Regards, Albert.