unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#19946: 24.4; js-mode, indentation
@ 2015-02-25 10:09 Jostein Kjønigsen
  2016-03-19 22:13 ` Simen Heggestøyl
  0 siblings, 1 reply; 15+ messages in thread
From: Jostein Kjønigsen @ 2015-02-25 10:09 UTC (permalink / raw)
  To: 19946


To reproduce bug:

1. Open a js-file with mixed line-endings (starting with Linux, then
some windows)
2. Enable js-mode
3. Observe that SOME lines ends with ^M, some does not.
4. When a line ends with a opening curly-brace { followed by a ^M, you
   will find that the next line is not indented by js-indent-level, but
   up to the ^M + js-indent-level.

If this happens anywhere in the document, all indentation following this
point will be equally off.

While it can be argued the error was letting mixed line-endings in in
the first place, this does make sharing JS-files between Unix and
Windows-systems very hard and it would be nice is js-mode could smooth
over such issues.



In GNU Emacs 24.4.1 (i686-pc-mingw32)
 of 2014-10-24 on LEG570
Windowing system distributor `Microsoft Corp.', version 6.3.9600
Configured using:
 `configure --prefix=/c/usr'

Important settings:
  value of $LANG: NOR
  locale-coding-system: cp1252

Major mode: Javascript

Minor modes in effect:
  magit-auto-revert-mode: t
  diff-auto-refine-mode: t
  helm-occur-match-plugin-mode: t
  electric-pair-mode: t
  show-paren-mode: t
  projectile-mode: t
  which-function-mode: t
  linum-mode: t
  company-mode: t
  global-hl-line-mode: t
  global-undo-tree-mode: t
  undo-tree-mode: t
  ido-yes-or-no-mode: t
  global-auto-revert-mode: t
  delete-selection-mode: t
  shell-dirtrack-mode: t
  flycheck-mode: t
  tooltip-mode: t
  electric-indent-mode: t
  mouse-wheel-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-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  column-number-mode: t
  line-number-mode: t
  transient-mark-mode: t

Recent input:
<backspace> , SPC m a k e SPC <backspace> <backspace> 
<backspace> <backspace> <backspace> <backspace> <backspace> 
C-k C-x C-s <down> <down> <down> <down> <down-mouse-1> 
<mouse-1> <down-mouse-1> <mouse-1> <down-mouse-1> <mouse-1> 
C-s w e b - <home> <right> s e t q SPC <end> <return> 
( s e t q SPC j s - <company-dummy-event> i n d e n 
t <return> SPC 4 <end> <C-home> <wheel-down> <double-wheel-down> 
<triple-wheel-down> <wheel-up> <double-wheel-up> <triple-wheel-up> 
<wheel-down> <double-wheel-down> <wheel-down> <double-wheel-down> 
<triple-wheel-down> <triple-wheel-down> <triple-wheel-down> 
<down-mouse-1> <mouse-1> <home> ; ; <up> <home> ; ; 
C-x C-s C-x v g <down> <down> <down> <down> <down> 
s c c E m a s c : S-SPC F i x <backspace> <backspace> 
<backspace> <backspace> <backspace> <backspace> <backspace> 
c s : S-SPC F i x SPC J S - s e t t i n g s . C-c C-c 
q C-x C-k <return> <down-mouse-1> <mouse-1> <down-mouse-1> 
<mouse-1> <down-mouse-1> <mouse-1> <down-mouse-1> <mouse-1> 
<help-echo> <return> C-u 4 0 = <return> C-u 4 0 C-0 
= C-z C-u 4 0 = <return> <up> <up> C-SPC <down> <down> 
C-w <down-mouse-1> <mouse-1> <drag-n-drop> <down-mouse-1> 
<mouse-1> <drag-n-drop> M-x j s - m o <tab> <return> 
C-x C-s SPC <backspace> C-x C-s q <down-mouse-1> <mouse-1> 
C-x C-s <down-mouse-1> <mouse-1> <down-mouse-1> <mouse-1> 
<drag-n-drop> C-x C-k <return> <drag-n-drop> <drag-n-drop> 
M-x j s - m o <tab> <return> x s i n <tab> <backspace> 
<backspace> <backspace> <backspace> <down-mouse-1> 
<mouse-1> <wheel-down> <double-wheel-down> <triple-wheel-down> 
<triple-wheel-down> <triple-wheel-down> <wheel-down> 
<double-wheel-down> <triple-wheel-down> <wheel-down> 
<double-wheel-down> <triple-wheel-down> <wheel-down> 
<double-wheel-down> <wheel-down> <double-wheel-down> 
<triple-wheel-down> <wheel-down> <double-wheel-down> 
<triple-wheel-down> <triple-wheel-down> <wheel-up> 
<double-wheel-up> <triple-wheel-up> <triple-wheel-up> 
<triple-wheel-up> <triple-wheel-up> <triple-wheel-up> 
<triple-wheel-up> <triple-wheel-up> <triple-wheel-up> 
<triple-wheel-up> <triple-wheel-up> M-x e m a c s - 
u <backspace> b u <tab> <backspace> <backspace> b u 
g <tab> <wheel-up> <help-echo> <backspace> <backspace> 
<backspace> <backspace> <backspace> <backspace> <backspace> 
<backspace> <backspace> <backspace> r e p o r t - e 
m <tab> <return>

Recent messages:
Empty cache. Projectile is initializing cache...
Projectile is indexing
d:/Seven/Patches/Patch80/Clients/SM.web/Webs/CRM.Web.Development/. This
may take a while.
Quit
D:/Seven/Patches/Patch80/Clients/SM.web/Webs/CRM.Web.Development/gruntfile.js
and
d:/Seven/Patches/Patch80/Clients/SM.web/Webs/CRM.Web.Development/gruntfile.js
are the same file
'module' is not defined. [W117] [3 times]
'xsinmodule' is not defined. [W117] [2 times]
'module' is not defined. [W117]
Auto-saving...
byte-code: Beginning of buffer [3 times]
delete-backward-char: Text is read-only

Load-path shadows:
c:/Users/josteink/AppData/Roaming/.emacs.d/elpa/org-20141215/ox hides
c:/emacs/share/emacs/24.4/lisp/org/ox
c:/Users/josteink/AppData/Roaming/.emacs.d/elpa/org-20141215/ox-texinfo
hides c:/emacs/share/emacs/24.4/lisp/org/ox-texinfo
c:/Users/josteink/AppData/Roaming/.emacs.d/elpa/org-20141215/ox-publish
hides c:/emacs/share/emacs/24.4/lisp/org/ox-publish
c:/Users/josteink/AppData/Roaming/.emacs.d/elpa/org-20141215/ox-org
hides c:/emacs/share/emacs/24.4/lisp/org/ox-org
c:/Users/josteink/AppData/Roaming/.emacs.d/elpa/org-20141215/ox-odt
hides c:/emacs/share/emacs/24.4/lisp/org/ox-odt
c:/Users/josteink/AppData/Roaming/.emacs.d/elpa/org-20141215/ox-md hides
c:/emacs/share/emacs/24.4/lisp/org/ox-md
c:/Users/josteink/AppData/Roaming/.emacs.d/elpa/org-20141215/ox-man
hides c:/emacs/share/emacs/24.4/lisp/org/ox-man
c:/Users/josteink/AppData/Roaming/.emacs.d/elpa/org-20141215/ox-latex
hides c:/emacs/share/emacs/24.4/lisp/org/ox-latex
c:/Users/josteink/AppData/Roaming/.emacs.d/elpa/org-20141215/ox-icalendar
hides c:/emacs/share/emacs/24.4/lisp/org/ox-icalendar
c:/Users/josteink/AppData/Roaming/.emacs.d/elpa/org-20141215/ox-html
hides c:/emacs/share/emacs/24.4/lisp/org/ox-html
c:/Users/josteink/AppData/Roaming/.emacs.d/elpa/org-20141215/ox-beamer
hides c:/emacs/share/emacs/24.4/lisp/org/ox-beamer
c:/Users/josteink/AppData/Roaming/.emacs.d/elpa/org-20141215/ox-ascii
hides c:/emacs/share/emacs/24.4/lisp/org/ox-ascii
c:/Users/josteink/AppData/Roaming/.emacs.d/elpa/org-20141215/org hides
c:/emacs/share/emacs/24.4/lisp/org/org
c:/Users/josteink/AppData/Roaming/.emacs.d/elpa/org-20141215/org-w3m
hides c:/emacs/share/emacs/24.4/lisp/org/org-w3m
c:/Users/josteink/AppData/Roaming/.emacs.d/elpa/org-20141215/org-version
hides c:/emacs/share/emacs/24.4/lisp/org/org-version
c:/Users/josteink/AppData/Roaming/.emacs.d/elpa/org-20141215/org-timer
hides c:/emacs/share/emacs/24.4/lisp/org/org-timer
c:/Users/josteink/AppData/Roaming/.emacs.d/elpa/org-20141215/org-table
hides c:/emacs/share/emacs/24.4/lisp/org/org-table
c:/Users/josteink/AppData/Roaming/.emacs.d/elpa/org-20141215/org-src
hides c:/emacs/share/emacs/24.4/lisp/org/org-src
c:/Users/josteink/AppData/Roaming/.emacs.d/elpa/org-20141215/org-rmail
hides c:/emacs/share/emacs/24.4/lisp/org/org-rmail
c:/Users/josteink/AppData/Roaming/.emacs.d/elpa/org-20141215/org-protocol
hides c:/emacs/share/emacs/24.4/lisp/org/org-protocol
c:/Users/josteink/AppData/Roaming/.emacs.d/elpa/org-20141215/org-plot
hides c:/emacs/share/emacs/24.4/lisp/org/org-plot
c:/Users/josteink/AppData/Roaming/.emacs.d/elpa/org-20141215/org-pcomplete
hides c:/emacs/share/emacs/24.4/lisp/org/org-pcomplete
c:/Users/josteink/AppData/Roaming/.emacs.d/elpa/org-20141215/org-mouse
hides c:/emacs/share/emacs/24.4/lisp/org/org-mouse
c:/Users/josteink/AppData/Roaming/.emacs.d/elpa/org-20141215/org-mobile
hides c:/emacs/share/emacs/24.4/lisp/org/org-mobile
c:/Users/josteink/AppData/Roaming/.emacs.d/elpa/org-20141215/org-mhe
hides c:/emacs/share/emacs/24.4/lisp/org/org-mhe
c:/Users/josteink/AppData/Roaming/.emacs.d/elpa/org-20141215/org-macs
hides c:/emacs/share/emacs/24.4/lisp/org/org-macs
c:/Users/josteink/AppData/Roaming/.emacs.d/elpa/org-20141215/org-macro
hides c:/emacs/share/emacs/24.4/lisp/org/org-macro
c:/Users/josteink/AppData/Roaming/.emacs.d/elpa/org-20141215/org-loaddefs
hides c:/emacs/share/emacs/24.4/lisp/org/org-loaddefs
c:/Users/josteink/AppData/Roaming/.emacs.d/elpa/org-20141215/org-list
hides c:/emacs/share/emacs/24.4/lisp/org/org-list
c:/Users/josteink/AppData/Roaming/.emacs.d/elpa/org-20141215/org-irc
hides c:/emacs/share/emacs/24.4/lisp/org/org-irc
c:/Users/josteink/AppData/Roaming/.emacs.d/elpa/org-20141215/org-install
hides c:/emacs/share/emacs/24.4/lisp/org/org-install
c:/Users/josteink/AppData/Roaming/.emacs.d/elpa/org-20141215/org-inlinetask
hides c:/emacs/share/emacs/24.4/lisp/org/org-inlinetask
c:/Users/josteink/AppData/Roaming/.emacs.d/elpa/org-20141215/org-info
hides c:/emacs/share/emacs/24.4/lisp/org/org-info
c:/Users/josteink/AppData/Roaming/.emacs.d/elpa/org-20141215/org-indent
hides c:/emacs/share/emacs/24.4/lisp/org/org-indent
c:/Users/josteink/AppData/Roaming/.emacs.d/elpa/org-20141215/org-id
hides c:/emacs/share/emacs/24.4/lisp/org/org-id
c:/Users/josteink/AppData/Roaming/.emacs.d/elpa/org-20141215/org-habit
hides c:/emacs/share/emacs/24.4/lisp/org/org-habit
c:/Users/josteink/AppData/Roaming/.emacs.d/elpa/org-20141215/org-gnus
hides c:/emacs/share/emacs/24.4/lisp/org/org-gnus
c:/Users/josteink/AppData/Roaming/.emacs.d/elpa/org-20141215/org-footnote
hides c:/emacs/share/emacs/24.4/lisp/org/org-footnote
c:/Users/josteink/AppData/Roaming/.emacs.d/elpa/org-20141215/org-feed
hides c:/emacs/share/emacs/24.4/lisp/org/org-feed
c:/Users/josteink/AppData/Roaming/.emacs.d/elpa/org-20141215/org-faces
hides c:/emacs/share/emacs/24.4/lisp/org/org-faces
c:/Users/josteink/AppData/Roaming/.emacs.d/elpa/org-20141215/org-eshell
hides c:/emacs/share/emacs/24.4/lisp/org/org-eshell
c:/Users/josteink/AppData/Roaming/.emacs.d/elpa/org-20141215/org-entities
hides c:/emacs/share/emacs/24.4/lisp/org/org-entities
c:/Users/josteink/AppData/Roaming/.emacs.d/elpa/org-20141215/org-element
hides c:/emacs/share/emacs/24.4/lisp/org/org-element
c:/Users/josteink/AppData/Roaming/.emacs.d/elpa/org-20141215/org-docview
hides c:/emacs/share/emacs/24.4/lisp/org/org-docview
c:/Users/josteink/AppData/Roaming/.emacs.d/elpa/org-20141215/org-datetree
hides c:/emacs/share/emacs/24.4/lisp/org/org-datetree
c:/Users/josteink/AppData/Roaming/.emacs.d/elpa/org-20141215/org-ctags
hides c:/emacs/share/emacs/24.4/lisp/org/org-ctags
c:/Users/josteink/AppData/Roaming/.emacs.d/elpa/org-20141215/org-crypt
hides c:/emacs/share/emacs/24.4/lisp/org/org-crypt
c:/Users/josteink/AppData/Roaming/.emacs.d/elpa/org-20141215/org-compat
hides c:/emacs/share/emacs/24.4/lisp/org/org-compat
c:/Users/josteink/AppData/Roaming/.emacs.d/elpa/org-20141215/org-colview
hides c:/emacs/share/emacs/24.4/lisp/org/org-colview
c:/Users/josteink/AppData/Roaming/.emacs.d/elpa/org-20141215/org-clock
hides c:/emacs/share/emacs/24.4/lisp/org/org-clock
c:/Users/josteink/AppData/Roaming/.emacs.d/elpa/org-20141215/org-capture
hides c:/emacs/share/emacs/24.4/lisp/org/org-capture
c:/Users/josteink/AppData/Roaming/.emacs.d/elpa/org-20141215/org-bibtex
hides c:/emacs/share/emacs/24.4/lisp/org/org-bibtex
c:/Users/josteink/AppData/Roaming/.emacs.d/elpa/org-20141215/org-bbdb
hides c:/emacs/share/emacs/24.4/lisp/org/org-bbdb
c:/Users/josteink/AppData/Roaming/.emacs.d/elpa/org-20141215/org-attach
hides c:/emacs/share/emacs/24.4/lisp/org/org-attach
c:/Users/josteink/AppData/Roaming/.emacs.d/elpa/org-20141215/org-archive
hides c:/emacs/share/emacs/24.4/lisp/org/org-archive
c:/Users/josteink/AppData/Roaming/.emacs.d/elpa/org-20141215/org-agenda
hides c:/emacs/share/emacs/24.4/lisp/org/org-agenda
c:/Users/josteink/AppData/Roaming/.emacs.d/elpa/org-20141215/ob hides
c:/emacs/share/emacs/24.4/lisp/org/ob
c:/Users/josteink/AppData/Roaming/.emacs.d/elpa/org-20141215/ob-tangle
hides c:/emacs/share/emacs/24.4/lisp/org/ob-tangle
c:/Users/josteink/AppData/Roaming/.emacs.d/elpa/org-20141215/ob-table
hides c:/emacs/share/emacs/24.4/lisp/org/ob-table
c:/Users/josteink/AppData/Roaming/.emacs.d/elpa/org-20141215/ob-sqlite
hides c:/emacs/share/emacs/24.4/lisp/org/ob-sqlite
c:/Users/josteink/AppData/Roaming/.emacs.d/elpa/org-20141215/ob-sql
hides c:/emacs/share/emacs/24.4/lisp/org/ob-sql
c:/Users/josteink/AppData/Roaming/.emacs.d/elpa/org-20141215/ob-shen
hides c:/emacs/share/emacs/24.4/lisp/org/ob-shen
c:/Users/josteink/AppData/Roaming/.emacs.d/elpa/org-20141215/ob-sh hides
c:/emacs/share/emacs/24.4/lisp/org/ob-sh
c:/Users/josteink/AppData/Roaming/.emacs.d/elpa/org-20141215/ob-screen
hides c:/emacs/share/emacs/24.4/lisp/org/ob-screen
c:/Users/josteink/AppData/Roaming/.emacs.d/elpa/org-20141215/ob-scheme
hides c:/emacs/share/emacs/24.4/lisp/org/ob-scheme
c:/Users/josteink/AppData/Roaming/.emacs.d/elpa/org-20141215/ob-scala
hides c:/emacs/share/emacs/24.4/lisp/org/ob-scala
c:/Users/josteink/AppData/Roaming/.emacs.d/elpa/org-20141215/ob-sass
hides c:/emacs/share/emacs/24.4/lisp/org/ob-sass
c:/Users/josteink/AppData/Roaming/.emacs.d/elpa/org-20141215/ob-ruby
hides c:/emacs/share/emacs/24.4/lisp/org/ob-ruby
c:/Users/josteink/AppData/Roaming/.emacs.d/elpa/org-20141215/ob-ref
hides c:/emacs/share/emacs/24.4/lisp/org/ob-ref
c:/Users/josteink/AppData/Roaming/.emacs.d/elpa/org-20141215/ob-R hides
c:/emacs/share/emacs/24.4/lisp/org/ob-R
c:/Users/josteink/AppData/Roaming/.emacs.d/elpa/org-20141215/ob-python
hides c:/emacs/share/emacs/24.4/lisp/org/ob-python
c:/Users/josteink/AppData/Roaming/.emacs.d/elpa/org-20141215/ob-plantuml
hides c:/emacs/share/emacs/24.4/lisp/org/ob-plantuml
c:/Users/josteink/AppData/Roaming/.emacs.d/elpa/org-20141215/ob-picolisp
hides c:/emacs/share/emacs/24.4/lisp/org/ob-picolisp
c:/Users/josteink/AppData/Roaming/.emacs.d/elpa/org-20141215/ob-perl
hides c:/emacs/share/emacs/24.4/lisp/org/ob-perl
c:/Users/josteink/AppData/Roaming/.emacs.d/elpa/org-20141215/ob-org
hides c:/emacs/share/emacs/24.4/lisp/org/ob-org
c:/Users/josteink/AppData/Roaming/.emacs.d/elpa/org-20141215/ob-octave
hides c:/emacs/share/emacs/24.4/lisp/org/ob-octave
c:/Users/josteink/AppData/Roaming/.emacs.d/elpa/org-20141215/ob-ocaml
hides c:/emacs/share/emacs/24.4/lisp/org/ob-ocaml
c:/Users/josteink/AppData/Roaming/.emacs.d/elpa/org-20141215/ob-mscgen
hides c:/emacs/share/emacs/24.4/lisp/org/ob-mscgen
c:/Users/josteink/AppData/Roaming/.emacs.d/elpa/org-20141215/ob-maxima
hides c:/emacs/share/emacs/24.4/lisp/org/ob-maxima
c:/Users/josteink/AppData/Roaming/.emacs.d/elpa/org-20141215/ob-matlab
hides c:/emacs/share/emacs/24.4/lisp/org/ob-matlab
c:/Users/josteink/AppData/Roaming/.emacs.d/elpa/org-20141215/ob-makefile
hides c:/emacs/share/emacs/24.4/lisp/org/ob-makefile
c:/Users/josteink/AppData/Roaming/.emacs.d/elpa/org-20141215/ob-lob
hides c:/emacs/share/emacs/24.4/lisp/org/ob-lob
c:/Users/josteink/AppData/Roaming/.emacs.d/elpa/org-20141215/ob-lisp
hides c:/emacs/share/emacs/24.4/lisp/org/ob-lisp
c:/Users/josteink/AppData/Roaming/.emacs.d/elpa/org-20141215/ob-lilypond
hides c:/emacs/share/emacs/24.4/lisp/org/ob-lilypond
c:/Users/josteink/AppData/Roaming/.emacs.d/elpa/org-20141215/ob-ledger
hides c:/emacs/share/emacs/24.4/lisp/org/ob-ledger
c:/Users/josteink/AppData/Roaming/.emacs.d/elpa/org-20141215/ob-latex
hides c:/emacs/share/emacs/24.4/lisp/org/ob-latex
c:/Users/josteink/AppData/Roaming/.emacs.d/elpa/org-20141215/ob-keys
hides c:/emacs/share/emacs/24.4/lisp/org/ob-keys
c:/Users/josteink/AppData/Roaming/.emacs.d/elpa/org-20141215/ob-js hides
c:/emacs/share/emacs/24.4/lisp/org/ob-js
c:/Users/josteink/AppData/Roaming/.emacs.d/elpa/org-20141215/ob-java
hides c:/emacs/share/emacs/24.4/lisp/org/ob-java
c:/Users/josteink/AppData/Roaming/.emacs.d/elpa/org-20141215/ob-io hides
c:/emacs/share/emacs/24.4/lisp/org/ob-io
c:/Users/josteink/AppData/Roaming/.emacs.d/elpa/org-20141215/ob-haskell
hides c:/emacs/share/emacs/24.4/lisp/org/ob-haskell
c:/Users/josteink/AppData/Roaming/.emacs.d/elpa/org-20141215/ob-gnuplot
hides c:/emacs/share/emacs/24.4/lisp/org/ob-gnuplot
c:/Users/josteink/AppData/Roaming/.emacs.d/elpa/org-20141215/ob-fortran
hides c:/emacs/share/emacs/24.4/lisp/org/ob-fortran
c:/Users/josteink/AppData/Roaming/.emacs.d/elpa/org-20141215/ob-exp
hides c:/emacs/share/emacs/24.4/lisp/org/ob-exp
c:/Users/josteink/AppData/Roaming/.emacs.d/elpa/org-20141215/ob-eval
hides c:/emacs/share/emacs/24.4/lisp/org/ob-eval
c:/Users/josteink/AppData/Roaming/.emacs.d/elpa/org-20141215/ob-emacs-lisp
hides c:/emacs/share/emacs/24.4/lisp/org/ob-emacs-lisp
c:/Users/josteink/AppData/Roaming/.emacs.d/elpa/org-20141215/ob-dot
hides c:/emacs/share/emacs/24.4/lisp/org/ob-dot
c:/Users/josteink/AppData/Roaming/.emacs.d/elpa/org-20141215/ob-ditaa
hides c:/emacs/share/emacs/24.4/lisp/org/ob-ditaa
c:/Users/josteink/AppData/Roaming/.emacs.d/elpa/org-20141215/ob-css
hides c:/emacs/share/emacs/24.4/lisp/org/ob-css
c:/Users/josteink/AppData/Roaming/.emacs.d/elpa/org-20141215/ob-core
hides c:/emacs/share/emacs/24.4/lisp/org/ob-core
c:/Users/josteink/AppData/Roaming/.emacs.d/elpa/org-20141215/ob-comint
hides c:/emacs/share/emacs/24.4/lisp/org/ob-comint
c:/Users/josteink/AppData/Roaming/.emacs.d/elpa/org-20141215/ob-clojure
hides c:/emacs/share/emacs/24.4/lisp/org/ob-clojure
c:/Users/josteink/AppData/Roaming/.emacs.d/elpa/org-20141215/ob-calc
hides c:/emacs/share/emacs/24.4/lisp/org/ob-calc
c:/Users/josteink/AppData/Roaming/.emacs.d/elpa/org-20141215/ob-C hides
c:/emacs/share/emacs/24.4/lisp/org/ob-C
c:/Users/josteink/AppData/Roaming/.emacs.d/elpa/org-20141215/ob-awk
hides c:/emacs/share/emacs/24.4/lisp/org/ob-awk
c:/Users/josteink/AppData/Roaming/.emacs.d/elpa/org-20141215/ob-asymptote
hides c:/emacs/share/emacs/24.4/lisp/org/ob-asymptote

Features:
(shadow sort mail-extr emacsbug sendmail expand-region
text-mode-expansions cc-mode-expansions the-org-mode-expansions
nxml-mode-expansions js2-mode-expansions js-mode-expansions
web-mode-expansions html-mode-expansions er-basic-expansions
expand-region-core expand-region-custom pcre2el rxt re-builder sgml-mode
org-table ox-latex ox-icalendar ox-html ox-ascii ox-publish ox hideshow
web-mode js2-mode nodejs-repl gnutls mule-util js-comint eldoc cus-edit
wid-edit hippie-exp nxml-uchnm rng-xsd xsd-regexp rng-cmpct rng-nxml
rng-valid rng-loc rng-uri rng-parse nxml-parse rng-match rng-dt rng-util
rng-pttrn nxml-ns nxml-mode nxml-outln nxml-rap nxml-util nxml-glyph
nxml-enc xmltok rect pp eieio-opt flyspell ispell tabify magit-key-mode
magit view epa derived diff-mode git-rebase-mode git-commit-mode
log-edit pcvs-util vc-git omnisharp helm-grep helm-regexp helm-plugin
helm-utils helm helm-source cc-langs csharp-mode cl
omnisharp-auto-complete-actions omnisharp-server-actions omnisharp-utils
popup warnings js json cc-mode cc-fonts cc-guess cc-menus cc-cmds
cc-styles cc-align cc-engine cc-vars cc-defs misearch multi-isearch
mule-diag debug elec-pair bat-mode browse-url executable org-element
org-rmail org-mhe org-irc org-info org-gnus org-docview doc-view
jka-compr image-mode dired org-bibtex bibtex org-bbdb org-w3m org
org-macro org-footnote org-pcomplete org-list org-faces org-entities
noutline outline org-version ob-emacs-lisp ob ob-tangle ob-ref ob-lob
ob-table ob-exp org-src ob-keys ob-comint ob-core ob-eval org-compat
org-macs org-loaddefs cal-menu calendar cal-loaddefs add-log
elisp-slime-nav paren paredit projectile ibuf-ext ibuffer pkg-info epl
grep f s ucs-normalize thingatpt which-func linum company-files
company-oddmuse company-keywords company-etags etags company-gtags
company-dabbrev-code company-dabbrev company-capf company-cmake
company-ropemacs company-xcode company-clang company-semantic
company-eclim company-template company-css company-nxml company-bbdb
company hl-line undo-tree diff easy-mmode imenu ido-yes-or-no ido
autorevert filenotify cus-start cus-load delsel server powershell-mode
speedbar sb-image ezimage dframe tramp tramp-compat tramp-loaddefs
trampver shell pcomplete flycheck find-func help-mode pcase subr-x dash
haskell-cabal haskell-utils let-alist rx tar-mode compile comint
ansi-color ring names cl-macs gv edebug autoload lisp-mnt epg mm-archive
message format-spec rfc822 mml mml-sec mailabbrev gmm-utils mailheader
mm-decode mm-bodies mm-encode mail-utils network-stream starttls
url-http tls mail-parse rfc2231 rfc2047 rfc2045 ietf-drums url-gw
url-cache url-auth url url-proxy url-privacy url-expand url-methods
url-history url-cookie url-domsuf url-util mailcap url-handlers
url-parse auth-source eieio byte-opt bytecomp byte-compile cconv
eieio-core gnus-util mm-util mail-prsvr password-cache url-vars
auto-complete-nxml-autoloads batch-mode-autoloads color-theme-autoloads
guru-mode-autoloads edmacro kmacro cl-loaddefs cl-lib
ido-yes-or-no-autoloads finder-inf macrostep-autoloads advice help-fns
nrepl-autoloads powershell-mode-autoloads pkg-info-autoloads info
easymenu slime-autoloads tidy-autoloads undo-tree-autoloads package
epg-config time-date tooltip electric uniquify ediff-hook vc-hooks
lisp-float-type mwheel dos-w32 ls-lisp w32-common-fns disp-table w32-win
w32-vars tool-bar dnd fontset image regexp-opt fringe tabulated-list
newcomment lisp-mode prog-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 nadvice loaddefs button faces cus-face macroexp
files text-properties overlay sha1 md5 base64 format env code-pages mule
custom widget hashtable-print-readable backquote make-network-process
w32notify w32 multi-tty emacs)

Memory information:
((conses 8 1546043 178817)
 (symbols 32 59486 0)
 (miscs 32 5094 4985)
 (strings 16 180340 46397)
 (string-bytes 1 5113818)
 (vectors 8 84825)
 (vector-slots 4 1992267 169560)
 (floats 8 331 1445)
 (intervals 28 133812 6716)
 (buffers 508 72))





^ permalink raw reply	[flat|nested] 15+ messages in thread

* bug#19946: 24.4; js-mode, indentation
  2015-02-25 10:09 bug#19946: 24.4; js-mode, indentation Jostein Kjønigsen
@ 2016-03-19 22:13 ` Simen Heggestøyl
  2016-03-20  1:27   ` Dmitry Gutov
  0 siblings, 1 reply; 15+ messages in thread
From: Simen Heggestøyl @ 2016-03-19 22:13 UTC (permalink / raw)
  To: Jostein Kjønigsen; +Cc: jostein, 19946, dan.colascione

Can confirm that this bug is still present on the current master branch
(070b9de). The following patch seems to fix it:


From 9b9f09d518617d165833602d863ea8afedcec401 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Simen=20Heggest=C3=B8yl?= <simenheg@gmail.com>
Date: Sat, 19 Mar 2016 21:33:02 +0100
Subject: [PATCH] Handle indentation after carriage return better

* lisp/progmodes/js.el (js--proper-indentation): Handle indentation
after carriage return better (bug#19946).
---
 lisp/progmodes/js.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lisp/progmodes/js.el b/lisp/progmodes/js.el
index 1e5cc60..a156080 100644
--- a/lisp/progmodes/js.el
+++ b/lisp/progmodes/js.el
@@ -1963,7 +1963,7 @@ js--proper-indentation
                  (switch-keyword-p (looking-at "default\\_>\\|case\\_>[^:]"))
                  (continued-expr-p (js--continued-expression-p)))
              (goto-char (nth 1 parse-status)) ; go to the opening char
-             (if (looking-at "[({[]\\s-*\\(/[/*]\\|$\\)")
+             (if (looking-at "[({[]\\s-*\\(/[/*]\\|\n\\|\r\\)")
                  (progn ; nothing following the opening paren/bracket
                    (skip-syntax-backward " ")
                    (when (eq (char-before) ?\)) (backward-list))
-- 
2.7.0






^ permalink raw reply related	[flat|nested] 15+ messages in thread

* bug#19946: 24.4; js-mode, indentation
  2016-03-19 22:13 ` Simen Heggestøyl
@ 2016-03-20  1:27   ` Dmitry Gutov
  2016-03-20  8:25     ` Andreas Schwab
                       ` (2 more replies)
  0 siblings, 3 replies; 15+ messages in thread
From: Dmitry Gutov @ 2016-03-20  1:27 UTC (permalink / raw)
  To: Simen Heggestøyl, Jostein Kjønigsen
  Cc: jostein, 19946, dan.colascione

On 03/20/2016 12:13 AM, Simen Heggestøyl wrote:
> Can confirm that this bug is still present on the current master branch
> (070b9de). The following patch seems to fix it:

I do not mind, but I'm not sure if we actually want to support this 
usage. There are a lot regexps in lisp/progmodes that use $. There are 
several in js-mode, aside from this one.

Some modes try to match [\r\n] (like CC Mode), but in general they seem 
to be a minority, and even CC Mode doesn't do that consistently.





^ permalink raw reply	[flat|nested] 15+ messages in thread

* bug#19946: 24.4; js-mode, indentation
  2016-03-20  1:27   ` Dmitry Gutov
@ 2016-03-20  8:25     ` Andreas Schwab
  2016-03-20 19:01     ` Jostein Kjønigsen
  2020-08-25  9:48     ` Lars Ingebrigtsen
  2 siblings, 0 replies; 15+ messages in thread
From: Andreas Schwab @ 2016-03-20  8:25 UTC (permalink / raw)
  To: Dmitry Gutov
  Cc: Jostein Kjønigsen, 19946, jostein, Simen Heggestøyl,
	dan.colascione

Dmitry Gutov <dgutov@yandex.ru> writes:

> On 03/20/2016 12:13 AM, Simen Heggestøyl wrote:
>> Can confirm that this bug is still present on the current master branch
>> (070b9de). The following patch seems to fix it:
>
> I do not mind, but I'm not sure if we actually want to support this
> usage. There are a lot regexps in lisp/progmodes that use $. There are
> several in js-mode, aside from this one.

I wonder why ?\r doesn't have whitespace syntax in the first place.

Andreas.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."





^ permalink raw reply	[flat|nested] 15+ messages in thread

* bug#19946: 24.4; js-mode, indentation
  2016-03-20  1:27   ` Dmitry Gutov
  2016-03-20  8:25     ` Andreas Schwab
@ 2016-03-20 19:01     ` Jostein Kjønigsen
  2016-03-20 19:02       ` Daniel Colascione
  2016-03-20 19:18       ` Dmitry Gutov
  2020-08-25  9:48     ` Lars Ingebrigtsen
  2 siblings, 2 replies; 15+ messages in thread
From: Jostein Kjønigsen @ 2016-03-20 19:01 UTC (permalink / raw)
  To: Dmitry Gutov, Simen Heggestøyl; +Cc: jostein, 19946, dan.colascione

On Sun, Mar 20, 2016, at 02:27 AM, Dmitry Gutov wrote:
> On 03/20/2016 12:13 AM, Simen Heggestøyl wrote:
> I do not mind, but I'm not sure if we actually want to support this 
> usage. There are a lot regexps in lisp/progmodes that use $. There are 
> several in js-mode, aside from this one.
> 
> Some modes try to match [\r\n] (like CC Mode), but in general they seem 
> to be a minority, and even CC Mode doesn't do that consistently.

I really don't see how that argument makes sense.

By following the cardinal rule of good software, that is produce the
least amont of astonishment, cc-mode does what's right: it produces the
expected outcome, no matter what kind of file it's working with.

The result: A happy user.

In my point of view, this should be the aim for all *-modes found in
Emacs, no matter what its current state of affair or conventions is.

The solution to this is either a bunch of hacky patches replacing $ with
\r\n (as above) or actually addressing what's probably the root cause
(as observed by Andreas)

> I wonder why ?\r doesn't have whitespace syntax in the first place.

Make ?\r be interpreted as white-space, because once you put Emacs
outside a GNU/Linux system honestly nothing else makes sense. Is there
any specific reason for its current behaviour?

Or put the other way: Are there known pieces of code which depends on \r
semantically not being white-space to function correctly?

As someone authoring two major modes, every time $ does not work as
expected and I need to write hacks, it breaks my heart. As of now, I
can't really use $ if I want my modes to work and that's just silly (but
at least now I know why).

--
Jostein Kjønigsen





^ permalink raw reply	[flat|nested] 15+ messages in thread

* bug#19946: 24.4; js-mode, indentation
  2016-03-20 19:01     ` Jostein Kjønigsen
@ 2016-03-20 19:02       ` Daniel Colascione
  2016-03-20 19:15         ` Jostein Kjønigsen
  2016-03-20 19:18       ` Dmitry Gutov
  1 sibling, 1 reply; 15+ messages in thread
From: Daniel Colascione @ 2016-03-20 19:02 UTC (permalink / raw)
  To: jostein, Dmitry Gutov, Simen Heggestøyl; +Cc: 19946, dan.colascione


[-- Attachment #1.1: Type: text/plain, Size: 2047 bytes --]

On 03/20/2016 12:01 PM, Jostein Kjønigsen wrote:
> On Sun, Mar 20, 2016, at 02:27 AM, Dmitry Gutov wrote:
>> On 03/20/2016 12:13 AM, Simen Heggestøyl wrote:
>> I do not mind, but I'm not sure if we actually want to support this 
>> usage. There are a lot regexps in lisp/progmodes that use $. There are 
>> several in js-mode, aside from this one.
>>
>> Some modes try to match [\r\n] (like CC Mode), but in general they seem 
>> to be a minority, and even CC Mode doesn't do that consistently.
> 
> I really don't see how that argument makes sense.
> 
> By following the cardinal rule of good software, that is produce the
> least amont of astonishment, cc-mode does what's right: it produces the
> expected outcome, no matter what kind of file it's working with.
> 
> The result: A happy user.
> 
> In my point of view, this should be the aim for all *-modes found in
> Emacs, no matter what its current state of affair or conventions is.
> 
> The solution to this is either a bunch of hacky patches replacing $ with
> \r\n (as above) or actually addressing what's probably the root cause
> (as observed by Andreas)
> 
>> I wonder why ?\r doesn't have whitespace syntax in the first place.
> 
> Make ?\r be interpreted as white-space, because once you put Emacs
> outside a GNU/Linux system honestly nothing else makes sense. Is there
> any specific reason for its current behaviour?
> 
> Or put the other way: Are there known pieces of code which depends on \r
> semantically not being white-space to function correctly?
> 
> As someone authoring two major modes, every time $ does not work as
> expected and I need to write hacks, it breaks my heart. As of now, I
> can't really use $ if I want my modes to work and that's just silly (but
> at least now I know why).

Line ending divergence is best addressed at the file encoding level, not
the individual mode level. I don't think it's worth while replacing uses
of $ with \r?\n just to address cases in which line ending translation
is broken.



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 15+ messages in thread

* bug#19946: 24.4; js-mode, indentation
  2016-03-20 19:02       ` Daniel Colascione
@ 2016-03-20 19:15         ` Jostein Kjønigsen
  2016-04-03 18:05           ` John Wiegley
  0 siblings, 1 reply; 15+ messages in thread
From: Jostein Kjønigsen @ 2016-03-20 19:15 UTC (permalink / raw)
  To: Daniel Colascione, jostein, Dmitry Gutov, Simen Heggestøyl
  Cc: 19946, dan.colascione

On Sun, Mar 20, 2016, at 08:02 PM, Daniel Colascione wrote:
> Line ending divergence is best addressed at the file encoding level, not
> the individual mode level. I don't think it's worth while replacing uses
> of $ with \r?\n just to address cases in which line ending translation
> is broken.

I appreciate being principled about correctness and fixing the real
problems where they are. I really do. But I'm also trying to be
pragmatic when the real world calls.

While your argument definitely sounds reasonable at first, it's worth
noting that this problem often occurs in distributed projects where some
files end up with mixed line-break formats (due to bad source-control
settings or whatever).

In those cases line-ending translation cannot be done "correctly"
because the file does not adher to one standard only, and unless the
user is aware of this, he will simply blame Emacs as "broken" when
indentation suddenly goes crazy in his file.

If we should at least attempt to adhere to the principle of least
astonishment, we need to either accept \r\n patches everywhere or change
the semantics of $ to also include \r, line-break format be damned.

Or do someone have another option which involves less drastic means? In
that case I'm all ears.

-- 
Jostein Kjønigsen
jostein@kjonigsen.net / jostein@secure.kjonigsen.net





^ permalink raw reply	[flat|nested] 15+ messages in thread

* bug#19946: 24.4; js-mode, indentation
  2016-03-20 19:01     ` Jostein Kjønigsen
  2016-03-20 19:02       ` Daniel Colascione
@ 2016-03-20 19:18       ` Dmitry Gutov
  2016-03-20 19:47         ` Jostein Kjønigsen
  1 sibling, 1 reply; 15+ messages in thread
From: Dmitry Gutov @ 2016-03-20 19:18 UTC (permalink / raw)
  To: jostein, Simen Heggestøyl; +Cc: 19946, dan.colascione

On 03/20/2016 09:01 PM, Jostein Kjønigsen wrote:

>> Some modes try to match [\r\n] (like CC Mode), but in general they seem
>> to be a minority, and even CC Mode doesn't do that consistently.
>
> I really don't see how that argument makes sense.

It's not an argument, it's an observation: clearly we, as a project, 
haven't made a decision to properly support mixed-newline files.

> By following the cardinal rule of good software, that is produce the
> least amont of astonishment, cc-mode does what's right: it produces the
> expected outcome, no matter what kind of file it's working with.

Does it? CC Mode still uses $ in a lot of places.

>> I wonder why ?\r doesn't have whitespace syntax in the first place.
>
> Make ?\r be interpreted as white-space, because once you put Emacs
> outside a GNU/Linux system honestly nothing else makes sense. Is there
> any specific reason for its current behaviour?

Hmm, does this help?

diff --git a/lisp/progmodes/js.el b/lisp/progmodes/js.el
index 15a52ba..dffdb77 100644
--- a/lisp/progmodes/js.el
+++ b/lisp/progmodes/js.el
@@ -578,6 +578,7 @@ js-mode-syntax-table
      (c-populate-syntax-table table)
      (modify-syntax-entry ?$ "_" table)
      (modify-syntax-entry ?` "\"" table)
+    (modify-syntax-entry ?\C-M " " table)
      table)
    "Syntax table for `js-mode'.")







^ permalink raw reply related	[flat|nested] 15+ messages in thread

* bug#19946: 24.4; js-mode, indentation
  2016-03-20 19:18       ` Dmitry Gutov
@ 2016-03-20 19:47         ` Jostein Kjønigsen
  2016-03-20 19:49           ` Dmitry Gutov
  0 siblings, 1 reply; 15+ messages in thread
From: Jostein Kjønigsen @ 2016-03-20 19:47 UTC (permalink / raw)
  To: Dmitry Gutov, jostein, Simen Heggestøyl; +Cc: 19946, dan.colascione

On Sun, Mar 20, 2016, at 08:18 PM, Dmitry Gutov wrote:
> On 03/20/2016 09:01 PM, Jostein Kjønigsen wrote:
> 
> It's not an argument, it's an observation: clearly we, as a project, 
> haven't made a decision to properly support mixed-newline files.

Fair enough.

>> By following the cardinal rule of good software, that is produce the
>> least amont of astonishment, cc-mode does what's right: it produces the
>> expected outcome, no matter what kind of file it's working with.
> 
> Hmm, does this help?
> 
> diff --git a/lisp/progmodes/js.el b/lisp/progmodes/js.el
> index 15a52ba..dffdb77 100644
> --- a/lisp/progmodes/js.el
> +++ b/lisp/progmodes/js.el
> @@ -578,6 +578,7 @@ js-mode-syntax-table
>       (c-populate-syntax-table table)
>       (modify-syntax-entry ?$ "_" table)
>       (modify-syntax-entry ?` "\"" table)
> +    (modify-syntax-entry ?\C-M " " table)
>       table)
>     "Syntax table for `js-mode'.")
> 

That works for me, at least in js-mode.

While not a general solution to all weird files one might encounter
while working in Emacs, it at least makes js-files behave as expected.
And in a fairly reusable manner too: I can copy this code and I'm home
free.

Would pushing this up to cc-mode's c-populate-syntax-table function also
be considered an option? Or does that just sound on overall way too
risky?

-- 
Jostein Kjønigsen
jostein@kjonigsen.net / jostein@secure.kjonigsen.net





^ permalink raw reply	[flat|nested] 15+ messages in thread

* bug#19946: 24.4; js-mode, indentation
  2016-03-20 19:47         ` Jostein Kjønigsen
@ 2016-03-20 19:49           ` Dmitry Gutov
  2016-03-21  0:08             ` Daniel Colascione
  0 siblings, 1 reply; 15+ messages in thread
From: Dmitry Gutov @ 2016-03-20 19:49 UTC (permalink / raw)
  To: jostein, Simen Heggestøyl; +Cc: Alan Mackenzie, 19946, dan.colascione

On 03/20/2016 09:47 PM, Jostein Kjønigsen wrote:

>> diff --git a/lisp/progmodes/js.el b/lisp/progmodes/js.el
>> index 15a52ba..dffdb77 100644
>> --- a/lisp/progmodes/js.el
>> +++ b/lisp/progmodes/js.el
>> @@ -578,6 +578,7 @@ js-mode-syntax-table
>>       (c-populate-syntax-table table)
>>       (modify-syntax-entry ?$ "_" table)
>>       (modify-syntax-entry ?` "\"" table)
>> +    (modify-syntax-entry ?\C-M " " table)
>>       table)
>>     "Syntax table for `js-mode'.")
>>
>
> That works for me, at least in js-mode.
>
> While not a general solution to all weird files one might encounter
> while working in Emacs, it at least makes js-files behave as expected.
> And in a fairly reusable manner too: I can copy this code and I'm home
> free.
>
> Would pushing this up to cc-mode's c-populate-syntax-table function also
> be considered an option? Or does that just sound on overall way too
> risky?

I don't see any problem there, but that's up to Alan.





^ permalink raw reply	[flat|nested] 15+ messages in thread

* bug#19946: 24.4; js-mode, indentation
  2016-03-20 19:49           ` Dmitry Gutov
@ 2016-03-21  0:08             ` Daniel Colascione
  2016-03-21  0:32               ` Dmitry Gutov
  0 siblings, 1 reply; 15+ messages in thread
From: Daniel Colascione @ 2016-03-21  0:08 UTC (permalink / raw)
  To: Dmitry Gutov, jostein, Simen Heggestøyl
  Cc: Alan Mackenzie, 19946, dan.colascione


[-- Attachment #1.1: Type: text/plain, Size: 1544 bytes --]

On 03/20/2016 12:49 PM, Dmitry Gutov wrote:
> On 03/20/2016 09:47 PM, Jostein Kjønigsen wrote:
> 
>>> diff --git a/lisp/progmodes/js.el b/lisp/progmodes/js.el
>>> index 15a52ba..dffdb77 100644
>>> --- a/lisp/progmodes/js.el
>>> +++ b/lisp/progmodes/js.el
>>> @@ -578,6 +578,7 @@ js-mode-syntax-table
>>>       (c-populate-syntax-table table)
>>>       (modify-syntax-entry ?$ "_" table)
>>>       (modify-syntax-entry ?` "\"" table)
>>> +    (modify-syntax-entry ?\C-M " " table)
>>>       table)
>>>     "Syntax table for `js-mode'.")
>>>
>>
>> That works for me, at least in js-mode.
>>
>> While not a general solution to all weird files one might encounter
>> while working in Emacs, it at least makes js-files behave as expected.
>> And in a fairly reusable manner too: I can copy this code and I'm home
>> free.
>>
>> Would pushing this up to cc-mode's c-populate-syntax-table function also
>> be considered an option? Or does that just sound on overall way too
>> risky?
> 
> I don't see any problem there, but that's up to Alan.

It don't have any problem teaching specific modes about carriage
returns, but this approach doesn't scale. A better approach, I think,
would be to extend something like ws-butler for dealing with
mixed-line-ending files. On load, we'd transform `\r\n' -> `\n', but
*remember* which `\n's represent `\r\n` and perform the reverse
translation when writing. This way, you'd preserve clowny extra carriage
returns from other people, but see a clean, unified view in Emacs.


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply	[flat|nested] 15+ messages in thread

* bug#19946: 24.4; js-mode, indentation
  2016-03-21  0:08             ` Daniel Colascione
@ 2016-03-21  0:32               ` Dmitry Gutov
  0 siblings, 0 replies; 15+ messages in thread
From: Dmitry Gutov @ 2016-03-21  0:32 UTC (permalink / raw)
  To: Daniel Colascione, jostein, Simen Heggestøyl
  Cc: Alan Mackenzie, 19946, dan.colascione

On 03/21/2016 02:08 AM, Daniel Colascione wrote:

> It don't have any problem teaching specific modes about carriage
> returns, but this approach doesn't scale.

What about putting that mapping into the standard syntax table?

> A better approach, I think,
> would be to extend something like ws-butler for dealing with
> mixed-line-ending files. On load, we'd transform `\r\n' -> `\n', but
> *remember* which `\n's represent `\r\n` and perform the reverse
> translation when writing. This way, you'd preserve clowny extra carriage
> returns from other people, but see a clean, unified view in Emacs.

And yet another way is to use Git's automatic crlf conversion.





^ permalink raw reply	[flat|nested] 15+ messages in thread

* bug#19946: 24.4; js-mode, indentation
  2016-03-20 19:15         ` Jostein Kjønigsen
@ 2016-04-03 18:05           ` John Wiegley
  2016-04-03 18:17             ` Eli Zaretskii
  0 siblings, 1 reply; 15+ messages in thread
From: John Wiegley @ 2016-04-03 18:05 UTC (permalink / raw)
  To: Jostein Kjønigsen
  Cc: dan.colascione, 19946, Simen Heggestøyl, Dmitry Gutov,
	jostein

>>>>> Jostein Kjønigsen <jostein@secure.kjonigsen.net> writes:

> If we should at least attempt to adhere to the principle of least
> astonishment, we need to either accept \r\n patches everywhere or change the
> semantics of $ to also include \r, line-break format be damned.

What if there were another buffer coding system called "broken-msdos" or
something, that accepted mixed \n and \r\n, but wrote out all \r\n?  I run
into such files often enough.

-- 
John Wiegley                  GPG fingerprint = 4710 CF98 AF9B 327B B80F
http://newartisans.com                          60E1 46C4 BD1A 7AC1 4BA2





^ permalink raw reply	[flat|nested] 15+ messages in thread

* bug#19946: 24.4; js-mode, indentation
  2016-04-03 18:05           ` John Wiegley
@ 2016-04-03 18:17             ` Eli Zaretskii
  0 siblings, 0 replies; 15+ messages in thread
From: Eli Zaretskii @ 2016-04-03 18:17 UTC (permalink / raw)
  To: John Wiegley; +Cc: dan.colascione, 19946, jostein, simenheg, dgutov, jostein

> From: John Wiegley <jwiegley@gmail.com>
> Date: Sun, 03 Apr 2016 11:05:44 -0700
> Cc: dan.colascione@gmail.com, 19946@debbugs.gnu.org,
> 	Simen Heggestøyl <simenheg@gmail.com>,
> 	Dmitry Gutov <dgutov@yandex.ru>, jostein@kjonigsen.net
> 
> >>>>> Jostein Kjønigsen <jostein@secure.kjonigsen.net> writes:
> 
> > If we should at least attempt to adhere to the principle of least
> > astonishment, we need to either accept \r\n patches everywhere or change the
> > semantics of $ to also include \r, line-break format be damned.
> 
> What if there were another buffer coding system called "broken-msdos" or
> something, that accepted mixed \n and \r\n, but wrote out all \r\n?  I run
> into such files often enough.

We already have that, it's called "dos".





^ permalink raw reply	[flat|nested] 15+ messages in thread

* bug#19946: 24.4; js-mode, indentation
  2016-03-20  1:27   ` Dmitry Gutov
  2016-03-20  8:25     ` Andreas Schwab
  2016-03-20 19:01     ` Jostein Kjønigsen
@ 2020-08-25  9:48     ` Lars Ingebrigtsen
  2 siblings, 0 replies; 15+ messages in thread
From: Lars Ingebrigtsen @ 2020-08-25  9:48 UTC (permalink / raw)
  To: Dmitry Gutov
  Cc: jostein, 19946, dan.colascione, Simen Heggestøyl,
	Jostein Kjønigsen

Dmitry Gutov <dgutov@yandex.ru> writes:

> On 03/20/2016 12:13 AM, Simen Heggestøyl wrote:
>> Can confirm that this bug is still present on the current master branch
>> (070b9de). The following patch seems to fix it:
>
> I do not mind, but I'm not sure if we actually want to support this
> usage. There are a lot regexps in lisp/progmodes that use $. There are
> several in js-mode, aside from this one.
>
> Some modes try to match [\r\n] (like CC Mode), but in general they
> seem to be a minority, and even CC Mode doesn't do that consistently.

I think the rough consensus here is that we don't want to support this
in Emacs, so I'm closing this bug report.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2020-08-25  9:48 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-02-25 10:09 bug#19946: 24.4; js-mode, indentation Jostein Kjønigsen
2016-03-19 22:13 ` Simen Heggestøyl
2016-03-20  1:27   ` Dmitry Gutov
2016-03-20  8:25     ` Andreas Schwab
2016-03-20 19:01     ` Jostein Kjønigsen
2016-03-20 19:02       ` Daniel Colascione
2016-03-20 19:15         ` Jostein Kjønigsen
2016-04-03 18:05           ` John Wiegley
2016-04-03 18:17             ` Eli Zaretskii
2016-03-20 19:18       ` Dmitry Gutov
2016-03-20 19:47         ` Jostein Kjønigsen
2016-03-20 19:49           ` Dmitry Gutov
2016-03-21  0:08             ` Daniel Colascione
2016-03-21  0:32               ` Dmitry Gutov
2020-08-25  9:48     ` Lars Ingebrigtsen

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).