alezost / dim.el Goto Github PK
View Code? Open in Web Editor NEWChange mode-line names of major/minor modes
Change mode-line names of major/minor modes
Because Unicode seems to take some time to load(about a sec). It would be nice if I can replace minor modes with bitmap. Also if bitmap is available there would be a huge possibility in the replacement.
BTW the stable mepla shield in README is broken.
Subj.
In my condition, I fetch minor mode names from minor-mode-alist
(Yes, my purpose is to hide all the minor mode names from mode line). However, I find some minor modes add their names to minor-mode-alist
after Dim definitions. Even if I use after-init-hook
, there are also some minor mode names staying unchanged because they are added afterwards. So, how do I fetch the whole list of minor-mode-alist
? (Load dim
as late as possible?)
(defun dim-hook ()
(mapc (lambda (mm) (dim-minor-name (car mm) "")) minor-mode-alist))
(add-hook 'after-init-hook 'dim-hook)
btw. Can I achieve my purpose using just (setq 'minor-mode-alist nil)
though it is quite rechless?
Thanks,
Isaac
I wanted to try out Dim to compare it to Delight which I've been using previously, and I really quote like the syntax for it. I am however having a problem, I have my configuration in a org file that I tangle to a init.el
. In text files I have auto-fill-mode
automatically activate and in Org files org-indent-mode
activate. Dim successfully changes the name of auto-fill-mode
to " F" when opening a Org file, and I want to hide org-indent-mode
too but it doesn't hide it when loading into org-mode files. Manually running C-x C-e on (dim-minor-name 'org-indent-mode "")
hides it, but not when opening the file. Any ideas? Delight does this correct.
Hi,
Thanks for developing this package.
I use rich-minority
along with smart-mode-line
to take care of abbreviating/hiding the minor mode lighter names.
I have heard of the cyphejor
package via this Emacs.SE post which does the job of abbreviating the major mode names automatically/manually.
How would you compare this package with rich-minority
and cyphejor
?
Also feel free to add an answer to that Emacs.SE question suggesting the use of this package as it seems fit.
In emacs 29 I get
Debugger entered--Lisp error: (wrong-type-argument stringp (dim-inhibit-major-name "C++//lh" "C++"))
string-match("\\(^[^/]*\\)/" (dim-inhibit-major-name "C++//lh" "C++"))
(if (string-match "\\(^[^/]*\\)/" mode-name) (match-string 1 mode-name) mode-name)
(let ((fmt (format "/%s%s%s%s%s" (if c-block-comment-flag "*" "/") (if c-electric-flag "l" "") (if (and c-electric-flag c-auto-newline) "a" "") (if c-hungry-delete-key "h" "") (if (and (boundp 'c-subword-mode) (symbol-value 'c-subword-mode)) "w" ""))) (bare-mode-name (if (string-match "\\(^[^/]*\\)/" mode-name) (match-string 1 mode-name) mode-name))) (setq mode-name (if (> (length fmt) 1) (concat bare-mode-name fmt) bare-mode-name)) (force-mode-line-update))
c-update-modeline()
https://github.com/emacs-mirror/emacs/blob/7493b4026fc74a51c76c5b614bc83b864af9bc31/lisp/progmodes/cc-cmds.el#L281 is the failing line.
Is this a wrong assumption in emacs/cc-cmds.el or dim being hacky?
In the About section: https://github.com/alezost/dim.el#about
In the second sentence:
This is an alternative to delight package (see Why? section below).
delight
links to:http://www.emacswiki.org/emacs/delight.el
It leads to an emacswiki page that says:
delight.el
This page does not exist, but you can create it now.
I'm not sure what the url should point to.
This seems to be the repositories source:
http://git.savannah.gnu.org/cgit/delight.git/
But in this dim.el repositories, README.org, Why? section, there is a link with the text delight
that leads to:
http://www.emacswiki.org/emacs/DelightedModes
The other readme.org links work, except for the already reported Why?
link.
Fix why? link in README #1
updated:
I find it. Sorry for this stupid question ๏ผ)
original:
Hi, could you explain the usage? I get confused about the example you showed in the readme.
(dim-major-names
'((emacs-lisp-mode "EL") ; **need to add mode name?**
(inferior-emacs-lisp-mode "EL>")
(calendar-mode "๐")))
(dim-minor-names
'((visual-line-mode " โฉ") ; **do we need add mode name here?**
(auto-fill-function " โต")
(eldoc-mode "" eldoc)
(whitespace-mode " _" whitespace)
(paredit-mode " ()" paredit))) ; **why we add mode name here?**
When need we add mode names? And can we edit the mode names?
Thank you :)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.