[Top][All Lists]

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

bug#9276: 23.3; quickurl-add-url saves truncated list when url list leng

From: David Biesack
Subject: bug#9276: 23.3; quickurl-add-url saves truncated list when url list length exceeds print-length
Date: Wed, 10 Aug 2011 09:34:53 -0400

Start emacs -q

backup your ~/.quickurls file if you have one.

M-x load-library quickurl

M-x eval-expression

(setq print-length 10)

In *scratch* insert the text

 manual0 http://www.gnu.org/software/emacs/manual0
 manual1 http://www.gnu.org/software/emacs/manual1
 manual2 http://www.gnu.org/software/emacs/manual2
 manual3 http://www.gnu.org/software/emacs/manual3
 manual4 http://www.gnu.org/software/emacs/manual4
 manual5 http://www.gnu.org/software/emacs/manual5
 manual6 http://www.gnu.org/software/emacs/manual6
 manual7 http://www.gnu.org/software/emacs/manual7
 manual8 http://www.gnu.org/software/emacs/manual8
 manual9 http://www.gnu.org/software/emacs/manual9
 manuala http://www.gnu.org/software/emacs/manuala

Place point before each "http" and do:

 M-x quickurl-add-url

After the length exceeds 10, the add operation will fail with

quickurl-url-comment: Wrong type argument: listp, \.\.\.

and future sessions will also fail to load the .quickurls file because
it contains a shorted list with "..." in it:

;; -*- lisp -*-

(("manual0" "http://www.gnu.org/software/emacs/manual0";)
 ("manual1" "http://www.gnu.org/software/emacs/manual1";)
 ("manual2" "http://www.gnu.org/software/emacs/manual2";)
 ("manual3" "http://www.gnu.org/software/emacs/manual3";)
 ("manual4" "http://www.gnu.org/software/emacs/manual4";)
 ("manual5" "http://www.gnu.org/software/emacs/manual5";)
 ("manual6" "http://www.gnu.org/software/emacs/manual6";)
 ("manual7" "http://www.gnu.org/software/emacs/manual7";)
 ("manual8" "http://www.gnu.org/software/emacs/manual8";)
 ("manual9" "http://www.gnu.org/software/emacs/manual9";)

The fix is trivial - bind print-length to nil in quickurl-save-urls.

See this patch.

d72933. # diff -c quickurl.el.orig quickurl.el
*** quickurl.el.orig    Wed Aug 10 09:20:24 2011
--- quickurl.el Wed Aug 10 09:21:27 2011
*** 268,274 ****
  (defun quickurl-save-urls ()
    "Save the contents of `quickurl-urls' to `quickurl-url-file'."
!     (let ((standard-output (current-buffer)))
        (princ quickurl-prefix)
        (pp quickurl-urls)
        (princ quickurl-postfix)
--- 268,275 ----
  (defun quickurl-save-urls ()
    "Save the contents of `quickurl-urls' to `quickurl-url-file'."
!     (let ((standard-output (current-buffer))
!           (print-length nil))
        (princ quickurl-prefix)
        (pp quickurl-urls)
        (princ quickurl-postfix)

In GNU Emacs 23.3.1 (x86_64-unknown-linux-gnu, GTK+ Version 2.22.0)
 of 2011-03-30 on Hippie
Windowing system distributor `The X.Org Foundation', version 11.0.10900000
configured using `configure  '--prefix=/u/sasdjb/ubuntu''

Important settings:
  value of $LC_ALL: C
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: en_US.UTF-8
  value of $XMODIFIERS: nil
  locale-coding-system: nil
  default enable-multibyte-characters: t

Major mode: Lisp Interaction

Minor modes in effect:
  tooltip-mode: t
  mouse-wheel-mode: t
  tool-bar-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t

Recent input:
<return> <return> C-x C-f ~ / . q u i c k u r SPC <backspace> 
<tab> <return> M-> M-< M-> <help-echo> <help-echo> 
C-x <escape> <escape> C-g C-g C-x b * s c SPC <return> 
C-e <return> <return> C-y C-p <M-return> C-j C-n C-e 
C-j <return> M-x q r l <return> u p l SPC <return> 
C-a C-d C-e <backspace> C-a C-SPC C-e C-w M-x c u s 
t r o m i z <backspace> <backspace> <backspace> <backspace> 
<backspace> o m i z e - h r SPC <backspace> <backspace> 
g SPC <return> q u i c k u r l <return> <help-echo> 
<help-echo> <down-mouse-1> <mouse-1> <down-mouse-1> 
<mouse-1> <help-echo> <help-echo> <help-echo> <help-echo> 
<help-echo> <help-echo> <help-echo> <help-echo> <help-echo> 
<help-echo> <down-mouse-1> <mouse-1> C-h v p r i n 
t - l e SPC n g t h <return> <help-echo> <help-echo> 
<help-echo> <down-mouse-1> <mouse-1> C-x <escape> <escape> 
C-g C-g M-x c u s t o C-g C-g M-x s e t - v a r SPC 
<return> p r i n t - l e n SPC g t h SPC C-g C-x b 
* s c SPC <return> ( s e t q SPC p r i n t - l e n 
g t h SPC 1 0 ) C-e C-j <help-echo> <down-mouse-1> 
<mouse-1> <down-mouse-1> <mouse-1> <M-backspace> x 
x x M-x q r l <backspace> <backspace> u i c k - u r 
l - a d d SPC <return> <backspace> <backspace> <backspace> 
M-b <backspace> C-e a d SPC SPC <return> C-f M-x q 
r l - a d SPC <return> <return> <return> <return> <help-echo> 
<down-mouse-1> <mouse-1> C-x C-f ~ / . q u i c k u 
r l s <return> y e s <return> <help-echo> <help-echo> 
<down-mouse-1> <mouse-1> M-x r e p o r t - b SPC <

Recent messages:
Creating group state...
Creating group... done
Creating customization items ...done
Resetting customization items...done
Creating customization setup...done
Making completion list...
Type C-x 1 to delete the help window.
Quit [5 times]
beginning-of-thing: No url here
Added http://sww.sas.com/saspedia/Help:Uploading

Load-path shadows:
None found.

(shadow sort mail-extr message sendmail regexp-opt ecomplete rfc822 mml
mml-sec ...)

David J. Biesack, SAS
SAS Campus Dr. Cary, NC 27513
www.sas.com    (919) 531-7771

reply via email to

[Prev in Thread] Current Thread [Next in Thread]