Subject: bug#10927: 24.0.93; propose newline-and-indent to have numeric argument

From: sindikat <[email-masked]>
Date: Fri, 02 Mar 2012 15:33:40 +0600

Currently newline-and-indent does not accept numeric agrument,
thus, for example C-u 5 M-x newline-and-indent does not create 5
newlines, while C-u 5 M-x newline does

I want to propose this function to accept numeric argument. It is useful
when one has newline-and-indent bound to RET.

Also if next-line-add-newlines set to true, it is helpful to enable C-u
5 M-x next-line to create 5 newlines, when end of buffer is met.

In GNU Emacs 24.0.93.1 (x86_64-pc-linux-gnu, GTK+ Version 3.2.3)
 of 2012-02-22 on zelenka, modified by Debian
 (emacs-snapshot package, version 2:20120222-1)
Windowing system distributor `The X.Org Foundation', version 11.0.11103901
Configured using:
 `configure '--build' 'x86_64-linux-gnu' '--host' 'x86_64-linux-gnu'
 '--prefix=/usr' '--sharedstatedir=/var/lib' '--libexecdir=/usr/lib'
 '--localstatedir=/var' '--infodir=/usr/share/info'
 '--mandir=/usr/share/man' '--with-pop=yes'
 '--enable-locallisppath=/etc/emacs-snapshot:/etc/emacs:/usr/local/share/emacs/24.0.93/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/24.0.93/site-lisp:/usr/share/emacs/site-lisp'
 '--without-compress-info' '--with-crt-dir=/usr/lib/x86_64-linux-gnu/'
 '--with-x=yes' '--with-x-toolkit=gtk3' '--with-imagemagick=yes'
 'build_alias=x86_64-linux-gnu' 'host_alias=x86_64-linux-gnu'
 'CFLAGS=-DDEBIAN -DSITELOAD_PURESIZE_EXTRA=5000 -g -O2''

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: en_US.UTF-8
  value of $XMODIFIERS: nil
  locale-coding-system: utf-8-unix
  default enable-multibyte-characters: t

Major mode: Emacs-Lisp

Minor modes in effect:
  ido-everywhere: t
  global-linum-mode: t
  linum-mode: t
  show-paren-mode: t
  shell-dirtrack-mode: t
  ergoemacs-mode: t
  delete-selection-mode: t
  tooltip-mode: t
  mouse-wheel-mode: t
  use-hard-newlines: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  column-number-mode: t
  line-number-mode: t
  global-visual-line-mode: t
  visual-line-mode: t
  transient-mark-mode: t

Recent input:
C-h C-p C-h p q M-o n e w l i n e M-o M-o M-o <return> 
C-w C-h i <tab> <return> q C-h i p l l <tab> M-a p 
a c k <tab> l i <tab> <return> q q M-e C-u 5 <return> 
C-u 5 <return> C-u 5 M-a l n <backspace> <backspace> 
n e <tab> w <tab> l i <tab> - i n <backspace> <backspace> 
<tab> <return> <backspace> <backspace> <backspace> 
M-z M-z M-z M-z M-z M-z M-z M-z M-z M-z M-z M-z M-z 
M-z M-z M-z M-z M-z M-u M-y M-i M-SPC M-y M-y M-y M-y 
M-c C-h f n e w <tab> l <tab> = <backspace> - <tab> 
<return> M-3 C-h v u s e <tab> - h a r <tab> <return> 
M-r M-e M-e M-e M-e M-e M-e M-e <return> q <tab> <return> 
q M-f M-a u s e <tab> <return> y M-z M-z M-z M-z M-z 
M-z M-z M-z M-z M-z M-z M-z M-z M-z M-z M-z M-z M-z 
M-z M-z M-z M-z M-z M-z M-z M-z M-a u s e <tab> <return> 
M-a M-u M-u M-e <return> y C-u 5 <return> C-u 5 <return> 
M-z M-z M-a r e p <tab> o r t <tab> <return> C-g M-a 
p a c k <tab> l i <tab> <return> M-o d e b b M-i M-n 
<return> M-r <tab> <return> y q g M-e q M-a d e <tab> 
b <tab> b <tab> <return> <tab> <tab> <backspace> <tab> 
<backspace> <backspace> <backspace> <backspace> <backspace> 
<backspace> <tab> n i <backspace> o r <tab> <return> 
<tab> <backspace> 1 3 3 9 <return> M-o n e w l i n 
e M-o M-o M-o <return> <return> <return> SPC SPC SPC 
SPC SPC SPC SPC SPC q q y M-0 M-a r e p <tab> o <tab> 
r <tab> <return>

Recent messages:
Reading /home/sindikat/.newsrc.eld...
Generating the cache active file...done
Checking new news...
Reading active file via nndraft...done
Checking new news...done
No Gnus is good news
Opening nndoc server on /tmp/gnus-temp-group-2885CTQ-ephemeral...done
Are you sure you want to quit reading news? (y or n)  y
(No changes need to be saved)
Making completion list... [2 times]

Load-path shadows:
/usr/share/emacs/24.0.93/site-lisp/debian-startup hides /usr/share/emacs/site-lisp/debian-startup
/home/sindikat/.emacs.d/elpa/org-20120216/ob-sql hides /usr/share/emacs/24.0.93/lisp/org/ob-sql
/home/sindikat/.emacs.d/elpa/org-20120216/org-info hides /usr/share/emacs/24.0.93/lisp/org/org-info
/home/sindikat/.emacs.d/elpa/org-20120216/ob-asymptote hides /usr/share/emacs/24.0.93/lisp/org/ob-asymptote
/home/sindikat/.emacs.d/elpa/org-20120216/org-taskjuggler hides /usr/share/emacs/24.0.93/lisp/org/org-taskjuggler
/home/sindikat/.emacs.d/elpa/org-20120216/org-list hides /usr/share/emacs/24.0.93/lisp/org/org-list
/home/sindikat/.emacs.d/elpa/org-20120216/ob-js hides /usr/share/emacs/24.0.93/lisp/org/ob-js
/home/sindikat/.emacs.d/elpa/org-20120216/ob-ocaml hides /usr/share/emacs/24.0.93/lisp/org/ob-ocaml
/home/sindikat/.emacs.d/elpa/org-20120216/org-remember hides /usr/share/emacs/24.0.93/lisp/org/org-remember
/home/sindikat/.emacs.d/elpa/org-20120216/ob-ledger hides /usr/share/emacs/24.0.93/lisp/org/ob-ledger
/home/sindikat/.emacs.d/elpa/org-20120216/org-habit hides /usr/share/emacs/24.0.93/lisp/org/org-habit
/home/sindikat/.emacs.d/elpa/org-20120216/org-inlinetask hides /usr/share/emacs/24.0.93/lisp/org/org-inlinetask
/home/sindikat/.emacs.d/elpa/org-20120216/org-vm hides /usr/share/emacs/24.0.93/lisp/org/org-vm
/home/sindikat/.emacs.d/elpa/org-20120216/ob-sass hides /usr/share/emacs/24.0.93/lisp/org/ob-sass
/home/sindikat/.emacs.d/elpa/org-20120216/ob-picolisp hides /usr/share/emacs/24.0.93/lisp/org/ob-picolisp
/home/sindikat/.emacs.d/elpa/org-20120216/ob-clojure hides /usr/share/emacs/24.0.93/lisp/org/ob-clojure
/home/sindikat/.emacs.d/elpa/org-20120216/org hides /usr/share/emacs/24.0.93/lisp/org/org
/home/sindikat/.emacs.d/elpa/org-20120216/org-beamer hides /usr/share/emacs/24.0.93/lisp/org/org-beamer
/home/sindikat/.emacs.d/elpa/org-20120216/ob-ref hides /usr/share/emacs/24.0.93/lisp/org/ob-ref
/home/sindikat/.emacs.d/elpa/org-20120216/org-footnote hides /usr/share/emacs/24.0.93/lisp/org/org-footnote
/home/sindikat/.emacs.d/elpa/org-20120216/ob hides /usr/share/emacs/24.0.93/lisp/org/ob
/home/sindikat/.emacs.d/elpa/org-20120216/org-gnus hides /usr/share/emacs/24.0.93/lisp/org/org-gnus
/home/sindikat/.emacs.d/elpa/org-20120216/org-capture hides /usr/share/emacs/24.0.93/lisp/org/org-capture
/home/sindikat/.emacs.d/elpa/org-20120216/ob-shen hides /usr/share/emacs/24.0.93/lisp/org/ob-shen
/home/sindikat/.emacs.d/elpa/org-20120216/org-src hides /usr/share/emacs/24.0.93/lisp/org/org-src
/home/sindikat/.emacs.d/elpa/org-20120216/org-freemind hides /usr/share/emacs/24.0.93/lisp/org/org-freemind
/home/sindikat/.emacs.d/elpa/org-20120216/org-indent hides /usr/share/emacs/24.0.93/lisp/org/org-indent
/home/sindikat/.emacs.d/elpa/org-20120216/org-w3m hides /usr/share/emacs/24.0.93/lisp/org/org-w3m
/home/sindikat/.emacs.d/elpa/org-20120216/org-lparse hides /usr/share/emacs/24.0.93/lisp/org/org-lparse
/home/sindikat/.emacs.d/elpa/org-20120216/ob-calc hides /usr/share/emacs/24.0.93/lisp/org/ob-calc
/home/sindikat/.emacs.d/elpa/org-20120216/ob-awk hides /usr/share/emacs/24.0.93/lisp/org/ob-awk
/home/sindikat/.emacs.d/elpa/org-20120216/org-odt hides /usr/share/emacs/24.0.93/lisp/org/org-odt
/home/sindikat/.emacs.d/elpa/org-20120216/org-protocol hides /usr/share/emacs/24.0.93/lisp/org/org-protocol
/home/sindikat/.emacs.d/elpa/org-20120216/org-datetree hides /usr/share/emacs/24.0.93/lisp/org/org-datetree
/home/sindikat/.emacs.d/elpa/org-20120216/org-ascii hides /usr/share/emacs/24.0.93/lisp/org/org-ascii
/home/sindikat/.emacs.d/elpa/org-20120216/ob-css hides /usr/share/emacs/24.0.93/lisp/org/ob-css
/home/sindikat/.emacs.d/elpa/org-20120216/ob-tangle hides /usr/share/emacs/24.0.93/lisp/org/ob-tangle
/home/sindikat/.emacs.d/elpa/org-20120216/org-agenda hides /usr/share/emacs/24.0.93/lisp/org/org-agenda
/home/sindikat/.emacs.d/elpa/org-20120216/org-docview hides /usr/share/emacs/24.0.93/lisp/org/org-docview
/home/sindikat/.emacs.d/elpa/org-20120216/org-latex hides /usr/share/emacs/24.0.93/lisp/org/org-latex
/home/sindikat/.emacs.d/elpa/org-20120216/org-entities hides /usr/share/emacs/24.0.93/lisp/org/org-entities
/home/sindikat/.emacs.d/elpa/org-20120216/org-bbdb hides /usr/share/emacs/24.0.93/lisp/org/org-bbdb
/home/sindikat/.emacs.d/elpa/org-20120216/org-macs hides /usr/share/emacs/24.0.93/lisp/org/org-macs
/home/sindikat/.emacs.d/elpa/org-20120216/org-mouse hides /usr/share/emacs/24.0.93/lisp/org/org-mouse
/home/sindikat/.emacs.d/elpa/org-20120216/ob-octave hides /usr/share/emacs/24.0.93/lisp/org/ob-octave
/home/sindikat/.emacs.d/elpa/org-20120216/org-pcomplete hides /usr/share/emacs/24.0.93/lisp/org/org-pcomplete
/home/sindikat/.emacs.d/elpa/org-20120216/org-wl hides /usr/share/emacs/24.0.93/lisp/org/org-wl
/home/sindikat/.emacs.d/elpa/org-20120216/ob-keys hides /usr/share/emacs/24.0.93/lisp/org/ob-keys
/home/sindikat/.emacs.d/elpa/org-20120216/ob-perl hides /usr/share/emacs/24.0.93/lisp/org/ob-perl
/home/sindikat/.emacs.d/elpa/org-20120216/ob-sqlite hides /usr/share/emacs/24.0.93/lisp/org/ob-sqlite
/home/sindikat/.emacs.d/elpa/org-20120216/org-ctags hides /usr/share/emacs/24.0.93/lisp/org/org-ctags
/home/sindikat/.emacs.d/elpa/org-20120216/ob-ruby hides /usr/share/emacs/24.0.93/lisp/org/ob-ruby
/home/sindikat/.emacs.d/elpa/org-20120216/org-attach hides /usr/share/emacs/24.0.93/lisp/org/org-attach
/home/sindikat/.emacs.d/elpa/org-20120216/ob-scheme hides /usr/share/emacs/24.0.93/lisp/org/ob-scheme
/home/sindikat/.emacs.d/elpa/org-20120216/org-mks hides /usr/share/emacs/24.0.93/lisp/org/org-mks
/home/sindikat/.emacs.d/elpa/org-20120216/org-plot hides /usr/share/emacs/24.0.93/lisp/org/org-plot
/home/sindikat/.emacs.d/elpa/org-20120216/ob-lisp hides /usr/share/emacs/24.0.93/lisp/org/ob-lisp
/home/sindikat/.emacs.d/elpa/org-20120216/org-timer hides /usr/share/emacs/24.0.93/lisp/org/org-timer
/home/sindikat/.emacs.d/elpa/org-20120216/org-mew hides /usr/share/emacs/24.0.93/lisp/org/org-mew
/home/sindikat/.emacs.d/elpa/org-20120216/org-icalendar hides /usr/share/emacs/24.0.93/lisp/org/org-icalendar
/home/sindikat/.emacs.d/elpa/org-20120216/ob-maxima hides /usr/share/emacs/24.0.93/lisp/org/ob-maxima
/home/sindikat/.emacs.d/elpa/org-20120216/ob-ditaa hides /usr/share/emacs/24.0.93/lisp/org/ob-ditaa
/home/sindikat/.emacs.d/elpa/org-20120216/org-bibtex hides /usr/share/emacs/24.0.93/lisp/org/org-bibtex
/home/sindikat/.emacs.d/elpa/org-20120216/ob-sh hides /usr/share/emacs/24.0.93/lisp/org/ob-sh
/home/sindikat/.emacs.d/elpa/org-20120216/org-mobile hides /usr/share/emacs/24.0.93/lisp/org/org-mobile
/home/sindikat/.emacs.d/elpa/org-20120216/org-docbook hides /usr/share/emacs/24.0.93/lisp/org/org-docbook
/home/sindikat/.emacs.d/elpa/org-20120216/org-publish hides /usr/share/emacs/24.0.93/lisp/org/org-publish
/home/sindikat/.emacs.d/elpa/org-20120216/org-special-blocks hides /usr/share/emacs/24.0.93/lisp/org/org-special-blocks
/home/sindikat/.emacs.d/elpa/org-20120216/ob-emacs-lisp hides /usr/share/emacs/24.0.93/lisp/org/ob-emacs-lisp
/home/sindikat/.emacs.d/elpa/org-20120216/org-compat hides /usr/share/emacs/24.0.93/lisp/org/org-compat
/home/sindikat/.emacs.d/elpa/org-20120216/org-table hides /usr/share/emacs/24.0.93/lisp/org/org-table
/home/sindikat/.emacs.d/elpa/org-20120216/ob-comint hides /usr/share/emacs/24.0.93/lisp/org/ob-comint
/home/sindikat/.emacs.d/elpa/org-20120216/ob-haskell hides /usr/share/emacs/24.0.93/lisp/org/ob-haskell
/home/sindikat/.emacs.d/elpa/org-20120216/ob-gnuplot hides /usr/share/emacs/24.0.93/lisp/org/ob-gnuplot
/home/sindikat/.emacs.d/elpa/org-20120216/org-faces hides /usr/share/emacs/24.0.93/lisp/org/org-faces
/home/sindikat/.emacs.d/elpa/org-20120216/org-html hides /usr/share/emacs/24.0.93/lisp/org/org-html
/home/sindikat/.emacs.d/elpa/org-20120216/org-colview hides /usr/share/emacs/24.0.93/lisp/org/org-colview
/home/sindikat/.emacs.d/elpa/org-20120216/org-exp-blocks hides /usr/share/emacs/24.0.93/lisp/org/org-exp-blocks
/home/sindikat/.emacs.d/elpa/org-20120216/org-exp hides /usr/share/emacs/24.0.93/lisp/org/org-exp
/home/sindikat/.emacs.d/elpa/org-20120216/org-crypt hides /usr/share/emacs/24.0.93/lisp/org/org-crypt
/home/sindikat/.emacs.d/elpa/org-20120216/org-irc hides /usr/share/emacs/24.0.93/lisp/org/org-irc
/home/sindikat/.emacs.d/elpa/org-20120216/org-rmail hides /usr/share/emacs/24.0.93/lisp/org/org-rmail
/home/sindikat/.emacs.d/elpa/org-20120216/ob-plantuml hides /usr/share/emacs/24.0.93/lisp/org/ob-plantuml
/home/sindikat/.emacs.d/elpa/org-20120216/ob-screen hides /usr/share/emacs/24.0.93/lisp/org/ob-screen
/home/sindikat/.emacs.d/elpa/org-20120216/ob-lob hides /usr/share/emacs/24.0.93/lisp/org/ob-lob
/home/sindikat/.emacs.d/elpa/org-20120216/ob-mscgen hides /usr/share/emacs/24.0.93/lisp/org/ob-mscgen
/home/sindikat/.emacs.d/elpa/org-20120216/org-jsinfo hides /usr/share/emacs/24.0.93/lisp/org/org-jsinfo
/home/sindikat/.emacs.d/elpa/org-20120216/ob-eval hides /usr/share/emacs/24.0.93/lisp/org/ob-eval
/home/sindikat/.emacs.d/elpa/org-20120216/org-eshell hides /usr/share/emacs/24.0.93/lisp/org/org-eshell
/home/sindikat/.emacs.d/elpa/org-20120216/ob-R hides /usr/share/emacs/24.0.93/lisp/org/ob-R
/home/sindikat/.emacs.d/elpa/org-20120216/org-xoxo hides /usr/share/emacs/24.0.93/lisp/org/org-xoxo
/home/sindikat/.emacs.d/elpa/org-20120216/org-clock hides /usr/share/emacs/24.0.93/lisp/org/org-clock
/home/sindikat/.emacs.d/elpa/org-20120216/ob-table hides /usr/share/emacs/24.0.93/lisp/org/ob-table
/home/sindikat/.emacs.d/elpa/org-20120216/org-archive hides /usr/share/emacs/24.0.93/lisp/org/org-archive
/home/sindikat/.emacs.d/elpa/org-20120216/org-mac-message hides /usr/share/emacs/24.0.93/lisp/org/org-mac-message
/home/sindikat/.emacs.d/elpa/org-20120216/ob-C hides /usr/share/emacs/24.0.93/lisp/org/ob-C
/home/sindikat/.emacs.d/elpa/org-20120216/ob-lilypond hides /usr/share/emacs/24.0.93/lisp/org/ob-lilypond
/home/sindikat/.emacs.d/elpa/org-20120216/ob-exp hides /usr/share/emacs/24.0.93/lisp/org/ob-exp
/home/sindikat/.emacs.d/elpa/org-20120216/ob-latex hides /usr/share/emacs/24.0.93/lisp/org/ob-latex
/home/sindikat/.emacs.d/elpa/org-20120216/org-id hides /usr/share/emacs/24.0.93/lisp/org/org-id
/home/sindikat/.emacs.d/elpa/org-20120216/org-feed hides /usr/share/emacs/24.0.93/lisp/org/org-feed
/home/sindikat/.emacs.d/elpa/org-20120216/org-mhe hides /usr/share/emacs/24.0.93/lisp/org/org-mhe
/home/sindikat/.emacs.d/elpa/org-20120216/ob-fortran hides /usr/share/emacs/24.0.93/lisp/org/ob-fortran
/home/sindikat/.emacs.d/elpa/org-20120216/ob-dot hides /usr/share/emacs/24.0.93/lisp/org/ob-dot
/home/sindikat/.emacs.d/elpa/org-20120216/ob-matlab hides /usr/share/emacs/24.0.93/lisp/org/ob-matlab
/home/sindikat/.emacs.d/elpa/org-20120216/ob-org hides /usr/share/emacs/24.0.93/lisp/org/ob-org
/home/sindikat/.emacs.d/elpa/org-20120216/ob-python hides /usr/share/emacs/24.0.93/lisp/org/ob-python
/home/sindikat/.emacs.d/elpa/org-20120216/ob-java hides /usr/share/emacs/24.0.93/lisp/org/ob-java

Features:
(shadow org-table nndoc crm debbugs-gnu debbugs-autoloads debbugs
soap-client compile autoload tar-mode emacsbug debug goto-addr finder
finder-inf find-func lisp-mnt multi-isearch jka-compr crisp help-mode
view rot13 shr-color color qp smiley gnus-cite sort shr mail-extr
gnus-async gnus-bcklg mule-util gnus-ml disp-table timezone parse-time
url-cache url-http url-gw url-auth url-handlers gnutls network-stream
starttls tls pop3 nndraft nnmh nnrss mm-url url url-proxy url-privacy
url-expand url-methods url-history url-cookie url-util url-parse
url-vars nnfolder nnml gnus-agent gnus-srvr gnus-score score-mode
nnvirtual gnus-msg gnus-art mm-uu mml2015 epg-config mm-view mml-smime
smime dig mailcap nntp gnus-cache gnus-sum nnoo gnus-group gnus-undo
nnmail mail-source gnus-start gnus-spec gnus-int gnus-range message
rfc822 mml mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231
mailabbrev gmm-utils mailheader gnus-win gnus gnus-ems nnheader org-w3m
org-wl org-vm org-rmail org-mhe org-mew org-irc org-jsinfo org-infojs
org-html org-info org-id org-gnus org-docview org-bibtex bibtex org-bbdb
ido linum org-publish org-exp ob-exp org-exp-blocks org-agenda slime
apropos hideshow pp thingatpt paren tramp tramp-compat shell format-spec
tramp-loaddefs smtpmail auth-source eieio gnus-util password-cache
sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils
org-install garak derived notify dbus-util assoc dbus xml tree-widget
elim wid-edit browse-url lui tracking flyspell ispell incomplete
org-depend cl org ob-emacs-lisp ob-tangle ob-ref ob-lob ob-table
org-footnote org-src ob-comint ob-keys ob ob-eval org-pcomplete
pcomplete comint ansi-color ring org-list org-faces org-compat
org-entities org-macs noutline outline regexp-opt cal-menu calendar
cal-loaddefs ergoemacs-mode easy-mmode cua-base edmacro kmacro byte-opt
warnings bytecomp byte-compile cconv macroexp advice help-fns
advice-preload delsel auctex-autoloads tex-site clojure-mode-autoloads
clojure-project-mode-autoloads clojurescript-mode-autoloads
coffee-mode-autoloads color-theme-autoloads ergoemacs-mode-autoloads
find-file-in-project-autoloads idle-highlight-mode-autoloads
ido-ubiquitous-autoloads jabber-autoloads magit-autoloads org-autoloads
info easymenu paredit-autoloads project-mode-autoloads
levenshtein-autoloads redo+-autoloads slime-autoloads smex-autoloads
xml-rpc-autoloads package tabulated-list time-date tooltip ediff-hook
vc-hooks lisp-float-type mwheel x-win x-dnd 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 minibuffer loaddefs button faces cus-face files text-properties
overlay sha1 md5 base64 format env code-pages mule custom widget
hashtable-print-readable backquote make-network-process dbusbind
dynamic-setting system-font-setting font-render-setting move-toolbar gtk
x-toolkit x multi-tty emacs)