logs archiveIRC Archive / Freenode / #emacs / 2015 / July / 28 / 1
Sonderblade
i wonder if there is a better way to express this elisp? (goto-char bracket-start) (re-search-forward "\\(.\\|\n\\)+" bracket-stop 'mv)
i just want to make an re match for two matched brackets
tali713
that's not regular.
tromey
you have to use parse-partial-sexp for bracket matching in the general case
Sonderblade
the brackets are already matched. i just want to mark the match efficiently
hodapp
(Action) installs a Scheme implementation on his phone
(Action) forgets why he installed Scheme on his phone
[fritz]
i once installed emacs on my phone. but it didnt start.
barx
I put haskell on my ipad. that didn't work out so well.
hodapp
I have run emacs on my Android devices before
but I mostly gave up on it
barx
there's an org-mode for ipad that is terrible.
         

bpalmer
Sonderblade: mark-sexp ?
ack006
there's maxima on android (which means lisp, too) :-)
very well done, much fun to use
bpalmer
some people shoot birds at pigs, and others do math.
hodapp
ack006: what's it called?
ack006
hodapp: maxima for android :-) https://sites.google.com/site/maximaonandroid/
*on
hodapp: https://play.google.com/store/apps/details?id=jp.yhonda&hl=en
who needs wolfram alpha web app on android when you can have 'real' lisp :)
(and maxima notation of course)
is that a CAS in your pocket, or are you just happy to see me?
Sonderblade
bpalmer: no. to clarify im just looking for a more efficent (re-search-forward "\\(.\\|\n\\)+" bracket-stop 'mv) the regexp in that re-search-forward is very dummy
bpalmer
so you know the start and end of your intended region, and you just need to mark it?
(set-mark bracket-start) (goto-char bracket-stop) (activate-region ) ?
(that last might be activate-mark in emacs)
and maybe push-mark rather than set-mark
JordiGH
e
Wait, I don't get it.
Can you comment on YouTube without a Google+ account now?
bpalmer
JordiGH: according to youtube's blog, "This one's further off. In the coming weeks, YouTube will no longer require a Google+ profile when you want to upload, comment, or create a channel."
JordiGH
Taaaaaaake meeee to the magic of a moment on a glooory night
Where the youtube of tomorrow trolls away...
In the wind of change.
Sonderblade
bpalmer: maybe "mark" was the wrong word. re-search-forward repositions point and sets some global regex match state
bpalmer
Sonderblade: Ah, I see. Your regular expression seems like the simplest way to alter that.
Sonderblade
bpalmer: so i want the match to be the character range [bracket-start,bracket-stop]
bpalmer
you could probably set-match-data , but it's not technically open to users.
C-h f match-data RET describes the format
(set-match-data (list bracket-start bracket-stop bracket-start bracket-stop)) or so.
Sonderblade
oh, alright. guess i'll have to live with the really bad regexp then?
"\\(.\\|\n\\)+" is intended to match one of more of everything until the end
parsnip
i need help with erc :(
it says ssl required
justmytwospence
how could i create a command that is like next-buffer, but limits itself to buffers of a particular mode (say, prog-mode)?
bpalmer
justmytwospence: filter (buffer-list)
parsnip
aha, had to use erc-tls
fommil
is there a variant of add-to-list that doesn't check for dupes?
         

wasamasa
use push, damnit
justmytwospence
j
tali713
fommil: the big feature of add-to-list is that it checks for dupes and can insert at tail. otherwise what wasamasa said.
bpalmer
or (setq foo (cons bar foo))
justmytwospence
i
tali713
or you could use that setf stuff.
wasamasa
tali713: push can add anywhere else actually
tali713
wasamasa: can it now, never checked.
aidalgol
setf is possible in elisp?
bpalmer
any where that has a setf-expander
wasamasa
tali713: its benefit is that it doesn't evaluate the variable again
aidalgol
What's the pre-requisite for that macro? Just "language must be a lisp-2"?
tali713
aidalgol: yes, been part of gv for a while now, the implementation is not CLs but the functionality is highly similar.
bpalmer
gv?
fsbot
gv is [0] A "generalized variable" or "place form" is one of the many places in Lisp memory where values can be stored, see M-: (info "(elisp) Generalized Variables")
[1] how you invoke ghostview, a ghostscript frontend to display postscript files and simple pdf files.
bpalmer
been part of cl-macs for ages.
tali713
bpalmer: yeah, but it's just plain ordinary elisp at this point, in gv.el.
fommil
grr, sorry I accidentally killed my buffer. I missed any answers to my Q about add-to-list without deduping
bpalmer
cl is plain ordinary elisp, other than that rms hates it
tali713
bpalmer: nah, I mean, yes its a built in library but it is a partial emulation of cl. gv.el is just a generic library.
bpalmer
fommil: push, setq l cons h l ,
tali713
fommil: don't use add-to-list when push is what you want. though you could use setf or setq, if you prefer.
fommil
bpalmer: heh, so simple
tali713
meanwhile even though gv exists, letf (which isn't implemented in cl) is part of cl-lib, when it should just be in gv.el /rant
fommil
bpalmer: tali713 I'm just reading about it now in 5.5 thanks
is there any kind of lint that goes through your lisp and finds (setq a (cons b a)) and offers to clean it up?
that'd be nice
no pop?
bpalmer
,df pop
fsbot
pop is a Lisp macro in `subr.el'.
(pop PLACE)
Return the first element of PLACE's value, and remove it from the list.
PLACE must be a generalized variable whose value is a list.
If the value is nil, `pop' returns nil but does not actually
change the list.
fommil
and what about an alternative to (setq num (1+ num)) ?
(interesting that pop is not documented alongside push)
fujisan_
fsbot help
fsbot
Type ,help
fujisan_
,help
fsbot
fujisan_, I heard help is [0/16] <http://www.emacswiki.org/emacs/ErBot>
[1] To talk, type , followed by a message whose first word is either a topic, or a command, or a lisp expression. Some interesting topics: data, example, quickstart, and suggest.
[2] help-more ..[Type ,more]
fujisan_
,df google me
fsbot
fs-google is an alias for `fsi-google' in `.emacs-fsbot'.
(fs-google &rest ARGS)
Not documented.
fujisan_
,df japanese android
fsbot
D'oh! No function or variable found matching japanese or fs-japanese.
fommil
generally, there are a bunch of operations where I would like to reassign the result to the primary input parameter. Is there a macro to do that?
« prev 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 next »