paldepind / composable.el Goto Github PK
View Code? Open in Web Editor NEWComposable text editing for Emacs.
License: GNU General Public License v3.0
Composable text editing for Emacs.
License: GNU General Public License v3.0
A great package! It would be nice if there is some visual feedback when entering composable commands.
Some examples:
evil-mode
, after we press d
, the cursor's height shrinks to a half.M-w
. easy-kill
adds an overlay to show the current copied region. It is very useful for commands that don't modify the buffer (M-w
etc.).C-w l l
). Help message could also be added, similar to what hydra does, showing the available object key bindings. Adding a variable to control whether the verbose help message should be displayed.EDIT: fix some typos.
In the god-mode readme you'll find the following example:
(defun god-toggle-on-overwrite ()
"Toggle god-mode on overwrite-mode."
(if (bound-and-true-p overwrite-mode)
(god-local-mode-pause)
(god-local-mode-resume)))
(add-hook 'overwrite-mode-hook 'god-toggle-on-overwrite)
What hooks does composable-mode provide in order to be able to pause god-mode? Otherwise in god-mode w}
results in god-mode complaining C-}
is not bound.
Currently, M-w
on an active region does not fall back like C-w
currently does. I think it's a bug.
When I run M-; } }
|(cursor)
(defclass variables ()
((eyes :initarg :eyes :accessor eyes)
(tongue :initarg :tongue :accessor tongue)
(thoughts :initarg :thoughts :accessor thoughts)))
(defun make-variables (eyes tongue thoughts)
(make-instance 'variables :eyes eyes :tongue tongue :thoughts thoughts))
Expected behavior:
;; (defclass variables ()
;; ((eyes :initarg :eyes :accessor eyes)
;; (tongue :initarg :tongue :accessor tongue)
;; (thoughts :initarg :thoughts :accessor thoughts)))
;; (defun make-variables (eyes tongue thoughts)
;; (make-instance 'variables :eyes eyes :tongue tongue :thoughts thoughts))
Current behavior:
;; ;; (defclass variables ()
;; ;; ((eyes :initarg :eyes :accessor eyes)
;; ;; (tongue :initarg :tongue :accessor tongue)
;; ;; (thoughts :initarg :thoughts :accessor thoughts)))
;; (defun make-variables (eyes tongue thoughts)
;; (make-instance 'variables :eyes eyes :tongue tongue :thoughts thoughts))
I get why that becomes that, but it's particularly annoying, especially when uncommenting (instead of commenting I showed here).
I would like to be able to use hydra with composable, but there is no variable with the keymap for composable-object-mode.
Firstly thanks for this great package. I think that new text object upper-sexp with behavior like expand-region will be very useful. I don't see package internals yet, but maybe I'll try to add this object and send PR if you agree to add it and don't want to do it yourself.
I've gotten used to which-key showing all my options, but that doesn't happen when compose-object-mode
, and it would be nice to see the various object commands I can use to help memorize them better.
It would be nice if either:
For example, suppose we have this line:
pos = curpos;
If point is on the c
character, C-w y
kills pos
instead of curpos
.
I use different themes for day and night and after activating composable
I see light mode line on dark theme.
Hi:
When the option mark-even-if-inactive
is nil
the package only gives errors because there is not mark.
The solution is to call the mark
command as (mark t)
to avoid the error and add a conditional when needed.
Hello,
Just run into problem with numeric prefixes. Tried several commands with them and seem like none of them are working properly. Here is my setup.
$ emacs -Q
composable
to load-path
(require 'composable)
(composable-mode)
So I am performing following steps.
first second third fourth
f
in first
C-w 3 f
I expect it to kill first second third
and leave fourth
. But instead it places fff
. Note that doing C-w f C-w f C-w f
works as expected as well as C-w f f f
.
Am I missing something?
P. S. M-w
, M-;
commands also insert f
or l
or whatever I used as target.
P. P. S. I am using emacs-25. Will try on emacs 24 a little bit later.
Hi Simon:
Could we consider to add composable to elpa? The most complex
part is to contact all the developers who contributed to this package with more than 15 lines of code and ask them to request a copyright assignment from the FSF; but with git shortlog -sne
I actually see that you are the only other than me. I already have the assignment; could you try to do it please?
Best,
Ergus
Here is some feedback regarding the README I just read. I can send a PR for some of these points if you want.
M-w . f
do?Hello,
When I have composable-mark-mode
enabled, popping the mark seems to do nothing (i.e. C-u C-SPC
).
I have tested this with the minimal configuration i.e. emacs -Q
, (load "composable-mark.el") (load "composable.el") (composable-mark-mode)
followed by pushing and popping the mark.
Halp!
Thanks,
Tom
When running M-w
(composable-save-region) when a region has already been delineated using transient mark mode, emacs reports an error:
Marker points into wrong buffer: #<marker in no buffer>
Version:
26.2
Steps to reproduce:
$ emacs -Q
evaluate (package initalize)
evaluate (composable-mode 1)
Select a region using movement while holding shift, then press M-w
to save the region.
When trying to kill in a readonly buffer, emacs remains in the state where it expects a move command.
There is also an error in post-command hook.
Notice also
Error in post-command-hook (composable--post-command-hook-handler): (buffer-read-only #<buffer scratch>)
The readme says C-w 10 l
should delete 10 lines but for me it just inserts 10 l characters. To get repeat to work I have to C-w . 5 l
. I have to use the '.' composable-end-argument in there.
I also tried this with emacs -Q and loading just composable-mode.
I am using emacs version 25.1.50.2
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.