From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28947 invoked by alias); 1 Jun 2011 19:59:13 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 29429 Received: (qmail 29728 invoked from network); 1 Jun 2011 19:59:11 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_PASS autolearn=ham version=3.3.1 Received-SPF: pass (ns1.primenet.com.au: SPF record at m.gmane.org designates 80.91.229.12 as permitted sender) X-Injected-Via-Gmane: http://gmane.org/ To: zsh-workers@zsh.org From: Bernhard Tittelbach Subject: Re: Behaviour of {beginning,end}-of-buffer-or-history Date: Wed, 01 Jun 2011 21:57:05 +0200 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: chello080109208103.3.graz.surfer.at User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.8.1.23) Gecko/20091001 Thunderbird/2.0.0.23 Mnenhy/0.7.6.666 On 2011-06-01 21:43, Bernhard Tittelbach wrote: > Hi, > > recently I was dissatisfied with the behavior of my HOME/END keys. > What I wanted was this: > > If cursor is a beginning/end of the buffer > then jump to the beginning/end of the history > Else > jump to the beginning/end of that line, > no matter whether we are in a multi- or single-line buffer > > > Seemingly there are functions that do exactly that: > > beginning-of-buffer-or-history > Move to the beginning of the buffer, or if already there, move to the first > event in the history list. > > end-of-buffer-or-history > Move to the end of the buffer, or if already there, move to the last > event in the history list. > > But in reality, what above functions really do is this: > > If cursor is a beginning/end of a buffer > then jump to the beginning/end of the history > ElseIf cursor is somewhere in a SINGLE-LINE buffer > then jump to the beginning/end of the history (why ???) > Else > jump to the beginning/end of the MULTI-LINE buffer > > > I wonder if this is really how these functions are intended to work ? > At the very least I would consider them misnamed, or does "buffer" really only > ever refer to multi-line buffers ? > to clarify: I find it odd that {beginning,end}-of-buffer-or-history jumps to the beginning/end of the history and not to the beginning/end of the line if called on a single-line buffer Jumping to the beginning/end of a line in a multi-line buffer is just an extra my function does, and not something I think {beginning,end}-of-buffer-or-history should do (it's name does not imply any such functionality :) cheers, Bernhard