From: David Biesack <sasdjb@d72933.na.sas.com>
To: 9276@debbugs.gnu.org
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 [thread overview]
Message-ID: <p17h6lqtj6.fsf@d72933.na.sas.com> (raw)
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'."
(with-temp-buffer
! (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'."
(with-temp-buffer
! (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 <
return>
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.
Features:
(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
next reply other threads:[~2011-08-10 13:34 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-10 13:34 David Biesack [this message]
2011-08-14 19:26 ` bug#9276: 23.3; quickurl-add-url saves truncated list when url list length exceeds print-length Chong Yidong
2013-02-14 7:51 ` Glenn Morris
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=p17h6lqtj6.fsf@d72933.na.sas.com \
--to=sasdjb@d72933.na.sas.com \
--cc=9276@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.