azynheira / distel

Automatically exported from code.google.com/p/distel
0 stars 0 forks source link

(certain) pattern matches do not work in session buffer #10

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Start session buffer
2. N={a,b}.
3. {ok, E} = {ok, foo}.

What is the expected output?
{ok,foo}

What do you see instead?
Error: {{error,{1,erl_parse,["syntax error before: ",["Error"]]}},
 {error,{4,erl_parse,["syntax error before: ",["'{'"]]}}}

What version of the product are you using? On what operating system?
4.0, Solaris + Suse Linux

Please provide any additional information below.

Same problem as described a long time ago:
http://osdir.com/ml/lang.erlang.distel.devel/2004-01/msg00006.html

Original issue reported on code.google.com by heinz.er...@gmail.com on 13 Aug 2008 at 9:25

GoogleCodeExporter commented 8 years ago
Well step 2. was the start of something else... not relevant

Original comment by heinz.er...@gmail.com on 14 Aug 2008 at 6:39

GoogleCodeExporter commented 8 years ago

Original comment by mats.cro...@gmail.com on 4 Sep 2008 at 2:31

GoogleCodeExporter commented 8 years ago
 problem is that this (from distel-ie.el erl-ie-eval-expression);
(re-search-backward "\\(\\`\\|^\\<\\)")
 backs up past the beginning of the expression. i don't know enough about elisp
regexps to tell what it's supposed to be, or even what it's supposed to do...

Original comment by mats.cro...@gmail.com on 5 Sep 2008 at 8:46

GoogleCodeExporter commented 8 years ago
I tried the following:

(defun erl-ie-eval-expression (node)
  (interactive (list (erl-ie-read-nodename)))
  (erl-ie-read-nodename)
  (let ((end (point))
    (beg (save-excursion
           (beginning-of-line)
           (point))))
    (erl-ie-evaluate beg end node t)))

It looks considerably less fancy but seems to work ok for current line 
evaluation.

Is the regexp etc intended to match an expression which streches over several 
lines?
I don't know.
See:
http://groups.google.com/group/gnu.emacs.help/browse_thread/thread/c001031b734e6
24e

Docs say:
C-j
    Evaluate the Erlang expression on the current line, and insert the result
in-line. (erl-ie-eval-expression) 

Another comment
erl-ie-evaluate (which is called by erl-ie-eval-expression) does handle 
evaluation of
expression in region.

Original comment by heinz.er...@gmail.com on 3 Mar 2009 at 11:31

GoogleCodeExporter commented 8 years ago
possibly fixed.

C-j treats the region from (the last blank line before point) - (point) as an 
expression.
evaluates it.
prints the result on the line below point.
does not move point.

Original comment by mats.cro...@gmail.com on 6 Mar 2009 at 5:41