GNU bug report logs -
#17880
24.4.50; [FEATURE] abbrev with skeleton
Previous Next
Reported by: Leo Liu <sdl.web <at> gmail.com>
Date: Mon, 30 Jun 2014 01:12:02 UTC
Severity: wishlist
Found in version 24.4.50
Done: Lars Ingebrigtsen <larsi <at> gnus.org>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 17880 in the body.
You can then email your comments to 17880 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
monnier <at> iro.umontreal.ca, bug-gnu-emacs <at> gnu.org
:
bug#17880
; Package
emacs
.
(Mon, 30 Jun 2014 01:12:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Leo Liu <sdl.web <at> gmail.com>
:
New bug report received and forwarded. Copy sent to
monnier <at> iro.umontreal.ca, bug-gnu-emacs <at> gnu.org
.
(Mon, 30 Jun 2014 01:12:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
I was looking for packages to obsolete and find this expand.el. The
skeleton DSL is certainly more powerful. Comments?
BTW, we should be able to extend skeleton to cover snippet.el or
whatever nicely. I mean snippet.el/yas-snippet.el might not be the one
we want to converge to.
=== modified file 'lisp/abbrev.el'
--- lisp/abbrev.el 2014-05-27 01:09:45 +0000
+++ lisp/abbrev.el 2014-06-30 01:02:15 +0000
@@ -776,7 +776,7 @@
(let ((value abbrev))
;; If this abbrev has an expansion, delete the abbrev
;; and insert the expansion.
- (when (stringp (symbol-value abbrev))
+ (cond ((stringp (symbol-value abbrev))
(goto-char wordstart)
;; Insert at beginning so that markers at the end (e.g. point)
;; are preserved.
@@ -806,6 +806,9 @@
;; Change just that.
(upcase-initials-region (point) (1+ (point)))
(goto-char end))))))
+ ((consp (symbol-value abbrev))
+ (delete-char (- wordstart wordend))
+ (skeleton-insert (symbol-value abbrev))))
;; Now point is at the end of the expansion and the beginning is
;; in last-abbrev-location.
(when (symbol-function abbrev)
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#17880
; Package
emacs
.
(Mon, 30 Jun 2014 13:45:04 GMT)
Full text and
rfc822 format available.
Message #8 received at 17880 <at> debbugs.gnu.org (full text, mbox):
> I was looking for packages to obsolete and find this expand.el. The
> skeleton DSL is certainly more powerful. Comments?
Yes, expand.el might be a good candidate for obsolescence.
> BTW, we should be able to extend skeleton to cover snippet.el or
> whatever nicely. I mean snippet.el/yas-snippet.el might not be the one
> we want to converge to.
The discussion with Joao convinced me that "extending skeleton" is not
going to work quite right (IOW, it won't "cover it nicely"). So the
idea is rather to introduce yet-another thingy, but try to make sure
that skeleton.el can be rewritten as a "compatibility front-end", and
same for tempo.el.
Stefan
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#17880
; Package
emacs
.
(Mon, 30 Jun 2014 23:10:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 17880 <at> debbugs.gnu.org (full text, mbox):
On 2014-06-30 09:43 -0400, Stefan Monnier wrote:
> The discussion with Joao convinced me that "extending skeleton" is not
> going to work quite right (IOW, it won't "cover it nicely"). So the
> idea is rather to introduce yet-another thingy, but try to make sure
> that skeleton.el can be rewritten as a "compatibility front-end", and
> same for tempo.el.
Is the discussion available somewhere? The original snippet.el (the one
that stirred the whole interest of textmate snippet feature in emacs) is
string-based and the core concept is linking similar fields with naming
i.e. multiple occurences of $${filed_name} are changed together. So if
we introduce [field-name] (or :field-name) as a new element to skeleton
to do the same that would seem to offer the core of snippet. Just
thinking though. I have never used anything beyond the original
snippet.el which is only a few hundred lines.
Leo
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#17880
; Package
emacs
.
(Wed, 14 Jul 2021 09:41:01 GMT)
Full text and
rfc822 format available.
Message #14 received at 17880 <at> debbugs.gnu.org (full text, mbox):
Leo Liu <sdl.web <at> gmail.com> writes:
> I was looking for packages to obsolete and find this expand.el. The
> skeleton DSL is certainly more powerful. Comments?
[...]
> === modified file 'lisp/abbrev.el'
> --- lisp/abbrev.el 2014-05-27 01:09:45 +0000
> +++ lisp/abbrev.el 2014-06-30 01:02:15 +0000
> @@ -776,7 +776,7 @@
[...]
> + ((consp (symbol-value abbrev))
> + (delete-char (- wordstart wordend))
> + (skeleton-insert (symbol-value abbrev))))
I think the conclusion here was that we don't really want to make
abbrev.el depend on skeleton here, so the patch was never applied.
For the other issue -- I'm going to go ahead and guess that expand.el is
still used by people (because it's so simple that some people might
prefer it), so obsoleting it would be controversial, I think.
So I'm closing this bug report.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
bug closed, send any further explanations to
17880 <at> debbugs.gnu.org and Leo Liu <sdl.web <at> gmail.com>
Request was from
Lars Ingebrigtsen <larsi <at> gnus.org>
to
control <at> debbugs.gnu.org
.
(Wed, 14 Jul 2021 09:41:02 GMT)
Full text and
rfc822 format available.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Wed, 11 Aug 2021 11:24:12 GMT)
Full text and
rfc822 format available.
This bug report was last modified 2 years and 251 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.