[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#759721: marked as done (remove home-end.el)



Your message dated Sat, 30 Jun 2018 11:20:27 +0000
with message-id <E1fZDvX-0003MR-7x@fasolo.debian.org>
and subject line Bug#759721: fixed in emacs-goodies-el 38.0
has caused the Debian Bug report #759721,
regarding remove home-end.el
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
759721: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=759721
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: emacs-goodies-el
Version: 35.12
Severity: normal

Dear Maintainer,

The functions home-end-end and home-end home didn't work for me,
because they were assuming a keyboard-event (key-press) was being
stored as a single byte, or single element, in the vector returned by
funciton recent-keys. However, on my machine at least, each of those
key-presses seems to be three bytes in length, and is recorded as
three elements of the vector returned by recent-keys. ( [home] was
being recorded as the sequence '27 79 72' (ESC-O-H); [end] was being
recorded as the sequence '27 79 70' (ESC-O-F)).

So, I started modifying the code. Results below.

While I was at it, I generalized the core functionality into a
separate function, so that it might easily and portably be re-used for
repeating other (three-byte-long) keyboard-events. I supose I could
rewrite it for an unlimited number of unique repetition reactions to
any-byte-length event, but I don't see the pressing need for such.

;---------------------------------------------------------------------
(defun home-quadruple-play (&optional arg)
  "React uniquely to repeated presses of the `home' key. A first key-pre\
ss moves the point to the beginning of the current line; a second key-pr\
ess moves the point to the beginning of the current visible window, and;\
 a third key-press moves the point to the beginning of the buffer.
   Additionally, with numeric `arg' N, this command calls function `begi\
nning-of-buffer' to move the point to the (N*10)% position of the buffer\
..
  Recommended usage is to bind this function to the `home' key by, for i\
nstance, placing the following in the .emacs file:
  `(global-set-key [home] \'home-quadruple-play)'"
  (interactive "P")
  (if arg
      (beginning-of-buffer arg)
    (keypress-triple-play
      '(lambda() (setq home-end-marker (copy-marker (point)))
                 (beginning-of-line))
      '(lambda() (push-mark home-end-marker)
                 (move-to-window-line 0))
      '(lambda() (goto-char (point-min))))
))

(defun end-quadruple-play (&optional arg)
  "React uniquely to repeated presses of the `end' key. A first key-pres\
s moves the point to the end of the current line; a second key-press mov\
es the point to the end of the current visible window, and; a third key-\
press moves the point to the end of the buffer.
   Additionally, with numeric `arg' N, this command calls function `end-\
of-buffer' to move the point to the (100-N*10)% position of the buffer.
  Recommended usage is to bind this function to the `end' key by, for in\
stance, placing the following in the .emacs file:
  `(global-set-key [end] \'end-quadruple-play)'"
  (interactive "P")
  (if arg
      (end-of-buffer arg)
    (keypress-triple-play
      '(lambda() (setq home-end-marker (copy-marker (point)))
                 (end-of-line))
      '(lambda() (push-mark home-end-marker)
                 (move-to-window-line -1)
                 (end-of-line))
      '(lambda() (goto-char (point-max))))
))

(defun keypress-triple-play (react_1 react_2 react_3)
  "Respond to a repeated keyboard-event (key-press) based upon the numbe\
r of its repetitions. When the key-press has been performed once, react_\
 by calling function `react_1'; When the key-press is repeated once, rea\
ct_ by calling function `react_2'; When the key-press is repeated more o\
ften, react_ by calling function `react_3'.
   This function was originally written to support functions `home-quadr\
uple-play' and `end-quadruple-play'. See there as example usages. These \
three functions replace functions `home-end-home' and `home-end-end' in \
file `home-end.el' of Debian\'s `emacs-goodies-el' package."
  (interactive)
  (if (or executing-kbd-macro
          defining-kbd-macro)
      (funcall react_1))
    (let* ((keys (recent-keys))
           (len (length keys))
           (key1 (if (> len 3) (vector (elt keys (- len 1))
                                       (elt keys (- len 2))
                                       (elt keys (- len 3)))
                     nil))
           (key2 (if (> len 6) (vector (elt keys (- len 4))
                                       (elt keys (- len 5))
                                       (elt keys (- len 6)))
                     nil))
           (key3 (if (> len 9) (vector (elt keys (- len 7))
                                       (elt keys (- len 8))
                                       (elt keys (- len 9)))
                     nil))
           (key-equal-1 (equal key1 key2))
           (key-equal-2 (and key-equal-1 (equal key2 key3))))
      (cond
           (key-equal-2 (funcall react_3))
           (key-equal-1 (funcall react_2))
           (t           (funcall react_1))
)))
;---------------------------------------------------------------------



-- System Information:
Debian Release: jessie/sid
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.13-1-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_US.utf8, LC_CTYPE=en_US.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages emacs-goodies-el depends on:
ii  bash                   4.3-9
ii  dpkg                   1.17.10
ii  emacs24-nox [emacsen]  24.3+1-4+b1
ii  install-info           5.2.0.dfsg.1-4

Versions of packages emacs-goodies-el recommends:
ii  dict      1.12.1+dfsg-2
ii  perl-doc  5.20.0-4
ii  wget      1.15-1+b1

emacs-goodies-el suggests no packages.

-- no debconf information

--- End Message ---
--- Begin Message ---
Source: emacs-goodies-el
Source-Version: 38.0

We believe that the bug you reported is fixed in the latest version of
emacs-goodies-el, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 759721@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
David Bremner <bremner@debian.org> (supplier of updated emacs-goodies-el package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Format: 1.8
Date: Sat, 30 Jun 2018 07:36:47 -0300
Source: emacs-goodies-el
Binary: emacs-goodies-el devscripts-el
Architecture: source
Version: 38.0
Distribution: experimental
Urgency: medium
Maintainer: Debian Emacsen team <debian-emacsen@lists.debian.org>
Changed-By: David Bremner <bremner@debian.org>
Description:
 devscripts-el - Emacs wrappers for the commands in devscripts
 emacs-goodies-el - Miscellaneous add-ons for Emacs
Closes: 495989 552164 581238 584305 591432 759721 850151
Changes:
 emacs-goodies-el (38.0) experimental; urgency=medium
 .
   [ Nicholas D Steeves ]
   * Drop elpafied pkgs from goodies customisation group.
   * Add elpafied packages to emacs-goodies-el's Recommends.
   * Drop highlight-completion.el (Closes: #581238).
   * Add debian/NEWS, to provide a short introduction to how this
     package is changing, particularly as this will affect xemacs users.
   * Document the state of emacs-goodies-el's subpackages in README.Debian.
     eg: Elpafied, Dropped, or Transitioned to a suitable replacement.
   * Drop browse-kill-ring.el (it was elpafied).
   * Drop home-end.el, which is dead upstream (Closes: #759721).
   * Drop htmlize.el (it was elpafied).
   * Drop diminish.el, which was elpafied (Closes: #850151).
   * Drop csv-mode.el, which was elpafied (Closes: #495989).
   * Drop show-wspace.el, which is obsolete and dead upstream.
     See Bug #590994 for more information.
   * Fix typos in README.Debian.
   * Drop filladapt.el, which is dead upstream (Closes: #552164).
   * Drop tail.el, which is dead upstream (Closes: #584305).
 .
   [ David Bremner ]
   * Patch emacs-goodies-el.texinfo. Bug fix: "emacs-goodies-el info manual
     ccmode xref", thanks to Kevin Ryde (Closes: #591432). Note that this
     file will eventually go away.
Checksums-Sha1:
 dbc98687b7d0768419aafe56ea93ef7566a4dede 1707 emacs-goodies-el_38.0.dsc
 be30a3ea08e8f17cc7af5862bbab4e8f48ed0180 589632 emacs-goodies-el_38.0.tar.xz
Checksums-Sha256:
 362fea1fa612efd7e068353ae83134e7753794b7319bf75116b5bf884fbe1591 1707 emacs-goodies-el_38.0.dsc
 9f22572459be66d35ac3fbc017de470808128217962b89a9e7243645e5d7c8a3 589632 emacs-goodies-el_38.0.tar.xz
Files:
 b61c4664230e4437643ff9346b460e72 1707 editors optional emacs-goodies-el_38.0.dsc
 682bca9ee3066ab3fd1d0e24de9c2305 589632 editors optional emacs-goodies-el_38.0.tar.xz

-----BEGIN PGP SIGNATURE-----

iQGzBAEBCAAdFiEE3VS2dnyDRXKVCQCp8gKXHaSnniwFAls3YGkACgkQ8gKXHaSn
niyOlAv+ODtobtRNYosaEoV6V1rKX5+0AYVHUnvYKr4P/2mJy23GhcwZJTnLByWT
mYLdYLrZN8kh+ou97HQso9CE7vNUCB/OY1F15lZZW0sHfZHt6A+spLXhpcyB6LLQ
YO+seQoPlLPzxjenuuBZNfSCeh1pElLm8z2Za/djoSmMAbPBAW1f2cbGBLbK/w/4
OzsVKTiK2OT1id3FGTgIU3fx89P/xIXqnPShSn4hw9m007k0cV1ExG1U3X9LyCSm
+9x3ooIoMWw2GQMh7z8zNpDmI0CsA20SgFG4jMz3NDljGVA57xo91AHtwTIZME9l
DmI2AMcF4+Dp5+GAXB9axEfU2nHbOuqh2Nl2thgtPOOA/TaHU5bFaKV1iFmL674S
CxfcPsD1IW56xtf0TOFhTHzydcD9KKu83H3D/vL8eNBHlcA/JZqklhtXR3wVxc4X
vZqynmGnPrlxRGxT8pZtqRUVTlngwnG0fz8JAIlfSGewE+Wg9qxUhtDGpXluig9g
wG9XA8la
=RF2q
-----END PGP SIGNATURE-----

--- End Message ---

Reply to: