GNU bug report logs -
#21195
25.0.50; Let MARKER arg to `set-marker' be a number
Previous Next
Reported by: Drew Adams <drew.adams <at> oracle.com>
Date: Wed, 5 Aug 2015 17:41:02 UTC
Severity: wishlist
Tags: wontfix
Found in version 25.0.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 21195 in the body.
You can then email your comments to 21195 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#21195
; Package
emacs
.
(Wed, 05 Aug 2015 17:41:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Drew Adams <drew.adams <at> oracle.com>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Wed, 05 Aug 2015 17:41:03 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
Minor enhancement request. Let `set-marker' (aka `move-marker') accept
a buffer position that is just a number as its first arg. IOW, give
`set-marker' this behavior:
(defun new-set-marker (num-or-marker position &optional buffer)
"..."
(unless (markerp num-or-marker)
(setq num-or-marker (with-current-buffer buffer
(copy-marker num-or-marker))))
(set-marker num-or-marker position buffer))
In GNU Emacs 25.0.50.1 (i686-pc-mingw32)
of 2015-07-03 on LEG570
Bzr revision: 2b848fadd51e805b2f46da64c5958ea7f009048a
Windowing system distributor `Microsoft Corp.', version 6.1.7601
Configured using:
`configure --host=i686-pc-mingw32 --enable-checking=yes,glyphs'
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#21195
; Package
emacs
.
(Sat, 30 Apr 2016 21:43:01 GMT)
Full text and
rfc822 format available.
Message #8 received at 21195 <at> debbugs.gnu.org (full text, mbox):
Drew Adams <drew.adams <at> oracle.com> writes:
> Minor enhancement request. Let `set-marker' (aka `move-marker') accept
> a buffer position that is just a number as its first arg. IOW, give
> `set-marker' this behavior:
>
> (defun new-set-marker (num-or-marker position &optional buffer)
> "..."
> (unless (markerp num-or-marker)
> (setq num-or-marker (with-current-buffer buffer
> (copy-marker num-or-marker))))
> (set-marker num-or-marker position buffer))
Hm... Well, I don't really see the point. `set-marker' is so
conceptually clean. And saying `(set-marker (make-marker) ...)' is so
easy. Closing.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
Added tag(s) wontfix.
Request was from
Lars Ingebrigtsen <larsi <at> gnus.org>
to
control <at> debbugs.gnu.org
.
(Sat, 30 Apr 2016 21:44:01 GMT)
Full text and
rfc822 format available.
bug closed, send any further explanations to
21195 <at> debbugs.gnu.org and Drew Adams <drew.adams <at> oracle.com>
Request was from
Lars Ingebrigtsen <larsi <at> gnus.org>
to
control <at> debbugs.gnu.org
.
(Sat, 30 Apr 2016 21:44:01 GMT)
Full text and
rfc822 format available.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#21195
; Package
emacs
.
(Sun, 01 May 2016 01:06:02 GMT)
Full text and
rfc822 format available.
Message #15 received at 21195 <at> debbugs.gnu.org (full text, mbox):
> > Minor enhancement request. Let `set-marker' (aka `move-marker') accept
> > a buffer position that is just a number as its first arg. IOW, give
> > `set-marker' this behavior:
> >
> > (defun new-set-marker (num-or-marker position &optional buffer)
> > "..."
> > (unless (markerp num-or-marker)
> > (setq num-or-marker (with-current-buffer buffer
> > (copy-marker num-or-marker))))
> > (set-marker num-or-marker position buffer))
>
> Hm... Well, I don't really see the point. `set-marker' is so
> conceptually clean. And saying `(set-marker (make-marker) ...)' is so
> easy. Closing.
Well, I said it was minor. Consider funcalling, applying, or
mapping over positions, which can be markers.
Sure, you can use an anonymous function that does just what
you need (test with markerp, copy-marker if not a marker)...
But why shouldn't `set-marker' do this? It's trivial and
costs only a call to `markerp' for doing what `set-marker'
does now.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Sun, 29 May 2016 11:24:13 GMT)
Full text and
rfc822 format available.
This bug report was last modified 9 years and 26 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.