all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#66313: 29.1.50; process-mark sometimes does not yield the expected value
@ 2023-10-02 20:00 Markus Triska
       [not found] ` <handler.66313.B.169627630221147.ack@debbugs.gnu.org>
  0 siblings, 1 reply; 6+ messages in thread
From: Markus Triska @ 2023-10-02 20:00 UTC (permalink / raw)
  To: 66313

To reproduce this issue, please do the following:

  1) download ediprolog.el with:

     $ wget https://www.metalevel.at/ediprolog/ediprolog.el

  2) download simulans_a.sh with:

     $ wget https://www.metalevel.at/ei/process-mark/simulans_a.sh   

     This shell file will illustrate this issue in lieu of Scryer Prolog.

  3) make simulans_a.sh executable with:

     $ chmod +x simulans_a.sh

  4) create test1.pl and test2.pl, with the following commands:

     $ echo "?- X = a." > test1.pl
     $ echo "?- X = a." > test2.pl

  5) launch Emacs with:

     $ emacs -Q -l ediprolog.el --eval "(add-to-list 'exec-path \".\")" \
         --eval '(setq ediprolog-program "simulans_a.sh")' test1.pl test2.pl

Emacs now shows two windows, test2.pl in the upper window, and
test1.pl in the lower window. Initially, test2.pl is the selected
window, and point is on the query "?- X = a.". Now do:

    M-x ediprolog-dwim RET

As expected, the buffer will now consist of the following text:

    ?- X = a.
    %@    X = a.

Now, switch to the below window (test1.pl) with:

    C-x o

And there, do:

    M-x ediprolog-dwim RET

Unexpectedly, the buffer will consist of the following text:

    ?- X = a.
    %@ 
       X = a.

The newline after %@ is unexpected! The expected buffer content is:

    ?- X = a.
    %@ X = a.

This already illustrates a difference compared to Emacs 26.1, 27.1,
and other versions, which behave as expected.

To see more differences, switch back to the above window (test2.pl):

    C-x o

And move point to the first line (the line of the query) with:

    C-p

And then do:

    M-x ediprolog-dwim RET

Unexpectedly, the buffer will consist of the following text:

    ?- X = a.
    %@ 
    %@    X = a.
       X = a.

The expected text (at this state) is:

    ?- X = a.
    %@    X = a.
    %@    X = a.

Repeat these steps to see more unexpected behaviour. It seems that
process-mark sometimes does not yield the expected position.

ediprolog.el goes to the process-mark in line 431, which reads:

         (goto-char (process-mark ediprolog-process))

In all cases above, the process-mark is expected to yield the value 14
at this point of the program, but it does not always yield this value.

If possible, could you please restore the behaviour that earlier Emacs
versions exhibit in these examples?

Thank you and all the best,
Markus



In GNU Emacs 29.1.50 (build 1, x86_64-apple-darwin18.2.0, X toolkit,
 cairo version 1.17.6, Xaw scroll bars) of 2023-09-14 built on
 mac
Repository revision: f0a89fa1d0e5b380ecadb57052c95b31110c0323
Repository branch: emacs-29
Windowing system distributor 'The X.Org Foundation', version 11.0.11804000
System Description:  Mac OS X 10.14.2

Configured using:
 'configure --with-x-toolkit=lucid --without-ns
 CFLAGS=-I/opt/local/include/ LDFLAGS=-L/opt/local/lib
 --with-xpm=ifavailable'

Configured features:
ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GSETTINGS HARFBUZZ JPEG JSON
LCMS2 LIBXML2 MODULES NOTIFY KQUEUE PDUMPER PNG RSVG SQLITE3 THREADS
TIFF TOOLKIT_SCROLL_BARS TREE_SITTER WEBP X11 XDBE XIM XINPUT2 LUCID
ZLIB





^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2023-10-07 16:12 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-10-02 20:00 bug#66313: 29.1.50; process-mark sometimes does not yield the expected value Markus Triska
     [not found] ` <handler.66313.B.169627630221147.ack@debbugs.gnu.org>
2023-10-07 14:15   ` bug#66313: Acknowledgement (29.1.50; process-mark sometimes does not yield the expected value) Markus Triska
2023-10-07 15:03     ` Eli Zaretskii
2023-10-07 15:28       ` Markus Triska
2023-10-07 15:56         ` Eli Zaretskii
2023-10-07 16:12           ` Markus Triska

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.