Skip to content

Latest commit

 

History

History
2123 lines (1666 loc) · 90.7 KB

entropy-emacs_introduction.org

File metadata and controls

2123 lines (1666 loc) · 90.7 KB

entropy emacs introduction

../annex/img/logo.png

Preface

Entropy emacs was one personal emacs config built for me at the begining and derived from centaur emacs which was one simple pure and with sets of mordern emacs extension tracking on.

entropy-emacs was based on the commit of centaur-emacs by 55b07da55415b48ee75cde67a3f99dd80f3bb491

But with the time when entropy-emacs grown up after one year, it’s seems like it can be sharing for some newbie falling with emacs as be aimed to brought up the easiest way of using or working based on emacs. Along the way, I came for built it with thus on.

Repo folder struct

entropy-emacs has the implicit repo dir struct as the aim for built repo with the constant traditional repo style among with other project dir struct used by myself.

In the root node, it be with three folder:

  1. org
  2. annex
  3. elements

This three folder has their own meaning respectively, all of them was created as the parts of one normal project I used, thus for:

  • org: contained the all docs of this project.
  • annex: stored annex fragments as the stuffs be used for docs like images or other references based on.
  • elements: the main elements (elements consists of entropy-emacs) stored location.

What for more?

This struct design were just use these three based rule without any of other restriction which show that arbitray layouts adding was permitted.

Main config files

entropy-emacs host configs file divided into three categories, i.e. init config and self buit pakages.

The init config conceptual thoughts from centaur-emacs's design philosophy, as it’s original intention for building the simple and pure as origin emacs like configs, in entropy-emacs, they abbreviated as entropy-emacs-xxx.el.

entropy-emacs using the three bind-level core packages managements design to separate individual source files in elements/core root path, they are the initial level, binds-level and the tentacle level, the loading sequence was followed the mentioned order.

On the startup time, fistly loading the initial-level which try to customizing next loading environment and inizilized some internal requested specification, and providing the top-level apis for subroutines. The seconed time loading the basic core functions, internal-variables defination used for rest tentacles, so as called it binds-level, finally loading each entropy-emacs recipes called tentacle-level.

For now, the initial-level was injected for entropy-emaacs-defcustom.el, and the binds-level are hosted in follow three files:

  1. The var binds
    1. entropy-emacs-defvar.el
    2. entropy-emacs-defconst.el
  2. The function binds
    1. entropy-emacs-defun.el
    2. entropy-emacs-message.el

For file named convention, entropy-emacs-xxx.el files are named with ‘xxx’ as the suffix for distinguishing with each other, for convenience, suffix of them were point to their config direction directly, such as entropy-emacs-org.el’s suffix org was implicit it’s the init config file for feature org-mode, and so as on for others init files.

There’s the list of the tentacles and their description:

Categoryinit packagepackage description
entropy-emacs-basic.elbasic setting for entropy-emacs
basic configentropy-emacs-ui.elui defination with the customized startup screen design
entropy-emacs-themes.eltheme collections and startup default theme sets
entropy-emacs-modeline.elmodeline themes collection and default modeline theme setes
entropy-emacs-path.elpath configs for entropy-emacs specfic environment
window conigurationsentropy-emacs-wc.elThe emacs window moving and workaround emulator configuration
entropy-emacs-popup.elThe popuped window procedure defination
entropy-emacs-ivy.elivy mode configs and others refer enhancements
interactive chainsentropy-emacs-company.elcompany-mode confifs and other refer enhancements
entropy-emacs-yas.elyasnippet for emacs configs and other refer enhancements
entropy-emacs-org.elemacs org mode configs
entropy-emacs-markdown.elemacs markdown mode configs
major modesentropy-emacs-c.elC/C++ mode configs with irony completion chians
entropy-emacs-lisp.elemacs lisp mode configs
entropy-emacs-web.elweb mode (web front/back end) configs (inclues js css html php)
entropy-emacs-python.elpython mode config with company-anaconda completion chain
entropy-emacs-lua.ellua mode configs
entropy-emacs-shell.elemacs internal shell front-end enhancements
tool-chainsentropy-emacs-vcs.elgit/svn codes version control with magit
entropy-emacs-structure.elprogramme editting structs fold/expanding feature package
entropy-emacs-highlight.elcodes snippet highlighting guide feature provider
entropy-emacs-dash.eldashboard of api query prompt powerd by external tool zeal
entertainmentsentropy-emacs-emms.elgnu emms as media play control panel entropy-emacs specifics
entropy-emacs-game.elemacs internal game setting config optimization
fundamentalentropy-emacs-package.elon-line packages mirror management and local featuere loaded configs
entropy-emacs-custom.elcustom file loading setting with alternative custom file specific
code serverentropy-emacs-coworker.elthird-party language server query insall library.
entropy-emacs-codeserver.elthe dashboard for language server installer

Self built packages

As the default, elpa packages was enough for users to use emacs with extensions comfortably, but some kinds of demands for who want working something else with emacs as well must doing as them self, this the reason for me to build things just I using or just contained within entropy-emacs.

Pacakges I built was aimed for:

  • Enhancing the basic emacs function or other elpa packages.
  • Things needed for me as the special hobby.
  • Useful self built extension which hope to sharing with others.

Now, I built serveral packages shown as below table:

package namepakage description
entropy-cn-dictpoint char or region translation for chinese words (also useful for traditional chinese)
entropy-sdcvthe emacs multi-dictionaries framework
entropy-common-librarylibrarys for building other entropy-emacs package
entropy-project-managersimple project managements system
entropy-counsel-stuffsstuffs managemetns as notes, bookmarks recording or modifying chain
entropy-dired-cp-or-mvdired copy or move files extension for enhancing based dired refer function
entropy-epub2orgconvert epub ebook into org-mode files format front-end
entropy-global-read-only-modeemacs globally readonly mode for forcing lock buffer while opening
entropy-open-withopen files using external applications
entropy-org-batch-refilebatch refiling entries from org buffer
entropy-org-export-theme-toggletoggle org html export theme specific for choosing theme or buiding it temporally quickly
entropy-org-widgetuseful org widgets for other org refer extension building
entropy-portableappsemacs portableapps query and open front-end for windows plattform
entrop-proxy-urlhttp retrieving proxy tool for eww and emacs-w3m
entropy-s2tconvert simplified chinese to traditional chinese func used for pyim (emacs chinese input method)
entropy-unfillunfill buffer paragraph with specific rules built by user self
entropy-shellpopthe yet-another shell-pop toolkit replacement for using shackle as the popup method

Eemacs top-key map

For unified emacs experience both of CLI and GUI, entropy-emacs using the auto-adaptable key entropy/emacs-top-key as the the unified prefix key to bind a keymap entropy/emacs-top-keymap, various commands hosted on it to be interactived thus.

Commonly entropy/emacs-top-key was bind to C-@ in CLI and C-` in GUI, all of them are reflected with physical key hints C-` on your keyboard. We make the convention that string [eprefix] indicate the hint entropy/emacs-top-key , that example [eprefix] w means hint entropy/emacs-top-key and w sequentially.

Custom entropy-emacs

entropy-emacs has lots of custom-variables be defined acquiescently. For each feature in main config files entropy-emacs-xxx.el or in self built extensions, entropy-emacs custom-variables provides the wild freedom customized ability to specific config actually to referred using experience.

Since emacs using custom.el for stored all customized setting temporarily entries, entropy-emacs also allow user to setting custom variable of entropy-emacs to that place and this is the default order.

When the first time you using entropy-emacs, you may want to create the custom.el file in root of entropy-emacs used by emacs initial with, as the well, entropy-emacs gives the template custom file located in same place which named custom-example.el, you can copy it as custom file for convenience.

Hacking for entropy-emacs

entropy-emacs allow user to modified internal config files but this is not suggested by. Sets of entrop-emacs was corresponding to each other frequencly which shown as that if you modified one code snippet while you are not familiar with details logic designation of entropy-emacs, you will get mess with the functional in some place.

But, if you want to hacking for some code snippet you can adding advice for them and stored in your own config folder. entropy-emacs providing one navigation detector feature for loading you own config files, this extern config loading detector was elisp func which stored in CUSTOM-DIY.el under root of entropy-emacs, this file were not exist by default, you should create it by yourself.

CUSTOM-DIY.el can be stored elisp codes arbitrarily, which means that you could write the func modifiction all adding new config features in that file, but the recommended way for using this file was stored the extern config files load function to it, i.e. some thing like below:

;; load "my_entropy-emacs_extern.el" after loading "custom.el" .
(let ((file (file-exists-p "/xxx/xxxx/.../my_entropy-emacs_extern.el")))
  (when (file-exists-p file)
    (load-file file)))

Thus, the file my_entropy-emacs_extern.el will be loaded after emacs custom file loaded, that as the same step before other entropy-emacs files be interpreted.

The conceptual for thus, file my_entropy-emacs_extern.el can be secondary init.el or the secodary emacs config repo main thing.

Config feature specifiction introduction

This chapter introducts the main config features of entropy-emacs, each part of below sections pointing one feature category which was the collection sets description and feature specified core sets, you may want to select refer things you’d metioned or care about for jumping with the sequence as the section it self, but I recommended for reading sections one by one instead of jumping where while you are fisrt using entropy-emacs.

Each feature required the basic emacs using experience for or has been, which means if you are the newbie of emacs, you must reading the emacs internal tutorial first and then doing thus.

For WINDOWS specification section, only suggested reading task for someone using emacs on windows, that section was the sets of experiences by me as using emacs on windows, I often using emacs on WINDOWS as one portable programming encapsulation environment, that portable work-around for daily using of me.

For chinese emacs user, when you want to input chinese and showing CJK fonts well (without lagging or other crash problem as emacs with cjk status), you can obtain the minor skills from ‘Font specific’ section.

Latest, all of below section can be the taste of entropy-emacs for understanding the difference between this to the default emacs using sensing, happy hacking with entropy-emacs.

Internal basic setting specific

entropy-emacs using elpa/melpa emacs extension to build basic work-around, for enhancing the basic emacs using experience.

Basic config of entropy-emacs can be splitting into seven nodes:

  • workspace
  • modeline specific
  • global buffer lock
  • input method of chinese refer
  • org mode
  • font specific
  • miscellaneous config

All of these seven parts consists the basic core of entropy-emacs config. They are oriented respectively for their individual direction, and was necessary be the part of core of this.

Windows configuration and workspace defination

Emacs using buffer, window, frame to recoganize the current editting space and recorde it’s state, it’s the basic func for elisp programmer for built editting space extension for as more convenience to create, move, toggle each layouts editting space, we call ‘editting sapce’ as workspace.

Workspace managements consists of two parts:

  1. layout toggle
  2. window toggle

A workspace was one layout consists with several windows internal of it, thus layout toggle can be used with different workspace switching or creating sets of workspace who have different working purpose. This is useful for who doing different thing at the same time or as the relaxing and working state toggle button during the day.

Thus, as the layout toggle, the basic thing as you facing to emac using was to chaning the cusor point with sets of buffers, as buffer stored in window, cusor switching upon different buffers on the different windows was called window toggle.

Eyebrowse

entropy-emacs workspace creating, toggle, and defination using eyebrowse melpa extension, it is settle out with solid done. You can find it on github.

In entropy-emacs, eyebrowse was acted as the workspace management host which provide layout toggle, creating, renaming or deletion functions. Each workspace’s name, window configuration, slot number was stored as the sets of frame-parameter, so it works well with other emacs intern toolchain.

  • eyebrowse’s workspace dash list:
    1. tag: indicated layout defination name.
    2. slot: the numberic identification of respective layouts

    Which means shown above, eyebrowse exhibits each workspace through the way for display the layout tag-name and it’s numberic slot.

    In entropy-emacs , the tag-name and slot number was displayed on the left of modeline which like as:

    Commonly, the display format of thus was formula as slot-number:tag-name, and the face was usually came as yellow forground covered on black background.

    Layout switching was through the way of query prompt within minibuffer and enhanced with candidates showing list powered by ivy, each candidate was one unique slot number with workspace name:

    +--------------------------------------------------------------------------------+
    |  * 169 U(Unix) *scratch*      Lisp Interactioin Orgstruct>>      << 4: 23 ALL  |
    +--------------------------------------------------------------------------------+
    (1/3) Enter slot:
    
         +------------------+
    ---> |1: basic workspace|
         +------------------+
          2: Readme edit
          3: News reader
        

    But the easist way for doing like this was using the shortcuts prefix [eprefix] w with the workspace slots number limited within decimal based digit as ‘1~9’, thus if you active key stick [eprefix] w 2 , you will toggle workspace to slot ‘2’. By default, eyerbrowse supports toggle to none exists slot which creates it while then but without tag inputting prompt, or you can create new slot by sticking [eprefix] w C-c which will create one new slot with tag inputting demands prompting hacked adding by entropy-emacs.

  • Derived workspace:

    By default each workspace provided by eyerbowse layout managements was independently by each other on the conceptual aspect, which means that eyerbowse recognizes layouts by one-dimension that [1,2,3,4,…] one by one without any sub-group concept.

    In many cases if your workspace was too complicated as what that sets of buffer opened in your single screen hardware actually, this will cause the disaster for your eye-visual focus moving and laggning the way when be with your poor eyesight.(also seen as your screen was low dimessions as traditional ‘1366x768’.)

    +---------------+-------+--------------------------+
    |               |       |                          |
    |   buffer 0    |buffer |     buffer 5             |
    |               |       |                          |
    +---------------+  4    +------------+-------------+
    |               |       |            |             |
    |   buffer 1    |       |            |  buffer 7   |
    +------+--------+       |buffer 6    |             |
    |      |        |       |            |             |
    |      |        +-------+------------+-------------+
    |      |        |                                  |
    |buffer| buffer |  xxxxx xxx xxx xxx               |
    |      |        |                                  |
    |  3   |   2    |     xxx xxx xxx xxx              |
    |      |        |                                  |
    |      |        |                                  |
    |      |        |                                  |
    |      |        |                                  |
    |      |        |                           buffer8|
    +------+--------+----------------------------------+
    
    
        

    Do you worried about this single screen layout measured your mind?

    Or you can create one new workspace to exchange partitial of current state to that new slot, but how you organize the association between these two slots? By memory of your mind? God bless, it’s just compat for that state where you just have one slot doing as this, if further … how imagination what will happening?

    For resolving this problem, entropy-emacs expands eyebrowse one-dimension workspace management logic to main-derived conceptual. For the literally meaning , workspace has two kinds:

    • main slot
    • derived slot

    Main slot can be understanding as the origin one while slot has been created, in that case you haven’t given the try or have demands for several buffer splitted in one screen which will cause occurance as above description. Derived slot will be created when you doing for arbitray reason for that.

    +------------+ +------------+ +------------+
    | main slot 1| | main slot 2| |main slot 3 |
    +-----+------+ +-----+------+ +------+-----+
          |              |               |
           \             |               |
    +------v-----+ +-----v------+ +------v-----+
    |            | |            | |            |
    | derived 1  | | derived  1 | | derived  1 |
    |            | |            | |            |
    |         2  | |          2 | |          2 |
    |            | |            | |            |
    |         3  | |          3 | |          3 |
    |     .      | |            | |            |
    |     .      | +------------+ |          4 |
    |     .      |                |            |
    |     .      |                |          5 |
    |            |                |            |
    | derived 9  |                +------------+
    |            |
    +------------+
    
        
  • Derived slot create:

    To create one derived slot can be implemented as call func entropy/emacs-basic-eyebrowse-create-derived or with it’s keybinding C-c v, after then, you will be required to create the derived workspace tag name and the last you will get the workspace as displayed with slot and tag name format as

    main-slot.derived_number:⛓main-slot:"main workspace tagname"☛derived name
        

    Above demos show the face and the instant display format of derived slot derived from the main slot ‘1:temp’.

    For toggle the derived slot, keybinding C-c M-v as so.

    For backing to main slot, was hanged with keybinding [eprefix] w C-o which call function entropy/emacs-basic-eyebrowse-switch-top, it’s useful for quicly back from the temp derived slot to top (called ‘top’ by main) slot without remember the current main slot number or backing with calling entropy/emacs-basic-eyebrowse-switch-basic-window.

  • Derived slot limitation:

    Now, for the designation purpose, entropy-emacs just giving each main slot nine derived slots for deriving by, this because of that each derived slot was numberic as the one digit float number, it’s hard to expand more with thus with float number floor sorting func designing.

    For using case, 9 derived workspaces was enough for what I may thought, it’s no reason to build various of derived one which will cause the difficulties managements, for what as known:

    less is more ---- xxxx

Buffer or Window switching

The conceptual of window configuration under the workspace was buffer and window switching , thought about the scene that if you want to jumping with several buffer or window internal of one workspace, the way for solving that problem was what it is.

entropy-emacs three ways for filling this conceptual:

  1. buffer jumping
  2. window exchange
  3. window size adjusting
  • Frame place jumping:
    +-------------+-----------------------------+
    |             |                             |
    |  buffer 1   |                             |
    |             |                             |
    +-------------+      buffer 3               |
    |             |                             |
    |             |                             |
    |  buffer 2   |                             |
    |             +-----------------------------+
    |             |                             |
    |             |                             |
    |             |     buffer 4    <--- current|
    |             |                             |
    +-------------+-----------------------------+
        

    Assumption on example emacs frame demo, your cursor are on buffer-4 currently and the place you want to jumping to was buffer-1. If you use emacs internal primitive func other-window , it’s hard to do as buffers counts larger than 2.

    entropy-emacs using melpa package window-number for enhance it be as the morden query prompt for all buffers in current frame state, it using func (window-number-switch) for be the subtitude to func (other-window) emacs internal default window switching func.

    It stick window number on modeline, and binding func (window-number-switch) to the origin keybinding for (other-window) as C-x o, if window sibling as above frame session example, it will query prompt for choose window with candidates shown listed in minibuffer, which provide you the ability to selected window number by input window number directly or with the selecting up and down within the candidates list.

    Another bennifit window jumping method was using us self-built func:

    entropy/emacs-basic-windmove-(up/down/right/left)-cycle
        

    The raw func obtained from https://github.com/troydm/emacs-stuff/blob/master/windcycle.el.

    They binding to C-x up/down/right/left. That means you could jumping cycle round for sibling window quickly with your instincts visual sensitive.

  • Window resize:

    By the default, any dividing behaviour in emacs was width ‘half’ sibling state, but the occurence when you want to get the specififc window dividing width, may rely on the external extension power.

    entropy-emacs use package winresize to provide such feature. And it’s main func binded with C-<f10> shortcut, in that way, when you active it til you enter the RET key, the full duration process was using Arrow-key to resize window size animatedly as the visualized size alteration.

    Arrow-key up, down, left and right controlling windows size rising or shutter forms. For just two window of one frame horizontally, right and left arrow-key was only functional, the otherwise for just two as it but with vertically state was limited to just up and down keys functional, excepting this, opposite conceptual.

    Once you enter RET after resizing, the new window size state stored as the result, this size will remained by eyebrowse and other workspace refer toggle or restore units.

  • Window exchanging:

    With eachs window stick square on the fixed position when setted down by dividing for, the occurence for exchanging window buffer was frequently, emacs internal func buf-move-up/down/right/left gives the try as thus. We binding them to C-c C-up/down/right/left respectively.

Modeline themes toggle

entropy-emacs provide four kinds modeline style:
nametagdescription
origin-specificoriginminor extended origin `mode-line-format`
doom-modelinedoommorden simply mode-line style extracted from doom-emacs
sapcelinespacelinemorden extensible mode-line style of spacemacs
spaceline-iconsspaceline-iconsall-the-icons patched spaceline
powerlinepowerlinethe enhanced exensible mordern mode-line based used for spaceline

Each of them are combined specific for be fit for entropy-emacs. You can set the custom-variable entropy/emacs-modeline-style with the tag symbole shown from above table:

;; demo modeline setting code snippets of entropy-emacs
(setq entropy/emacs-modeline-style 'powerline)
(setq entropy/emacs-modeline-style 'spaceline)
;; .... and so on

The default modeline style are ‘doom-modeline’ and ‘origin’, which has been initialed with eyebrowse workspace indication segment built with derived logic widget(see entropy-emacs eyebrowse introduction). These default setting was aimed with keeping balance with emacs performance and visualization experience.

Spaceline (or xxx-icons) was the wild used modeline of other users’s custom emacs config, but in entropy-emacs, it is not recommended for using this as the default modeline style, because it lagging with huge process garbage collection idle slate during commonly emacs using occurence. This was caused by sets of segments of spaceline for what was lead to this issue. Another icons version spaceline was not recommendation for as, the font default required for and the based spaceline core performance problem was both annoying for user who want to use them out of box. (spaceline-icons will not renderd nice on windows platform as well as linix platform even if the extra fonts it required were installed corrently).

Thus, if you want to use spaceline, I recommend to use powerline instead because spaceline was extension from it and powerline origin segment corresponding was pure and simple which may be without lagging performance as what gets into spaceline.

the Toggle func for switching different modeline at real time was supported with bounds of func:

  • entropy/emacs-modeline-mdl-origin :
    Toggle to origin-specific modeline style.
  • entropy/emacs-modeline-mdl-doom :
    Toggle to doom modeline style.
  • entropy/emacs-modeline-mdl-powerline :
    Toggle to powerline modeline style.
  • entropy/emacs-modeline-mdl-spaceline :
    Toggle to spaceline modeline style.
  • entropy/emacs-modeline-mdl-spaceline-all-the-icons :
    Toggle to spaceline-all-the-icons modeline style.

By defualt modeline style toggle funcs was all disabled unless you set custom-variable entropy/emacs-enable-modeline-toggle to ‘t’. And for specific emacs version, entropy-emacs gives different modeline style pre setting;

  • emacs version 25.2.1 : doom
  • emacs version 25.3.1 : origin
  • emacs version 26.1 and above: doom

This specification was rely on the unicode font render effection activation reason that 25.3.1 version was specially not support as what, so as it.

Chinse input method

For emacs inputing with CJK chars experience, the default chosen for you was to used system default input tool-chain which was external out of emacs’s controlling. And then the second for that was to using the emacs interanl chinese input methods as the list below:

  • chinese-4corner
  • chinese-array30
  • chinese-b5-quick
  • chinese-b5-tsangchi
  • chinese-ccdospy
  • chinese-cns-quick
  • chinese-cns-tsangchi
  • chinese-ctlau
  • chinese-ctlaub
  • chinese-ecdict
  • chinese-etzy
  • chinese-punct
  • chinese-punct-b5
  • chinese-py
  • chinese-py-b5
  • chinese-py-punct
  • chinese-py-punct-b5
  • chinese-qj
  • chinese-qj-b5
  • chinese-sisheng
  • chinese-sw
  • chinese-tonepy
  • chinese-tonepy-punct
  • chinese-ziranma
  • chinese-zozy

You don’t have to know the each knowledge about them, but the most pop used one was chinese-py which was aslo the most popular method for chinese people for using as the default chinese hans char input method.

Although chinese-py input method was pure and powerful for basic using, if onece you get it on your scatter doing, you will find it was really simple and crude which can not be used as the daily tool for thus. As the result, entropy-emacs usig the most powerful and comprehensive ‘pinyin’ function built melpa extentioin pyim :

这是一段中文说明,你好shijie
                      ^
                      |
                      +-------------------------+
                      | 1. 世界 2. 时节 .....   |
                      +-------------------------+

Above demo shows the fully process for input chinese using pyim. pinyin candidates shown within the tooltip widget posframe created by the author same as pyim be, there’s other candidates widgets for chosen:

  1. minibuffer

    Using minibuffer be the widget as:

    +----------------------------+
    |                            |
    | xxx|                       |
    |                            |                                        
    |                            |                                        
    |                            |                                        
    |----------------------------|                                        
    | 1.word1 2.word2 .......   <------minibuffer pyim pinyin candidate list
    +----------------------------+
        
  2. popup:

    Similarity with posframe but using old emacs buffer frame api which may lagging of performance that based with it’s design logical, as the opposite, posframe using the new child-frame emacs feature which just contained in emacs version on 26.1 and above.

    So as that, entropy-emacs using ‘popup’ to pyim config for emacs version below 26.1 and the oppsite using ‘posframe’.

  • Pyim dicts: <section:pyim-dict>

    Although pyim was one emacs extension written by elisp, it was also one comprehensive chinese input programe which as the same sets of products rely on operation system e.g. fcitx-pinyin, rime or ibus-pinyin, it relies on emacs internal input method frame work the comprehensive input frame work built with emacs. Thus pyim need extra char dicts for driven for candidates completion.

    pyim extra dict was plain text format as:

    ni-hao 你好
    shi-jie 世界
        

    Sequence continuing as thus.

    entropy-emacs provide the default extra dicts archived in here, there’s two dicts:

    1. core.pyim
    2. extra.pyim

    Each of them are extract from other open source permitted input method, as you do not worry about the copyright with legal complication.

    There two dicts was enough for daily using as well as me, names of them are meaned as the loading sequence or dict collection categories belong to them individually. Core.pyim was extract from rime’s internal dict, containes 816321 entries, reached the normal proper dicts size as suggested from pyim author, extra.pyim was the collection from several none copyright obselete dicts, it contained extra popular vocabularies and animal, stars, psycology or other sets of scienece subjects vocabulary collection, it’s size about 0.8 million entries.

  • using liberime as rime backend for pyim

    Except for plain text dictionary as cacheing method, the another project liberime-config gives the ability to get IME query candicates from native rime engine librime, and the configuration steps are easily and thus as:

    1. given the rime schemes host in operation system for variable entropy/emacs-pyim-liberime-scheme-data.
    2. Setting the specific rime scheme selected
    3. Optionally give the rime cache dir value to entropy/emacs-pyim-liberime-cache-dir.
  • enable pyim with =entropy-emacs=:

    The turn-off custom variable controlling whether enable pyim when emacs startup finished i.e. entropy/emacs-enable-pyim, you can active it in your custom.el file, then the next time you start up or open new session of emacs , pyim will automatically startup using the default dicts specific by entropy-emacs as introduction form pyim dicts section, or if you want to enable dicts specified by yourself, you can setting up custom-variable entropy/emacs-pyim-dicts, the variable information and value format can be shown by touching C-h v entropy/emacs-pyim-dicts RET.

  • pyim conversion between simple chinese with traditional chinese:

    Chinese hans char has been redesigned for simplification for daily using in CHINA, but be remained the old version shape of char for people in CHINA taiwan province and HongKong or others chinese language based countries. As for the first char shape named simple chinese and the rest was called as traditional chinese.

    entropy-emacs supported both of them for inputting choice, but initial based inputting was simple chinese, you can call func (entropy/emacs-basic-toggle-pyim-s2t) to toggle it to traditional-chinese as the final presentation on screen.

    Original pyim not support the feature of conversation between them, but it provide one feature pyim-magic-converter whose description as below:

    > 将 “待选词条” 在 “上屏” 之前自动转换为其他字符串. 这个功能可以 实现“简转繁”,“输入中文得到英文”之类的功能。

    entropy-emacs create the self func entropy/emacs-basic-toggle-pyim-s2t for using this detector feature for reaching the aim of thus. This core was provided by package entropy-s2t which list the hash table entropy/s2t-table pointed each simple chinese char to the corresponding traditional chinese char.

    So as on the inputting prompt candidates will still be the simple chinese char shape style.

  • Half or full width punctuation:

    Pyim allows user to toggle punctuation standard widths withs both of half and full style with keybinding C-1 while you are in pyim input session, this may be useful when you are editting the list or table in org mode.

Globally readonly mode

Emacs open all common buffers with editted state by default all. It be convenience with the state for usually sights which allow user to quickly read or write sth into file.

But with the buffer counts increasing for one emacs sessin, this feature was annoying with the worriers for that we can not keep careful for all buffers modification state when you take the mistake modification little bit inadvertently.

The way for solving this problem is to create one feature for emacs to lock all buffer as read-only (i.e. locked) state by the default for buffer opening, because most of occurrence we open one file is to read but not to write.

entropy-emacs’s self built extension global-readonly-mode give the anwser.

global-readonly-mode provide three modes:

type modes namevalue
find-file initialall
major modes rulemodes
dired find-file initialconvert

You will enable it do with filling follow elisp codes snippet into custom file:

(setq entropy/grom-enable t)
(setq entropy/grom-readonly-type "all")

The suggested mode choice was all, which injecting read-only feature into (find-file) function, after sets this value, any buffer opened with lock state excluding the buffer name exception list entropy/grom-find-file-except-bfregexp-list, the value of this list was regexp string matched before find-file opens file. Til now this list shown as blow:

'("autoloads\\.el"
  "\\*Compile-.*\\*"
  "loaddefs\\.el"
  "COMMIT_EDITMSG"
  "_archive"
  "^ *\\*.*?\\* *$")

Regexp strings contained intern of it now excepting package compliging refer file or buffer, magit committing buffer, buffer name paired with * (special buffer) and some miscellaneous nameing rule buffer.

Due to the mechanism of emacs defualt setting used by other extension built intern or from melpa/elpa, global-readonly-mode will cause some coordination problem with other package extension function call, because by the default some func doesn’t judge the buffer read only state before executing processing, in other words, they does with the buffer state by editted default and only to as. Org-mode was the typically one who required the refer buffers it will be did with must be editted state, in which case, entropy-emacs adding sets of advicing funcs for the Org-mode widgets and modified with redefined some apis for patching with adding buffer read only state detecting snippet. The patching for Org-mode districts are:

  1. org agenda
  2. org capture

Agenda buffer’s func offering: note-add, task todo state changing, all need to patched before func process proceeding, entropy-emacs using adviced func (entropy/grom-agenda-unlock-current-entry) for enhancing the each agenda entry behaviour with global-readonly-mode for be the advice before org-agenda-add-note , org-add-log-note , org-store-log-note. entropy-emacs also create the manully func entropy/grom-unlock-agenda-files to unlock all agenda files defined in custom variable org-agenda-files which be opened with, if you want to do so , calling it.

Capture patching redefining func org-capture-place-template and the Org-mode internal unit org-datetree--find-create, both patching for them are minor just with adding (read-only-mode 0) to the key coding region.

Rest modes of global-readonly-mode was the optionally not suggested for who are having the perfects thoughts for this, if you are just one to make the buffer open limitation while using dired open or major modes specifiction type, try them, dired refer was forcing withou any custom variable setting, for major modes specification, custom variable entropy/grom-mode-list are the motorized key for thus, you can check it with C-h v entropy/grom-mode-list for see the default major modes be locked with.

Remeber, you can cancel or disable global-readonly-mode whenever you want to do so with interactive func entropy-grom-mode , it will remove all the hook and cancel all the advising hooks for feature refer when done of calling for it, oppiste as it will enable gloal-readonly-mode again.

Org-mode

Org mode was the structor plain text doc type combined with emacs closely, which obtained the admiration with various emacs user. This section was implicitly for the user who understand with the basic Org-mode knowledgebase and had used it for a while, and rest introduction was the specification of entropy-emacs’s Org-mode config for kinds of aspects of it.

  • Item bullets style:

    Each headline in Org-mode doc with the defautl visual style inserts with dozen of * chars. special tyle support can be hacks for adding. Emacs melpa package org-bullets provides such the feature like as but have’ve been stopped maintained for about 5 years. But no matter the way thus, it’s core mechnism was solid and has enough flexibility for keeping track with new emacs version for the furtuer.

    entropy-emacs using org-bullets for fancying up org item bullets style upon for creating two style:

    1. roman
    2. circle numberic

    Both of them displayed for showing the sequence number refer the heading level instead of the asterisk counts visualized.

    roman type displayed as the sequence list as:

    "●" "Ⅱ" "Ⅲ" "Ⅳ" "Ⅴ" "Ⅵ" "Ⅶ" "Ⅷ" "Ⅸ" "Ⅹ" "Ⅺ" "Ⅻ"
        

    The instance for this is:

    ● heading 1
      Ⅱ heading 2
        Ⅲ heading 3
          Ⅳ heading 4
            Ⅴ heading 5
              Ⅵ heading 6
              ......
    
        

    Same sytle show for circle numberic:

    "⓪" "①" "②" "③" "④" "⑤" "⑥" "⑦"
    "⑧" "⑨" "⑩" "⑪" "⑫" "⑬" "⑭" "⑮"
    "⑯" "⑰" "⑱" "⑲" "⑳"
        

    Bullets shown style was the minor fancy setup, choosing the taste as your way. follow config codes snippet for doing thus:

    (setq entropy/emacs-org-bullets-type "roman") ; or with "circle numberic"
        
  • Headline level face:

    Headline level influenced headline face of Org-mode visulized style corresponding each emacs theme specification. Some customized theme package from melpa given the try to enlarge the heading font size by default as shown with the sensible heading level case.

    In entropy-emacs, this feature was all being disabled for the habits for me. Enlarge heading font will cause headline tag can not be alignment with the default tag alignment setting by custom variable org-tags-column, this specification influenced by entropy-emacs specific function entropy/emacs-adjust-org-heading-scale which be added into hook org-mode-hook, if you want to cancel this specification, you could place follow codes snippet into your custom file”

    (setq entropy/emacs-disable-org-heading-scale nil)
    
    ;; Reload major-mode for current to trigger the hook 
    (funcall major-mode)
        
  • Org file open associate application:

    Org mode have the function for open link in a buffer with ‘org-mode’ major mode, each file were recognized for their file type judged by it’s file name suffix e.g. (“\.pdf”, “\.docx”, “\.cpp”). In org mode, file identifier can be more than the file name suffis rule recognizing, custom variabl org-file-apps controlling thus.

    In entropy-emacs, the value of org-file-apps was minor setting with few entries be pdf and gif files.

    Gif files was the animation picture foramt for web or local state, it can be containd dozen frames (animation stacks) which can be the size cover ‘kb’ to ‘Mb’. However, when the size larger than several ‘Mb’, emacs will lagging seriously for a long time to display the animation before analyzing it’s fram counts, because emacs display gif files through the way splitting the picture into the frame list and then render them one by one, this was low effective compared with other picture viewers. Therefore, entropy-emacs set all the gif file links of org file to be opened with external system picture viewer.

    Pdf file render for emacs was frame stacks in turn as the way for display gifs, thus viewing pdf within emacs was not a good idea, thus using system application referred it as well.

  • Org html exporting style:

    Org has the translator backend for html exporting with the internal default css style decoration. The defautl html page decoration was plain and pure sytle based on web standards rule. For given sets of html exporting style choices, Org exposed the api org-html-style custom variable for users to specific the external css or override the default sets.

    entropy-emacs comes with the self built packge entropy-org-export-theme-toggle for providing the theme toggle quickly way so. Although this self package was not indicated just for org html exporting style toggle functional but also for latex and other org exporting backends using, as now [2018-11-24 Sat 19:58:26] I just implemented the way for html exports backend.

    entropy-org-export-theme-toggle gives the four internal html exporting themes i.e. Worg, read-the-org, Bigblow, and red-snapper. First three are collected form other’s customize org html exports style and the last was designed by me for be the default org html exporting style as for the furture.

  • Org bables comfirmation:

    As well known that org mode was designed for literally programming suits, code block embedded within the doc was merited as thus, in org mode, that’s code blocks called bable, as the broken for god’s dividing language curse for preventing humans’ intention of building the bable through across the sky. Thus org bable to do so.

    Each bable block identified with one programming language source viewer, as thus, evaluation for codes was demands for insert the code snippet result into context of doc currents.

    By defaults, org-mode will confirm the operation decision before evaluating them, as well in exporting status. But in org version upon 9.1.xx, org changes it’s exporting bable evaluation confirm mechanism, which just confirm the bable evaluating when it’s code block indicated that this block’s evaluating will be confirmed.

    As thus, entropy-emacs gives the try for patching the export funcs for obtaining the origin confirmation process during the babel evaluating. Function org-babel-confirm-evaluate was the main point for patching with, entropy-emacs forcing setting the local variable org-confirm-babel-evaluate to t in the process of this func, because that in state of export this variable will cleaned to null before calling org-babel-confirm-evaluate without finding the mechanism for.

    There’s also the problem occured on evaluate inline abbreviated code snippet like point on call_func(). The issue was that the confirmation prompt string doesn’t include the babel name. For resolving it, entropy-emacs declared one internal variable entropy/emacs-org--src-info for storing the info generated by func org-babel-get-src-block-info and org-babel-exp-src-block temporally for using for func org-babel-confirm-evaluate, the info getted thus will contain babel block name rathan the origin one generated within the process.

  • Org auto insert custom id:

    Each headline has it’s intential properties, one of them is CUSTOM_ID which is an headline identifier for be distinguished with parents or other headlines.

    Manually inserting or setting CUSTOM_ID was the default method for org users, but it’s painful for doing thus with dozen of headlines, entropy-emacs gives the way for automatically insert CUSTOM_ID for all headlines within current org file buffer. These was sets of functions:

    1. entropy/emacs-org-add-ids-to-headlines-in-file
    2. entropy/emacs-org-auto-add-ids-to-headlines-in-file

    The first one gives the forcing way for inserting CUSTOM_ID to each headline while one of them doesn’t have one, and the second otherwise for the state just when the option comment string in place somewhere in current org file, i.e. ‘#+OPTIONS: auto-id:t’.

    Don’t like the human readable id style, these two automatically func gives the id format as the numeric series with the prefix ‘h-‘, this mechanism reducing the possibility for conficting CUSTOM_ID occurence.

    entropy-emacs gives the auto way for automatically adding headlines ids before save the org file who contained auto-id option, it’s useful for the convenience way.

  • Org tag inserting:

    Org designed with headline tag for sortting or filter dealing with, each headline can has several tags sperated by colon, tag in current buffer can be cached in org-file-tags for query insertting, this feature can also be retreived as global org files with agenda files.

    entropy-emacs using cousel extension for enhancing the using experience of insertting tags, the func counsel-org-tag provides the feature. By default, entropy-emacs restricted tag list collection scope via globle (with all agenda files), so that you can quickly query tags from all existed ones to prevent create the conflicts with messure spelling similarities of the same meaning.

    Call the feature by keybinding as same as the origin org tag insertting as for C-c C-q.

  • Org image drop and down:

    Org file as the simple rich txt file can be referred with images, files, or other file type, the default inserting way was using the manually type coding with the format as [[link location][content description]], or you can drop down the file with gui mounse refers as other gui application does, this feature provided by melpa package org-download but just with image thing as.

    1. image drop and down by local (just support on emacs gui port)
    2. image download from url
    3. capture screenshot with external tools

    Image drop and down for org buffer was handled by DND handle org-download-dnd, you don’t need to know the detailes sticking within this handle, here just to show the general process passing by. Onece you draging one image file from system filesystem manager e.g. Explorer(windows), Nautilus(linux gnome) … , to emacs gui frame and pointed into the actived org buffer, org-download-dnd will insert the image link which redirected to the will placing image location.

    The simple way for insert image source from other location was through the way by downloading url method, and this is the second feature of org-download to handle the image insertting action. The interactivation was simply just by calling interactive function org-download-image soon as.

    Depending on downloading way, org-download also gives the try for providing the image capture to insert func, this called org-download-screenshot, literally meaning point to ‘download’ as the way of this operation was steps sequenced as:

    1. Calling external gui screenshot application tracked by emacs subprocess and waiting for return the image captured url.
    2. Using org-download-image to handle the reponse as the func it provision.

    They are the three way of org-download providing for image quickly insertting.

    =entropy-emacs=’s hacking on =org-download=:

    1. Patching org download inserting process support unicode file name:

      Origin org-download-method was ‘directory and using the process snippet below to extracting the filename url to inserted into org file:

      (org-download--fullname link ext)
              

      While the argument link was combine with unicode file name, the link generated by it will contained the hexo chars for excaped the conflicated part of web url rule. Commonly it’s useful and normally.

      But with some url string having the cjk or other unicode string internally, hexo escape method was actually right for preventing link follow analyzing error for some external software but the human meaning reading available has for user of reading currently. Thus, I given the specified org-download-method for falling back with the as-it link string presentation while inserting the target image url string into org buffer’s current point:

      (defun custom-org-download-method (link)
              (org-download--fullname (org-link-unescape link)))
      (setq org-download-method 'custom-org-download-method)
              

      Which was the function replace the origin one ‘directroy.

    2. Fallback dnd process redefined:

      Org download will send the unused dnd action to the origin emacs internal dnd handle, as the image open will still opened in buffer while you using C-g key quiting current behaviour came from org-download, the image displaying effection will deliver to the emacs internal default dnd file handle, it’s violating the user operation expection, as that I comment the fall back dnd handle process snippet in func org-download-dnd-fallback.

    3. Org capture windows port external application setting:

      When on w32 platform, org-download didn’t give the capture image method effectively, the core for it was the problem for finding the screenshot (free liscense) application with cli interface as, entropy-emacs givies the try for windows internal public (non-free) screenshot tool SnippingTool.exe to using as it for.

      As the default keybinding for the screenshot with org-download-screenshot as C-c p.

      Althouth WIN10 will removing it soon as the promotion while start this minor tool now, but entropy-emacs will finding the other way for resolving this problem following Microsoft’s developing policy as well. Of course, you can specific you own screenshot tool by specifying the custom-variable entropy/emacs-win-org-download-screenshot-method with the default temporally screenshot filename customed by entropy/emacs-win-org-download-file-name.

    4. Capture screenshot image in org capture temporally buffer:

      Commonly, the screenshot feature of org-download will working well in the buffer with the actual based file and the unique buffer name, unless for the buffer temporally which maked as org capture behaviour. That’s means in org cature buffer, org download can not insert the image file-name correctly because of that it can not check the true buffer-file-name for calulating the relative path between image file location and the current buffer file.

      Origin org download link inserting func org-download-insert-link, using (file-name-directory (buffer-name)) for generate the buffer-file-name but this was not working on the temporally buffer, the whole relative link path return snippet process will not worked as well yet:

      (defun org-download-insert-link (link filename)
        (if (looking-back "^[ \t]+" (line-beginning-position))
            (delete-region (match-beginning 0) (match-end 0))
          (newline))
        (insert
         (concat
          (funcall org-download-annotate-function link)
          "\n"
          (if (= org-download-image-html-width 0)
              ""
            (format "#+attr_html: :width %dpx\n" org-download-image-html-width))
          (if (= org-download-image-latex-width 0)
              ""
            (format "#+attr_latex: :width %dcm\n" org-download-image-latex-width))
          (format org-download-link-format (file-relative-name filename (file-name-directory (buffer-name))))))
        (org-display-inline-images))
              

      You can see the last code snippt:

      (format org-download-link-format (file-relative-name filename (file-name-directory (buffer-name))))
              

      It’s will return the wrong path name when file-name-directory gives the nil return value.

      As on entropy-emacs gives the the patching for replacing (buffer-name) with the self defined func entropy/emacs-org--odl-judgement-whether-capture-name with the full process dealing with the messure capture-buffer name.

    5. Image link insert automatically adjusting insert position feature:

      This feature provision of which judges the current cursor point looking at where it is and automatically doing the inserting position adjusting follow below rules:

      • Point at beginning of empty line:

        Insert link in current point.

      • Point at middle or end of empty line:

        Insert link in current point.

      • Point at end of none-empty line:

        Insert the link under of current line with newline creating.

      • Point at partition case of none-empty line:

        Insert the link under of current line with newline creating.

    6. Auto indented link position:

      When the customize variable org-adapt-indentation was enabled in current org buffer, automatically indenting the link position after insert the link string by org-download.

  • Poporg (Edit docstring with org mode temperally):

    In emacs commmonly working with, docstring editting for func or src context was commented editting operation and manually doing as default.

    poporg was one melpa package who provide the feature for automatically editting docstring by cut the region of docstring into the popup temporally buffer with org-mode actived. In this case you can save the docstring by the operation save-buffer or triggering it with it’s keybinding C-x C-s, or discarding the editting with kill-buffer or keybinding C-x k.

    poporg was the minor tool used for conveniently did. It support lots of src content with the detectivation rely on the grammer analyzer as C using ’* *’ as the comments region flags as so, active poporg while current cursor point was between the src refer comment flags by keybinding C-c ".

Miscellaneous emacs internal setting

Emacs consists of various modes and sets of basic tool chains, all of them are with the highly customizable with refer custom variables. Each custom variable gives the default value setting.

But, not each defautl custom variables value given was satisfied for all user, and some was not suit with entropy-emacs.

And for with some minor enhancements or the minor tool adding was also the necessaries for entropy-emacs.

Thus, both the default setting modification and the other minor sets did by entropy-emacs are mischellaneous setting for as.

This section was the introduction for thus.

  • Dired colorful visual style:

    Dired was emacs internal filesystem viewer as the functioanl as w32 explorer or the nautilus for gnome (gnu/linux desktop manager), the default visualization of it was ordered as the plain style.

    For giving the mordern UI for dired was powered by two melpa package:

    1. dired-rainbow:

      Extended file highlighting according to its type.

    2. all-the-icons-dired

      Extended file stick logo according to its type.

    You can chosen one of them by setting custom variable entropy/emacs-dired-visual-type with two value alternative:

    • “simple-rainbow” : using ‘dired-rainbow’.
    • “all-the-icons” : using ‘all-the-icons-dired’
  • Backup and auto-save config:

    entropy-emacs disabled the auto backup file which functional of emacs to gen the copy of current buffer-file before modifying applied to it. Most of people using git or other vcs (version control system) to manage the file version, thus the backup for the file was not necessary as the default setting.

    Otherwise, the feature auto saving file content was needed for preventing the accident for broken the current buffer editting when you haven’t saved it immediately.

  • Smooth scrolling buffer:

    Buffer scrolling in emacs was usually along with page jumping, up to set the current line in the middle of the screen. This not suit with the user who get the habbits from other text editor which always scrolling the page along with the line jumping.

    entropy-emacs defined the func entropy/emacs-basic-smooth-scrolling for emulating the behaviour as so. This func was interactive, you can active this feature by calling it by ‘M-x’.

  • Auto sudo editting:

    When using emacs on unix like OS, visiting or editting high permission required file will using emacs tramp feature, the manually way for it will cost time for inputting the special file path link, entropy-emacs using melpa package auto-sudoedit giving the auto way as so.

    You don’t need to active any func manually or given sets of setting, just using find-file or query and open permission needed file using dired or other emacs internal or file open extension cmd commonly, auto-sudoedit will auto detective the permission needed and prompt for executing the account accessable operation.

  • Epa enabled by default:

    Epa (EasyPG) was the emacs internal feature for auto encrypt and decrypt gpg/pgp tool, entropy-emacs enable it at emacs session initial step by (epa-file-enable).

  • Kill ring browsing:

    Kill ring save the all yank strings into the circle list, emacs support paste the history yanking according to the circle turns.

    Melpa package browse-kill-ring was the extension for it aimed to provide the feature for browsing kill ring history in explicit way with yanking choosing functional.

Font specific

Emacs support multibyte fonts setting and the rich features for each part of face refer.

entropy-emacs’s initial config file entropy-emacs-font-set.el was the collection fonts config for as.

entropy-emacs given the default ttf/otf fonts provission internally, all the fonts given were opensource type without any warranty. we use them for the defautls font setting turns on with custom variable entropy/emacs-font-setting-enable which was the key for using us defautl font setting layout.

Our fonts config feature provide three type of language scripts type:

  • latin
  • cjk
  • symbol chars

While the latin was the most wild using script covered over code source and doc built or read. We using ‘Noto’ from google, ‘Source code pro’ from Adobe be choices for latin script fonts specification.

And then cjk script was using for multibyte and unicode language encoding char presentation, emacs needed hands specific for it as the especially on windows platfrom that will going wrong when cjk fonts config with mistake or uncomfortable. we use ‘Droid Sans’ for chinese and japanese, ‘Noto Serif CJK KR’ for Korea.

some symbol char refer to unicode will be lost of system font list, we use ‘symbola’ one of the wild unicode encoding covering font collection.

when your first using entropy-emacs, if you want to using our font config, you may want to manually install all the fonts archived here. Or you will recieve the warning at the startup but without any feature lost, thus you can install them in any time.

Major modes for programming

Most major-modes contained the basic coding experience as syntax highlight and the xref code snippet defination jumping functional. Although it’s the basic not upper to full sensitively cheerful user experience.

entropy-emacs using dozen melpa extensions to extending the presented major modes’ feature for enhancing more and more modes experience individually. The main extending purpose was sticking on the coding completion, based on company-mode which was the coding completion framework for any scences.As well, eachs major modes extending were including the coding interactive sth refer, coding folding and expanding uppon the region or pair punctuations are adding so.

entropy-emacs treats emacs as the IDE (i.e. integrated development environment), extended with third-party lanuage servers, with the quickly ripened for Microsoft language server, we are trending to use the LSP as the IDE core component, its powerful with unified crossplatform protocol defination and ripened communitiy driven. But for those old IDE configuration (i.e. individually un-unified code sever) were remained in entropy-emacs and with full supported as before.

The switcher for lsp and the old IDE configuration is customized variable entropy/emacs-use-ide-type whose valid values are ‘lsp or ‘traditional.

Follow sections given the description for each major modes which have been enhanced the extending feature details informations.

C and C++

IDE typelanguage servercompletion supportxref-defination support
lsp-modeclangdyesyes
traditionalirony-modeyesyes
  • Lsp-mode for cland eemacs configuration:

    Common lsp-mode configuration.

  • irony-mode eemacs configuration:
    1. Using irony-mode to giving the project code defination review and jumping feature.
    2. Using company-c-headers to giving the project header file query completions.

    irony-mode based on the irony-server which has been compiled for w32 platform within entropy-emacs, but needed compiling manually on linux with dependencies installed e.g. cmake, clang … (We do not packing the server binary on linux because for ths platform across conflicated, thus x86 and arm or other cpu platform can not using the same binary.)

    Other feature extending are minor, simple file compiling on WINDOWS OS was given as function entropy/emacs-c-win-c-compiler which using mingw gcc for the compiler and with fixed library linking as for.

Php

IDE typelanguage servercompletion supportxref-defination support
lsp-modephp-language-serveryesyes
traditional ideac-phpyesyes

Lsp-mode php-language-server eemacs configuration:

Common lsp-mode instruction

Ac-php eemacs configuration:

Php mode was derived from C-mode, familiar syntax-table and grammer refer so that the syntax highlight was not needed to extend.

The main extending for was coding completion, we using company-php for giving thus. Binding with M-p for activation.

Html and Css

emacs internal default web front-end major modes html and css mode are user basically with simple func interactively support, we use melpa package web-mode for the enhancements for html group markup language but for css as.

web-mode provide sets of mordern features as for. Tag folding and expanding with emmet-mode’s abbrevation tag editting, giving the more sensitive web refer coding.

Our self built func entropy/emacs-web-browse-web-buffer can quickly browse the current html page out of using external browser for previewing as the way of quickly did. it’s binding to C-<f1>.

Both of html and css buffer can be tidy up with normally code style using web-beautify package which required nodejs path searched and the npm refer packages installed.

IDE typelanguage servercompletion supportxref-defination support
lsp-modehtmlyesyes
traditionalhtml: noyes (company-web)no
css: noyes (company-capf)no

Javascript

JS development IDE js2-mode was the one for given such as repl and syntax checking and morden syntax highlighting feature for js coding which used in entropy-emacs for be replaced with origin js major mode.

IDE typelanguage servercompletion supportxref-defination support
lsp-modetypescript-language-serveryesyes
traditionalternyes (company-tern)yes

Web front-end realtime previewer

impatient-mode and skewer-mode was two included melpa extension for providing the web front-end realtime previewer feature.

  • skewer-mode:

    skewer-mode provides js code snippet realtime evaluation feature, it emulates the real-time evaluation mechanism upon emacs elisp environment, using the way of the interaction of synchronizing with external browser’s internal javascript engine, evaluating the codes snippet within current editting buffer. It support the repl by the same way as well.

    It’s mechanism for:

    At first, daemon of one http server implemented by elisp programe simple-httpd enabled for be as the interaction module with external browser, then loading the js script for the server (as server instance ), as the same time, open external browser for listening changes of the server mentioned before.

    Later, each buffer modification will be sent to the server, and external browser tracking the response.

    Full process enable just using one func calling run-skewer, immediately then let your external browser directed to one page http://127.0.0.1:8080/skewer/demo , this page was the one previewing all results generated by skewer-mode.

    skewer-mode support css well, for css html and javascript, it divided three minor-modes individually and functionally purpose as the list below:

    The keybindings for evaluating expressions in the browser are just
    like the Lisp modes. These are provided by the minor mode skewer-mode.
    
    * C-x C-e: Evaluate the form before the point and display the result
     in the minibuffer. If given a prefix argument, insert the result into
     the current buffer.
     
    * C-M-x: Evaluate the top-level form around the point.
    
    * C-c C-k: Load the current buffer.
    
    * C-c C-z: Select the REPL buffer.
    
    
    The result of the expression is echoed in the minibuffer.
    
    Additionally, css-mode and html-mode get similar sets of bindings for
    modifying the CSS rules and HTML on the current page.
    
    CSS
    
    * C-x C-e: Load the declaration at the point.
    * C-M-x: Load the entire rule around the point.
    * C-c C-k: Load the current buffer as a stylesheet.
    
    HTML
    
    * C-M-x: Load the HTML tag immediately around the point.
    
    Note: run-skewer uses browse-url to launch the browser. This may
    require further setup depending on your operating system and personal
    preferences.
        

You can touching C-c C-z to active repl for js within js2-mode buffer.

  • impatient-mode:

    impatient-mode named as the meaning with humorous as the read-time previewing moods given, it was the one relative by skewer-mode’s region partitial previewing mechanism, it’s full buffer real-time previewer as for. The core purpose for is to monitoring the html buffer modification and so. The same well as using the simple http server as skewer-mode, it need to manually adding the files in the same folder of css or html files along into the server.

    When one folder structer list as:

    ~/:
     |____index.html
     |____index.css
        

    Thus we can following few steps for previewing the index.html and it’s css file by impaitent-mode, that’s to say if you want the index html file be rendered with all the references as above, you need to manually adding them into server by call impatient-mode.

    1. enable internal web-server by httpd-start
    2. open index.html and starting impatient-mode and external browser open link http://localhost:8080/imp/live/index.html/ automatically at the same time.

    And now your index html file will be rendered real-time in this web page. If you want to adding the css refer into, switching to the css file buffer and executed above steps again with just replacing the html file as instead of css file at the same meaning.

    Limitations:

    All the linkage file must under the same directory tree. Thus impatient-mode just the one for html design layout tool, otherwise for the meaning as just for the single file previewing as the css html js all in one embedding file as for.

Python anaconda

We using emacs built-in major-mode python-mode for coding python codes.

IDE typelanguage servercompletion supportxref-defination support
lsp-modepylsyesyes
traditionalanaconda-modeyes (company-anaconda)yes

python-mode eemacs specification

By defautly, we using python3 be the primary python shell, that it was the most recommendation for thus.

Packages enhancements and introduction

Ivy and Helm

Ivy was emacs M-x enhancements tool framework, it provides the feature of listing candidates with extra operation given.

The internal M-x replacement is swiper, using the same keybinding as it but with the interactive interface visualized as:

+-----------------------------------+
| I                                 |
|                                   |
|                                   |
|                                   |
|                                   |
|                                   |
|                                   |
|                                   |
+-----------------------------------+
|Choose your candidates:            |
+-----------------------------------+
|candidates:                        |
|1.apple                            |
|2.banaa                            |
|3. ..........                      |
+-----------------------------------+

Aspect oriented for framework, ivy provides ability for building extra extension based the query promting listing sytle as upon , sets of presented feature going collection was counsel.

counsel including commonly used tool e.g. counsel-find-file replaced find-file.

  • counsel given for file based:
    1. counsel-org group
      1. coiunsel-org-goto: searching Org outlines, located quickly.
      2. counsel-org-goto-all: searching all org buffers listing under current emacs session.
      3. counsel-org-capture: query selecting org capture templates.
      4. counsel-org-entity: query inserting entity char e.g. À ℘ δ π etc.
    2. couinsel-yank-pop group: similiar as browse-kill-ring.
    3. counsel-recentf: show and query for recent files opened.
    4. counsel-ibuffer: ibuffer using ivy interface.
    5. counsel-bookmark: bookmark chosen extended for bookmark-bmenu-list, as it’s quickly view port.
    6. counsel-mark-ring: query selecting mark position.
    7. counsel-unicode-char: query insert unicode char with name specification e.g. 00000C FORM FEED (FF)
  • counsel system config:
    1. counsel-face: face information query for filter.
    2. counsel-set-variable: setting local variable by query prompt
  • counsel programming helper:
    1. counsel-css: css mode css selector ivy list.
    2. counsel-colors-web: web mode color string visualized query prompting.
    3. counsel-git-log: query git log quickly.
    4. counsel-company: using ivy interface to show company backends candidates.

      Notice: bug that can not cancel company-mode origin tooltip when C-g for this command.

  • ivy read action:

    Extra action supported within ivy interface, it called ivy-read-action, it has the built in ones and also can be customized as extension ports.

    Internal ivy-read-action has them:

    1. C-M m

      Repeately selected candidates.

    2. C-M j

      Force executing operation with current input string.

      origin RET key will cover current inputs as instead of any matched candidate list with ivy interface, thus this action is feature as thus.

    3. C-c C-o

      Collected all current candidate into the temporary buffer for be occurrence so.

    4. M-o

      Expand listing other specific extra actions.

      This action was the leader for other internal extra actions and user specifications did as, the defination former for thus can be using the demo as counsel-describe-face:

      (ivy-set-actions
       'counsel-describe-variable
       '(("I" counsel-info-lookup-symbol "info")
         ("d" counsel--find-symbol "definition")))
              

Helm was the another one extension similiar with ivy did, but with more powerful. We do not using it by default because it’s heavy volumn as for. But we using other minor tool based on it e.g. helm-ag which binded to C-c j.

Emacs-W3m

Emacs internal browser eww was pure and enough for simple text web browing using as. we also combine emacs-w3m into entropy-emacs for providing full rich browsing experience for terminal or for keeping the using feeling constant full with emacs as well.

One reason for doing this was that emacs now can not retrieving https content using the external proxy.

The origin keybindings and UI default setting for emacs-w3m was minor strange as so, we hacking thus for:

  • UI reconfig
  • Adding external browser quickly going for by keybinding B.
  • Automatically proxy with specific rule setting.(using feature powerd by entropy-proxy-url)

For using emacs-w3m you need the external cli programe w3m installed, see the w3m home page http://w3m.sourceforge.net/.

And onekey for open it with M-x w3m. Go go go …

Elfeed

Did you thought about for feeding rss rely on emacs only?

Melpa package elfeed given the try for. The only operation you need to do is calling M-x elfeed thus as.

Elfeed was the rss feeds viewing, management program written of elisp, the only alternative external requirements is ‘curl’, which for push the feeds retrieving task for subprocess for reducing emacs self performance consumption.

origin elfeeds feeds naming string querying searching support was not support cjk unicode as, we given the try for hacking with by using self built func entropy/emacs-tools-elfeed-filter-by-tag, as more hacking see below:

  • Feature adding of searching feed according to feed title name. Binding to A.
  • Tag filter with query promting, binding to B.
  • Auto rename feed-title with hyphenation ‘-‘.

    This is for fixing the problem by feed title name with space that can not be detective by origin internal funcs.

  • Repeatly removing feeds.
  • Update feeds using proxy.

    Through manually setting proxy config through custom variable entropy/emacs-elfeed-proxyfeeds-regexp-list. (with prompt for input as http://127.0.0.1:1080)

    Proxy updating with three methods:

    1. using manually feeds selecting by entropy/emacs-tools-elfeed-update-proxy.
    2. update feeds with regexp matching by entropy/emacs-tools-elfeed-update-proxyfeeds-regexp-match.
    3. upate all null feeds (without and entries obtained yet), using entropy/emacs-tools-elfeed-proxy-update-all-nil-feeds.

All the feeds filter can be reset with short cut S.

Gnus

For now, we just given gnus simply try with the local file directory location config with one custom variable entropy/emacs-gnus-init-config try see coding snippet for the details.

Emacs on windows

Emacs was originally built for gnu/linux, compatible with UNIX-like OS. Windows port was built for be as the reason by:

We support GNU Emacs on proprietary operating systems because we hope this taste of freedom will inspire users to escape from them.

excerpt from: https://www.gnu.org/software/emacs/manual/html_node/emacs/Microsoft-Windows.html#Microsoft-Windows

‘Taste’ notice for, but more than this prudent meaning.

I thought the reason for ‘taste’ annotaion quoting for this as the declaration was that WINDOWS was designed by the different tree fork sibling as the rebeler against UNIX. Thus the OS internal process mechnism was not full compat with the origin emacs design conceptual.

But, actually I am one emacser port on w32. Mine experience was fully sensitive acquiring the almost fully features covered as on linux, just with some explicit non-compatible feature which came from the OS feature forking on. One of them was shell interface bash intern and the rest was some feature’s bug caused by the w32 api iteration.

Although, the hacking for emulating the whole linux emacs using environment by us was not full featured as, but I thoughts following WINDOWS emacs using was enough for daily using just with minor trouble for.

Bash and unix tool chains for windows

We using Msys2 as the bash shell emulator for emacs windows port, this is also the wild used of other windows gui to do with. Msys2 was the integrated project consists of cygwin and mingw, both of them are the windows gnu tool chains and differences of whether abiding with the POSIX rule.

For integrated Msys2 into emacs, was using the way for adding the tool-chain path binding with emacs internal path variable, both from the shell path detectived “PATH” obtained by (getenv "PATH") and the exec-path.

Portable emacs environment on windows

Emacs has the relative path specification variable invocation-directory and data-directory, both of them are internally built which can auto re-set before emacs started.

The portale of emacs config was depent on the config folder portable refer setting, i.e. HOME path portale specification. You can using those two variable to be the bridge to directed to the home path using the elisp code indicating:

(defvar device-root (concat (substring invocation-directory 0 -11) "Msys2/"))
(setenv "HOME" (expand-file-name (concat device-root "portable-HOME")))

As so, this config demo can be extending for each portable path setting.

Notice for key touching on windows

Emacs windows port distribution was built with mingw relied on msys2 toolchains, minor bugs was founded, the key touching bug especially.

There’s no key touching bug founded on WIN7, thus below description was refer to WIN10.

On WIN10, the win key was temporally frozen the other key taken up when OS session recovery from screen lock state, this was the annoying bug which caused by the new windows key chunks api refers, to recovery this by touching win key again.

Docs refers