Guest User

Cool features in Emacs 26

a guest
Oct 12th, 2017
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ** Emacs now provides a limited form of concurrency with Lisp threads.
  2. Concurrency in Emacs Lisp is "mostly cooperative", meaning that
  3. Emacs will only switch execution between threads at well-defined
  4. times: when Emacs waits for input, during blocking operations related
  5. to threads (such as mutex locking), or when the current thread
  6. explicitly yields. Global variables are shared among all threads, but
  7. a 'let' binding is thread-local. Each thread also has its own current
  8. buffer and its own match data.
  10. See the chapter "Threads" in the ELisp manual for full documentation
  11. of these facilities.
  12. ...
  13. ** 'C-x h' ('mark-whole-buffer') will now avoid marking the prompt
  14. part of minibuffers.
  15. ...
  16. ** 'align-regexp' has a separate history for its interactive argument.
  17. 'align-regexp' no longer shares its history with all other
  18. history-less functions that use 'read-string'.
  19. ...
  20. ** The networking code has been reworked so that it's more
  21. asynchronous than it was (when specifying :nowait t in
  22. 'make-network-process'). How asynchronous it is varies based on the
  23. capabilities of the system, but on a typical GNU/Linux system the DNS
  24. resolution, the connection, and (for TLS streams) the TLS negotiation
  25. are all done without blocking the main Emacs thread. To get
  26. asynchronous TLS, the TLS boot parameters have to be passed in (see
  27. the manual for details).
  29. Certain process oriented functions (like 'process-datagram-address')
  30. will block until socket setup has been performed. The recommended way
  31. to deal with asynchronous sockets is to avoid interacting with them
  32. until they have changed status to "run". This is most easily done
  33. from a process sentinel.
  34. ...
  35. ** Emacsclient has a new option -T/--tramp.
  36. This helps with using a local Emacs session as the server for a remote
  37. emacsclient. With appropriate setup, one can now set the EDITOR
  38. environment variable on a remote machine to emacsclient, and
  39. use the local Emacs to edit remote files via Tramp. See the node
  40. "emacsclient Options" in the user manual for the details.
  41. ...
  42. ** Two new commands for finding the source code of Emacs Lisp
  43. libraries: 'find-library-other-window' and 'find-library-other-frame'.
  44. ...
  45. ** The new variable 'display-raw-bytes-as-hex' allows to change the
  46. display of raw bytes from octal to hex.
  47. ...
  48. ** Emacs now supports optional display of line numbers in the buffer.
  49. This is similar to what linum-mode provides, but much faster and
  50. doesn't usurp the display margin for the line numbers. Customize the
  51. buffer-local variable 'display-line-numbers' to activate this optional
  52. display. Alternatively, you can use the `display-line-numbers-mode'
  53. minor mode or the global `global-display-line-numbers-mode'. When
  54. using these modes, customize `display-line-numbers-type' with the same
  55. value as you would use with `display-line-numbers'.
  57. Line numbers are not displayed at all in minibuffer windows and in
  58. tooltips, as they are not useful there.
  60. Lisp programs can disable line-number display for a particular screen
  61. line by putting the 'display-line-numbers-disable' text property or
  62. overlay property on the first character of that screen line. This is
  63. intended for add-on packages that need a finer control of the display.
  65. Lisp programs that need to know how much screen estate is used up for
  66. line-number display in a window can use the new function
  67. 'line-number-display-width'.
  69. Linum mode and all similar packages are henceforth becoming obsolete.
  70. Users and developers are encouraged to switch to this new feature
  71. instead.
  72. ...
  73. ** The 'occur' command can now operate on the region.
  74. ...
  75. ** New bindings for 'query-replace-map'.
  76. 'undo', undo the last replacement; bound to 'u'.
  77. 'undo-all', undo all replacements; bound to 'U'.
  78. ...
  79. ** Emacs no longer prompts about editing a changed file when the file's
  80. content is unchanged. Instead of only checking the modification time,
  81. Emacs now also checks the file's actual content before prompting the user.
  82. ...
  83. ** New command 'replace-buffer-contents'.
  84. This command replaces the contents of the accessible portion of the
  85. current buffer with the contents of the accessible portion of a
  86. different buffer while keeping point, mark, markers, and text
  87. properties as intact as possible.
  88. ...
  89. *** You can answer 'all' in 'dired-do-delete' to delete recursively all
  90. remaining directories without more prompts.
  91. ...
  92. *** You can now use '`?`' in 'dired-do-shell-command'.
  93. It gets replaced by the current file name, like ' ? '.
  94. ...
  95. *** In wdired, when editing files to contain slash characters,
  96. the resulting directories are automatically created. Whether to do
  97. this is controlled by the 'wdired-create-parent-directories' variable.
  98. ...
  99. *** 'W' is now bound to 'browse-url-of-dired-file', and is useful for
  100. viewing HTML files and the like.
  101. ...
  102. *** New 'M-RET' command for opening a link at point in a new eww buffer.
  103. ...
  104. *** A new 's' command for switching to another eww buffer via the minibuffer.
  105. ...
  106. *** New connection method "gdrive", which allows to access Google
  107. Drive onsite repositories.
  108. ...
  109. *** Tramp is able now to send SIGINT to remote asynchronous processes.
  110. ...
  111. *** Support for completing attribute values, at-rules, bang-rules,
  112. HTML tags, classes and IDs using the 'completion-at-point' command.
  113. Completion candidates for HTML classes and IDs are retrieved from open
  114. HTML mode buffers.
  115. ...
  116. *** CSS mode now binds 'C-h S' to a function that will show
  117. information about a CSS construct (an at-rule, property, pseudo-class,
  118. pseudo-element, with the default being guessed from context). By
  119. default the information is looked up on the Mozilla Developer Network,
  120. but this can be customized using 'css-lookup-url-format'.
  121. ...
  122. *** CSS colors are fontified using the color they represent as the
  123. background. For instance, #ff0000 would be fontified with a red
  124. background.
  125. ...
  126. *** Opening a .h file will turn C or C++ mode depending on language used.
  127. This is done with the help of 'c-or-c++-mode' function which analyses
  128. contents of the buffer to determine whether it's a C or C++ source
  129. file.
  130. ...
  131. *** Enchant is now supported as a spell-checker.
  133. Enchant is a meta-spell-checker that uses providers
  134. such as Hunspell to do the actual checking. With it, users can use
  135. spell-checkers not directly supported by Emacs, such as Voikko, Hspell
  136. and AppleSpell, more easily share personal word-lists with other
  137. programs, and configure different spelling-checkers for different
  138. languages. (Version 2.1.0 or later of Enchant is required.)
  139. ...
  140. *** A new submode of 'html-mode', 'mhtml-mode', is now the default
  141. mode for *.html files. This mode handles indentation,
  142. fontification, and commenting for embedded JavaScript and CSS.
  143. ...
  144. ** New major mode 'less-css-mode' (a minor variant of 'css-mode') for
  145. editing Less files.
  146. ...
  147. ** 'C-up', 'C-down', 'C-left' and 'C-right' are now defined in term
  148. mode to send the same escape sequences that xterm does. This makes
  149. things like forward-word in readline work.
  150. ...
  151. ** 'min' and 'max' no longer round their results.
  152. Formerly, they returned a floating-point value if any argument was
  153. floating-point, which was sometimes numerically incorrect. For
  154. example, on a 64-bit host (max 1e16 10000000000000001) now returns its
  155. second argument instead of its first.
  156. ...
  157. ** To avoid confusion caused by "smart quotes", the reader no longer
  158. accepts Lisp symbols which begin with the following quotation
  159. characters: ‘’‛“”‟〞"', unless they are escaped with backslash.
  160. ...
  161. ** The function 'assoc' now takes an optional third argument TESTFN.
  162. This argument, when non-nil, is used for comparison instead of
  163. 'equal'.
  164. ...
  165. ** The new function 'buffer-hash' computes a fast, non-consing hash of
  166. a buffer's contents.
  167. ...
  168. ** 'car' and 'cdr' compositions 'cXXXr' and 'cXXXXr' are now part of Elisp.
  169. ...
  170. ** 'gensym' is now part of Elisp.
  171. ...
  172. ** Intercepting hotkeys on Windows 7 and later now works better.
  173. The new keyboard hooking code properly grabs system hotkeys such as
  174. Win-* and Alt-TAB, in a way that Emacs can get at them before the
  175. system. This makes the 'w32-register-hot-key' functionality work
  176. again on all versions of MS-Windows starting with Windows 7. On
  177. Windows NT and later you can now register any hotkey combination. (On
  178. Windows 9X, the previous limitations, spelled out in the Emacs manual,
  179. still apply.)
  180. ...
  181. ** 'process-attributes' on Darwin systems now returns more information.
  182. THIS MEANS M-x proced WORKS NOW ON OSX!!!
  183. ...
  184. ** Mousewheel and trackpad scrolling on macOS 10.7+ now behaves more
  185. like the macOS default. The new variables 'ns-mwheel-line-height',
  186. 'ns-use-mwheel-acceleration' and 'ns-use-mwheel-momentum' can be used
  187. to customize the behavior.
RAW Paste Data