(newline 1) not equal to (insert "\n") longlines.el

Aidan Kehoe kehoea
Mon Nov 27 10:27:31 EST 2006


 Ar an seacht? l? is fiche de m? na Samhain, scr?obh Uwe Brauer: 

 > I am using longlines and noted that if I insert a file which has
 > longlines activated 
 > 
 > (insert "\n") does not insert a newline 
 > while 
 > (newline 1) does
 > 
 > Can somebody please tell me what is the difference between the 2 ways
 > of inserting a newline.

We don?t ship longlines.el and the same thing happens with GNU Emacs, so
future questions on its behaviour would probably be more usefully addressed
to the package?s authors. The difference is, from the docstring of ?newline?:

    The newline is marked with the text-property `hard'.
    With optional arg N, insert that many newlines.
    In Auto Fill mode, if no numeric arg, break the preceding line if it's long."

and indeed (progn (insert "\n") (put-text-property (1- (point)) (point) 'hard 't))
successfully inserts a newline. 

-- 
Santa Maradona, priez pour moi!



More information about the XEmacs-Beta mailing list