Subject: bug#7778: closed (Re: bug#7778: 24.0.50; just-one-space fails when optional argument is not provided)

From: [email-masked] (GNU bug Tracking System)
Date: Mon, 03 Jan 2011 20:43:02 +0000

Your bug report

#7778: 24.0.50; just-one-space fails when optional argument is not provided

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
7778: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=7778
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#7778: 24.0.50; just-one-space fails when optional argument is not provided
From: Glenn Morris <[email-masked]>
To: [email-masked]
Date: Mon, 03 Jan 2011 15:49:23 -0500
List-Id: <debbugs-submit.debbugs.gnu.org>

Dustin Sallings wrote:

> Any invocation of (just-one-space) without providing a numeric argument.

This was fixed a month ago. I don't know what version your patch is
against, but it is not the current one.

Subject: 24.0.50; just-one-space fails when optional argument is not provided
From: Dustin Sallings <[email-masked]>
To: "[email-masked]" <[email-masked]>
Date: Mon, 3 Jan 2011 11:58:58 -0800
List-Id: <debbugs-submit.debbugs.gnu.org>

Any invocation of (just-one-space) without providing a numeric argument.

Working patch is as follows:

>From 82e6abd2f07c2c54689dc0fe78f9f2beea0c6a57 Mon Sep 17 00:00:00 2001
From: Dustin Sallings <[email-masked]>
Date: Mon, 3 Jan 2011 11:41:52 -0800
Subject: [PATCH] just-one-space should treat optional arg as optional

An invocation of (just-one-space) would always error due to a
comparision of nil to check for negative values.
---
lisp/simple.el |    4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/lisp/simple.el b/lisp/simple.el
index 7300fb7..c6fcdee 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -765,8 +765,8 @@ If BACKWARD-ONLY is non-nil, only delete them before point."
If N is negative, deletes carriage return and linefeed characters as well."
   (interactive "*p")
   (let ((orig-pos (point))
-        (skip-characters (if (< n 0) " \t\n\r" " \t"))
-        (n (abs n)))
+        (skip-characters (if (< (or n 1) 0) " \t\n\r" " \t"))
+        (n (abs (or n 1))))
     (skip-chars-backward skip-characters)
     (constrain-to-field nil orig-pos)
     (dotimes (i (or n 1))
--
1.7.3.4

In GNU Emacs 24.0.50.1 (x86_64-apple-darwin10.5.0, NS apple-appkit-1038.35)
of 2011-01-03 on dustinnmb.local
Windowing system distributor `Apple', version 10.3.1038
configured using `configure  '--prefix=/usr/local/Cellar/emacs/HEAD' '--without-dbus' '--enable-locallisppath=/usr/local/share/emacs/site-lisp' '--infodir=/usr/local/Cellar/emacs/HEAD/share/info/emacs' '--with-ns' '--disable-ns-self-contained' 'CC=/usr/bin/cc' 'CFLAGS=-O3 -march=core2 -msse4.1 -w -pipe''

Important settings:
  value of $LC_ALL: nil
  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: nil
  value of $XMODIFIERS: nil
  locale-coding-system: nil
  default enable-multibyte-characters: t

Major mode: Org

Minor modes in effect:
  diff-auto-refine-mode: t
  display-battery-mode: t
  display-time-mode: t
  show-paren-mode: t
  mouse-wheel-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t

Recent input:
[redacted]

Recent messages:
Agenda written to Org file /Users/dustin/Dropbox/MobileOrg/agendas.org
Creating agendas...done
Saving all Org-mode buffers...
(No files need saving)
Saving all Org-mode buffers... done
Copying files...
OVERVIEW
Writing index file...
Writing checksums...
Files for mobile viewer staged

Load-path shadows:
~/elisp/remember/remember hides /usr/local/Cellar/emacs/HEAD/share/emacs/24.0.50/lisp/textmodes/remember
~/prog/eprojects/org-mode/lisp/org hides /usr/local/Cellar/emacs/HEAD/share/emacs/24.0.50/lisp/org/org
~/prog/eprojects/org-mode/lisp/org-xoxo hides /usr/local/Cellar/emacs/HEAD/share/emacs/24.0.50/lisp/org/org-xoxo
~/prog/eprojects/org-mode/lisp/org-wl hides /usr/local/Cellar/emacs/HEAD/share/emacs/24.0.50/lisp/org/org-wl
~/prog/eprojects/org-mode/lisp/org-w3m hides /usr/local/Cellar/emacs/HEAD/share/emacs/24.0.50/lisp/org/org-w3m
~/prog/eprojects/org-mode/lisp/org-vm hides /usr/local/Cellar/emacs/HEAD/share/emacs/24.0.50/lisp/org/org-vm
~/prog/eprojects/org-mode/lisp/org-timer hides /usr/local/Cellar/emacs/HEAD/share/emacs/24.0.50/lisp/org/org-timer
~/prog/eprojects/org-mode/lisp/org-taskjuggler hides /usr/local/Cellar/emacs/HEAD/share/emacs/24.0.50/lisp/org/org-taskjuggler
~/prog/eprojects/org-mode/lisp/org-table hides /usr/local/Cellar/emacs/HEAD/share/emacs/24.0.50/lisp/org/org-table
~/prog/eprojects/org-mode/lisp/org-src hides /usr/local/Cellar/emacs/HEAD/share/emacs/24.0.50/lisp/org/org-src
~/prog/eprojects/org-mode/lisp/org-rmail hides /usr/local/Cellar/emacs/HEAD/share/emacs/24.0.50/lisp/org/org-rmail
~/prog/eprojects/org-mode/lisp/org-remember hides /usr/local/Cellar/emacs/HEAD/share/emacs/24.0.50/lisp/org/org-remember
~/prog/eprojects/org-mode/lisp/org-publish hides /usr/local/Cellar/emacs/HEAD/share/emacs/24.0.50/lisp/org/org-publish
~/prog/eprojects/org-mode/lisp/org-protocol hides /usr/local/Cellar/emacs/HEAD/share/emacs/24.0.50/lisp/org/org-protocol
~/prog/eprojects/org-mode/lisp/org-plot hides /usr/local/Cellar/emacs/HEAD/share/emacs/24.0.50/lisp/org/org-plot
~/prog/eprojects/org-mode/lisp/org-mouse hides /usr/local/Cellar/emacs/HEAD/share/emacs/24.0.50/lisp/org/org-mouse
~/prog/eprojects/org-mode/lisp/org-mobile hides /usr/local/Cellar/emacs/HEAD/share/emacs/24.0.50/lisp/org/org-mobile
~/prog/eprojects/org-mode/lisp/org-mks hides /usr/local/Cellar/emacs/HEAD/share/emacs/24.0.50/lisp/org/org-mks
~/prog/eprojects/org-mode/lisp/org-mhe hides /usr/local/Cellar/emacs/HEAD/share/emacs/24.0.50/lisp/org/org-mhe
~/prog/eprojects/org-mode/lisp/org-mew hides /usr/local/Cellar/emacs/HEAD/share/emacs/24.0.50/lisp/org/org-mew
~/prog/eprojects/org-mode/lisp/org-macs hides /usr/local/Cellar/emacs/HEAD/share/emacs/24.0.50/lisp/org/org-macs
~/prog/eprojects/org-mode/lisp/org-mac-message hides /usr/local/Cellar/emacs/HEAD/share/emacs/24.0.50/lisp/org/org-mac-message
~/prog/eprojects/org-mode/lisp/org-list hides /usr/local/Cellar/emacs/HEAD/share/emacs/24.0.50/lisp/org/org-list
~/prog/eprojects/org-mode/lisp/org-latex hides /usr/local/Cellar/emacs/HEAD/share/emacs/24.0.50/lisp/org/org-latex
~/prog/eprojects/org-mode/lisp/org-jsinfo hides /usr/local/Cellar/emacs/HEAD/share/emacs/24.0.50/lisp/org/org-jsinfo
~/prog/eprojects/org-mode/lisp/org-irc hides /usr/local/Cellar/emacs/HEAD/share/emacs/24.0.50/lisp/org/org-irc
~/prog/eprojects/org-mode/lisp/org-install hides /usr/local/Cellar/emacs/HEAD/share/emacs/24.0.50/lisp/org/org-install
~/prog/eprojects/org-mode/lisp/org-inlinetask hides /usr/local/Cellar/emacs/HEAD/share/emacs/24.0.50/lisp/org/org-inlinetask
~/prog/eprojects/org-mode/lisp/org-info hides /usr/local/Cellar/emacs/HEAD/share/emacs/24.0.50/lisp/org/org-info
~/prog/eprojects/org-mode/lisp/org-indent hides /usr/local/Cellar/emacs/HEAD/share/emacs/24.0.50/lisp/org/org-indent
~/prog/eprojects/org-mode/lisp/org-id hides /usr/local/Cellar/emacs/HEAD/share/emacs/24.0.50/lisp/org/org-id
~/prog/eprojects/org-mode/lisp/org-icalendar hides /usr/local/Cellar/emacs/HEAD/share/emacs/24.0.50/lisp/org/org-icalendar
~/prog/eprojects/org-mode/lisp/org-html hides /usr/local/Cellar/emacs/HEAD/share/emacs/24.0.50/lisp/org/org-html
~/prog/eprojects/org-mode/lisp/org-habit hides /usr/local/Cellar/emacs/HEAD/share/emacs/24.0.50/lisp/org/org-habit
~/prog/eprojects/org-mode/lisp/org-gnus hides /usr/local/Cellar/emacs/HEAD/share/emacs/24.0.50/lisp/org/org-gnus
~/prog/eprojects/org-mode/lisp/org-freemind hides /usr/local/Cellar/emacs/HEAD/share/emacs/24.0.50/lisp/org/org-freemind
~/prog/eprojects/org-mode/lisp/org-footnote hides /usr/local/Cellar/emacs/HEAD/share/emacs/24.0.50/lisp/org/org-footnote
~/prog/eprojects/org-mode/lisp/org-feed hides /usr/local/Cellar/emacs/HEAD/share/emacs/24.0.50/lisp/org/org-feed
~/prog/eprojects/org-mode/lisp/org-faces hides /usr/local/Cellar/emacs/HEAD/share/emacs/24.0.50/lisp/org/org-faces
~/prog/eprojects/org-mode/lisp/org-exp hides /usr/local/Cellar/emacs/HEAD/share/emacs/24.0.50/lisp/org/org-exp
~/prog/eprojects/org-mode/lisp/org-exp-blocks hides /usr/local/Cellar/emacs/HEAD/share/emacs/24.0.50/lisp/org/org-exp-blocks
~/prog/eprojects/org-mode/lisp/org-entities hides /usr/local/Cellar/emacs/HEAD/share/emacs/24.0.50/lisp/org/org-entities
~/prog/eprojects/org-mode/lisp/org-docview hides /usr/local/Cellar/emacs/HEAD/share/emacs/24.0.50/lisp/org/org-docview
~/prog/eprojects/org-mode/lisp/org-docbook hides /usr/local/Cellar/emacs/HEAD/share/emacs/24.0.50/lisp/org/org-docbook
~/prog/eprojects/org-mode/lisp/org-datetree hides /usr/local/Cellar/emacs/HEAD/share/emacs/24.0.50/lisp/org/org-datetree
~/prog/eprojects/org-mode/lisp/org-ctags hides /usr/local/Cellar/emacs/HEAD/share/emacs/24.0.50/lisp/org/org-ctags
~/prog/eprojects/org-mode/lisp/org-crypt hides /usr/local/Cellar/emacs/HEAD/share/emacs/24.0.50/lisp/org/org-crypt
~/prog/eprojects/org-mode/lisp/org-compat hides /usr/local/Cellar/emacs/HEAD/share/emacs/24.0.50/lisp/org/org-compat
~/prog/eprojects/org-mode/lisp/org-colview hides /usr/local/Cellar/emacs/HEAD/share/emacs/24.0.50/lisp/org/org-colview
~/prog/eprojects/org-mode/lisp/org-clock hides /usr/local/Cellar/emacs/HEAD/share/emacs/24.0.50/lisp/org/org-clock
~/prog/eprojects/org-mode/lisp/org-capture hides /usr/local/Cellar/emacs/HEAD/share/emacs/24.0.50/lisp/org/org-capture
~/prog/eprojects/org-mode/lisp/org-bibtex hides /usr/local/Cellar/emacs/HEAD/share/emacs/24.0.50/lisp/org/org-bibtex
~/prog/eprojects/org-mode/lisp/org-beamer hides /usr/local/Cellar/emacs/HEAD/share/emacs/24.0.50/lisp/org/org-beamer
~/prog/eprojects/org-mode/lisp/org-bbdb hides /usr/local/Cellar/emacs/HEAD/share/emacs/24.0.50/lisp/org/org-bbdb
~/prog/eprojects/org-mode/lisp/org-attach hides /usr/local/Cellar/emacs/HEAD/share/emacs/24.0.50/lisp/org/org-attach
~/prog/eprojects/org-mode/lisp/org-ascii hides /usr/local/Cellar/emacs/HEAD/share/emacs/24.0.50/lisp/org/org-ascii
~/prog/eprojects/org-mode/lisp/org-archive hides /usr/local/Cellar/emacs/HEAD/share/emacs/24.0.50/lisp/org/org-archive
~/prog/eprojects/org-mode/lisp/org-agenda hides /usr/local/Cellar/emacs/HEAD/share/emacs/24.0.50/lisp/org/org-agenda
~/prog/eprojects/org-mode/lisp/ob hides /usr/local/Cellar/emacs/HEAD/share/emacs/24.0.50/lisp/org/ob
~/prog/eprojects/org-mode/lisp/ob-tangle hides /usr/local/Cellar/emacs/HEAD/share/emacs/24.0.50/lisp/org/ob-tangle
~/prog/eprojects/org-mode/lisp/ob-table hides /usr/local/Cellar/emacs/HEAD/share/emacs/24.0.50/lisp/org/ob-table
~/prog/eprojects/org-mode/lisp/ob-sqlite hides /usr/local/Cellar/emacs/HEAD/share/emacs/24.0.50/lisp/org/ob-sqlite
~/prog/eprojects/org-mode/lisp/ob-sql hides /usr/local/Cellar/emacs/HEAD/share/emacs/24.0.50/lisp/org/ob-sql
~/prog/eprojects/org-mode/lisp/ob-sh hides /usr/local/Cellar/emacs/HEAD/share/emacs/24.0.50/lisp/org/ob-sh
~/prog/eprojects/org-mode/lisp/ob-screen hides /usr/local/Cellar/emacs/HEAD/share/emacs/24.0.50/lisp/org/ob-screen
~/prog/eprojects/org-mode/lisp/ob-scheme hides /usr/local/Cellar/emacs/HEAD/share/emacs/24.0.50/lisp/org/ob-scheme
~/prog/eprojects/org-mode/lisp/ob-sass hides /usr/local/Cellar/emacs/HEAD/share/emacs/24.0.50/lisp/org/ob-sass
~/prog/eprojects/org-mode/lisp/ob-ruby hides /usr/local/Cellar/emacs/HEAD/share/emacs/24.0.50/lisp/org/ob-ruby
~/prog/eprojects/org-mode/lisp/ob-ref hides /usr/local/Cellar/emacs/HEAD/share/emacs/24.0.50/lisp/org/ob-ref
~/prog/eprojects/org-mode/lisp/ob-R hides /usr/local/Cellar/emacs/HEAD/share/emacs/24.0.50/lisp/org/ob-R
~/prog/eprojects/org-mode/lisp/ob-python hides /usr/local/Cellar/emacs/HEAD/share/emacs/24.0.50/lisp/org/ob-python
~/prog/eprojects/org-mode/lisp/ob-plantuml hides /usr/local/Cellar/emacs/HEAD/share/emacs/24.0.50/lisp/org/ob-plantuml
~/prog/eprojects/org-mode/lisp/ob-perl hides /usr/local/Cellar/emacs/HEAD/share/emacs/24.0.50/lisp/org/ob-perl
~/prog/eprojects/org-mode/lisp/ob-org hides /usr/local/Cellar/emacs/HEAD/share/emacs/24.0.50/lisp/org/ob-org
~/prog/eprojects/org-mode/lisp/ob-octave hides /usr/local/Cellar/emacs/HEAD/share/emacs/24.0.50/lisp/org/ob-octave
~/prog/eprojects/org-mode/lisp/ob-ocaml hides /usr/local/Cellar/emacs/HEAD/share/emacs/24.0.50/lisp/org/ob-ocaml
~/prog/eprojects/org-mode/lisp/ob-mscgen hides /usr/local/Cellar/emacs/HEAD/share/emacs/24.0.50/lisp/org/ob-mscgen
~/prog/eprojects/org-mode/lisp/ob-matlab hides /usr/local/Cellar/emacs/HEAD/share/emacs/24.0.50/lisp/org/ob-matlab
~/prog/eprojects/org-mode/lisp/ob-lob hides /usr/local/Cellar/emacs/HEAD/share/emacs/24.0.50/lisp/org/ob-lob
~/prog/eprojects/org-mode/lisp/ob-lisp hides /usr/local/Cellar/emacs/HEAD/share/emacs/24.0.50/lisp/org/ob-lisp
~/prog/eprojects/org-mode/lisp/ob-ledger hides /usr/local/Cellar/emacs/HEAD/share/emacs/24.0.50/lisp/org/ob-ledger
~/prog/eprojects/org-mode/lisp/ob-latex hides /usr/local/Cellar/emacs/HEAD/share/emacs/24.0.50/lisp/org/ob-latex
~/prog/eprojects/org-mode/lisp/ob-keys hides /usr/local/Cellar/emacs/HEAD/share/emacs/24.0.50/lisp/org/ob-keys
~/prog/eprojects/org-mode/lisp/ob-js hides /usr/local/Cellar/emacs/HEAD/share/emacs/24.0.50/lisp/org/ob-js
~/prog/eprojects/org-mode/lisp/ob-haskell hides /usr/local/Cellar/emacs/HEAD/share/emacs/24.0.50/lisp/org/ob-haskell
~/prog/eprojects/org-mode/lisp/ob-gnuplot hides /usr/local/Cellar/emacs/HEAD/share/emacs/24.0.50/lisp/org/ob-gnuplot
~/prog/eprojects/org-mode/lisp/ob-exp hides /usr/local/Cellar/emacs/HEAD/share/emacs/24.0.50/lisp/org/ob-exp
~/prog/eprojects/org-mode/lisp/ob-eval hides /usr/local/Cellar/emacs/HEAD/share/emacs/24.0.50/lisp/org/ob-eval
~/prog/eprojects/org-mode/lisp/ob-emacs-lisp hides /usr/local/Cellar/emacs/HEAD/share/emacs/24.0.50/lisp/org/ob-emacs-lisp
~/prog/eprojects/org-mode/lisp/ob-dot hides /usr/local/Cellar/emacs/HEAD/share/emacs/24.0.50/lisp/org/ob-dot
~/prog/eprojects/org-mode/lisp/ob-ditaa hides /usr/local/Cellar/emacs/HEAD/share/emacs/24.0.50/lisp/org/ob-ditaa
~/prog/eprojects/org-mode/lisp/ob-css hides /usr/local/Cellar/emacs/HEAD/share/emacs/24.0.50/lisp/org/ob-css
~/prog/eprojects/org-mode/lisp/ob-comint hides /usr/local/Cellar/emacs/HEAD/share/emacs/24.0.50/lisp/org/ob-comint
~/prog/eprojects/org-mode/lisp/ob-clojure hides /usr/local/Cellar/emacs/HEAD/share/emacs/24.0.50/lisp/org/ob-clojure
~/prog/eprojects/org-mode/lisp/ob-calc hides /usr/local/Cellar/emacs/HEAD/share/emacs/24.0.50/lisp/org/ob-calc
~/prog/eprojects/org-mode/lisp/ob-C hides /usr/local/Cellar/emacs/HEAD/share/emacs/24.0.50/lisp/org/ob-C
~/prog/eprojects/org-mode/lisp/ob-asymptote hides /usr/local/Cellar/emacs/HEAD/share/emacs/24.0.50/lisp/org/ob-asymptote

Features:
(shadow mail-extr message rfc822 mml mml-sec mm-decode mm-bodies
mm-encode mail-parse rfc2231 rfc2047 rfc2045 ietf-drums mm-util
mail-prsvr mailabbrev mail-utils gmm-utils mailheader emacsbug org-id
tabify diary-lib diary-loaddefs cal-iso org-mobile vc-git org-wl org-w3m
org-vm org-rmail org-mhe org-mew org-irc org-jsinfo org-infojs org-html
org-info org-gnus org-docview org-bibtex org-bbdb tramp-cache tramp
tramp-compat auth-source netrc gnus-util password-cache format-spec
tramp-loaddefs erlang-start color-theme dustin-timer dustin org-generic
org-exp ob-exp org-exp-blocks org-agenda org-remember org-datetree org
byte-opt warnings bytecomp byte-compile ob-emacs-lisp ob-tangle ob-ref
ob-lob ob-table org-footnote org-src ob-comint comint ob-keys ob ob-eval
org-complete org-list org-faces org-compat org-entities org-macs
time-date noutline outline growl hmac-md5 hex-util bindat magit
ediff-merg ediff-diff ediff-wind ediff-help ediff-util ediff-mult
ediff-init ediff server diff-mode log-edit ring pcvs-util add-log
magit-key-mode assoc planner advice help-fns advice-preload cal-menu
calendar cal-loaddefs sort muse-html muse-xml-common muse-colors
easy-mmode pcomplete cus-edit cus-start cus-load muse-publish
muse-project muse-protocols info easymenu muse-regexps wid-edit derived
muse muse-nested-tags muse-mode remember cl battery time ido edmacro
kmacro cc-styles cc-align cc-engine cc-vars cc-defs regexp-opt paren
tooltip ediff-hook vc-hooks lisp-float-type mwheel ns-win tool-bar dnd
fontset image fringe lisp-mode register page menu-bar rfn-eshadow timer
select scroll-bar mouse jit-lock font-lock syntax facemenu font-core
frame cham georgian utf-8-lang misc-lang vietnamese tibetan thai
tai-viet lao korean japanese hebrew greek romanian slovak czech european
ethiopic indian cyrillic chinese case-table epa-hook jka-cmpr-hook help
simple abbrev loaddefs button minibuffer faces cus-face files
text-properties overlay md5 base64 format env code-pages mule custom
widget hashtable-print-readable backquote make-network-process ns
multi-tty emacs)

--
dustin sallings