GNU bug report logs - #23789
rolo-sort run incorrect.

Previous Next

Package: hyperbole;

Reported by: "Feng Shu" <tumashu <at> 163.com>

Date: Sat, 18 Jun 2016 01:40:02 UTC

Severity: normal

Fixed in version 5.13

Done: rswgnu <at> gmail.com

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 23789 in the body.
You can then email your comments to 23789 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-hyperbole <at> gnu.org:
bug#23789; Package hyperbole. (Sat, 18 Jun 2016 01:40:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to "Feng Shu" <tumashu <at> 163.com>:
New bug report received and forwarded. Copy sent to bug-hyperbole <at> gnu.org. (Sat, 18 Jun 2016 01:40:03 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: "Feng Shu" <tumashu <at> 163.com>
To: bug-hyperbole <bug-hyperbole <at> gnu.org>
Cc: Feng Shu <tumashu <at> 163.com>
Subject: rolo-sort run incorrect.
Date: Sat, 18 Jun 2016 09:13:08 +0800
Before:

----------------------------
*   Feng Shu
    6/17/2016

*   fs
    6/18/2016
---------------------------

End:
---------------------------
 
    6/17/2016
    6/18/2016
*   Feng Shu
*   fs
---------------------------

-- 





Information forwarded to bug-hyperbole <at> gnu.org:
bug#23789; Package hyperbole. (Sat, 18 Jun 2016 15:48:03 GMT) Full text and rfc822 format available.

Message #8 received at 23789 <at> debbugs.gnu.org (full text, mbox):

From: Robert Weiner <rsw <at> gnu.org>
To: bug-gnu-emacs <at> gnu.org
Subject: Emacs 25.0.94: Patch to make sort-lines respect visible lines (fairly
 urgent)
Date: Sat, 18 Jun 2016 11:47:08 -0400
[Message part 1 (text/plain, inline)]
sort-lines calls forward-line rather than forward-visible line, so if
you have emacs outline entries that are collapsed/hidden to single lines
each and you try to sort them, their bodies and subtrees are sorted
separately because forward-visible-line is not used.

This patch fixes this problem and also unifies the calling convention of
forward-visible-line with that of forward-line (allowing it to take an
optional argument) leading to a cleaner calling convention.

Please apply it as soon as you can as Hyperbole uses sort-lines to sort
its contact manager records and right now this doesn't work.  Although,
sort-subr could be called directly for this application, sort-lines
should work properly with both visible and invisible text and the patch
is quite simple.

Thanks,

Bob
--------

In GNU Emacs 25.0.94.1 (x86_64-apple-darwin13.4.0, NS appkit-1265.21
Version 10.9.5 (Build 13F1603))
 of 2016-05-17 built on builder10-9.local
Windowing system distributor 'Apple', version 10.3.1404
Configured using:
 'configure --with-ns '--enable-locallisppath=/Library/Application
 Support/Emacs/${version}/site-lisp:/Library/Application
 Support/Emacs/site-lisp''

Configured features:
NOTIFY ACL LIBXML2 ZLIB TOOLKIT_SCROLL_BARS NS

Important settings:
  value of $LANG: en_US.UTF-8
  locale-coding-system: utf-8-unix

----------------

*** sort-orig.el.gz 2016-06-18 11:31:13.000000000 -0400
--- sort.el.gz 2016-06-18 11:31:13.000000000 -0400
***************
*** 210,216 ****
        (goto-char (point-min))
        (let ;; To make `end-of-line' and etc. to ignore fields.
   ((inhibit-field-text-motion t))
! (sort-subr reverse 'forward-line 'end-of-line)))))

  ;;;###autoload
  (defun sort-paragraphs (reverse beg end)
--- 210,216 ----
        (goto-char (point-min))
        (let ;; To make `end-of-line' and etc. to ignore fields.
   ((inhibit-field-text-motion t))
! (sort-subr reverse 'forward-visible-line 'end-of-visible-line)))))

  ;;;###autoload
  (defun sort-paragraphs (reverse beg end)


*** simple-orig.el.gz 2016-06-18 11:29:58.000000000 -0400
--- simple.el.gz 2016-06-18 11:29:58.000000000 -0400
***************
*** 4909,4918 ****
  (kill-region (point)
       (progn (forward-visible-line arg) (point))))))

! (defun forward-visible-line (arg)
!   "Move forward by ARG lines, ignoring currently invisible newlines only.
  If ARG is negative, move backward -ARG lines.
  If ARG is zero, move to the beginning of the current line."
    (condition-case nil
        (if (> arg 0)
   (progn
--- 4909,4919 ----
  (kill-region (point)
       (progn (forward-visible-line arg) (point))))))

! (defun forward-visible-line (&optional arg)
!   "Move forward by optional ARG lines (default = 1), ignoring currently
invisible newlines only.
  If ARG is negative, move backward -ARG lines.
  If ARG is zero, move to the beginning of the current line."
+   (if (null arg) (setq arg 1))
    (condition-case nil
        (if (> arg 0)
   (progn
[Message part 2 (text/html, inline)]

Information forwarded to bug-hyperbole <at> gnu.org:
bug#23789; Package hyperbole. (Sun, 19 Jun 2016 21:32:02 GMT) Full text and rfc822 format available.

Message #11 received at 23789 <at> debbugs.gnu.org (full text, mbox):

From: Robert Weiner <rsw <at> gnu.org>
To: Feng Shu <tumashu <at> 163.com>
Cc: 23789 <at> debbugs.gnu.org
Subject: Re: bug#23789: rolo-sort run incorrect.
Date: Sun, 19 Jun 2016 17:31:18 -0400
Fixed in the next release, 5.13.  Thanks for pointing this out.  -- Bob

On Fri, Jun 17, 2016 at 9:13 PM, Feng Shu <tumashu <at> 163.com> wrote:
>
> Before:
>
> ----------------------------
> *   Feng Shu
>     6/17/2016
>
> *   fs
>     6/18/2016
> ---------------------------
>
> End:
> ---------------------------
>
>     6/17/2016
>     6/18/2016
> *   Feng Shu
> *   fs
> ---------------------------
>




bug marked as fixed in version 5.13, send any further explanations to 23789 <at> debbugs.gnu.org and "Feng Shu" <tumashu <at> 163.com> Request was from Robert Weiner <rsw <at> gnu.org> to control <at> debbugs.gnu.org. (Fri, 01 Jul 2016 16:37:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Sat, 30 Jul 2016 11:24:03 GMT) Full text and rfc822 format available.

This bug report was last modified 9 years and 20 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.