unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#33208: 26.1; mark-defun gives incorrect results in some fixed format FORTRAN
@ 2018-10-30 17:11 Fairey, Robin M.
  2020-12-09 16:37 ` Lars Ingebrigtsen
  0 siblings, 1 reply; 5+ messages in thread
From: Fairey, Robin M. @ 2018-10-30 17:11 UTC (permalink / raw)
  To: 33208

Starting from emacs -Q,
- Open a new fixed format fortran file ( C-x C-f t e s t . f o r <RET> )
- Populate it with the following text:
      SUBROUTINE ONE

      END SUBROUTINE
C------------------------------------------------------------------------
      SUBROUTINE TWO

      END SUBROUTINE
C------------------------------------------------------------------------
      SUBROUTINE THREE

      END SUBROUTINE

Position point on line 6 (the blank line in TWO), and observe that
M-x mark-defun marks TWO and THREE instead of just TWO.

Inserting an additional newline between the comment line and the start
of TWO results in correct behaviour.

In GNU Emacs 26.1 (build 1, x86_64-w64-mingw32)
 of 2018-05-30 built on CIRROCUMULUS
Repository revision: 07f8f9bc5a51f5aa94eb099f3e15fbe0c20ea1ea
Windowing system distributor 'Microsoft Corp.', version 10.0.17134

Configured using:
 'configure --without-dbus --host=x86_64-w64-mingw32
 --without-compress-install 'CFLAGS=-O2 -static -g3''

Configured features:
XPM JPEG TIFF GIF PNG RSVG SOUND NOTIFY ACL GNUTLS LIBXML2 ZLIB
TOOLKIT_SCROLL_BARS THREADS LCMS2

Important settings:
  value of $LANG: ENG
  locale-coding-system: cp1252

Major mode: Fortran

Minor modes in effect:
  which-function-mode: t
  show-paren-mode: t
  delete-selection-mode: t
  cua-mode: t
  global-eldoc-mode: t
  mouse-wheel-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  column-number-mode: t
  line-number-mode: t
  transient-mark-mode: t
  abbrev-mode: t

Load-path shadows:
None found.

Features:
(shadow sort mail-extr emacsbug message rmc puny seq byte-opt gv
bytecomp byte-compile cconv dired dired-loaddefs format-spec rfc822 mml
mml-sec password-cache epa derived epg epg-config gnus-util rmail
rmail-loaddefs mm-decode mm-bodies mm-encode mail-parse rfc2231
mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums
mm-util mail-prsvr mail-utils fortran cus-edit easymenu wid-edit
elec-pair which-func imenu paren linum cus-start cus-load easy-mmode
delsel cua-base edmacro kmacro cl-loaddefs cl-lib compile comint
ansi-color ring time-date mule-util tooltip eldoc electric uniquify
ediff-hook vc-hooks lisp-float-type mwheel dos-w32 ls-lisp disp-table
term/w32-win w32-win w32-vars term/common-win tool-bar dnd fontset image
regexp-opt fringe tabulated-list replace newcomment text-mode elisp-mode
lisp-mode prog-mode register page menu-bar rfn-eshadow isearch timer
select scroll-bar mouse jit-lock font-lock syntax facemenu font-core
term/tty-colors frame cl-generic cham georgian utf-8-lang misc-lang
vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932
hebrew greek romanian slovak czech european ethiopic indian cyrillic
chinese composite charscript charprop case-table epa-hook jka-cmpr-hook
help simple abbrev obarray minibuffer cl-preloaded nadvice loaddefs
button faces cus-face macroexp files text-properties overlay sha1 md5
base64 format env code-pages mule custom widget hashtable-print-readable
backquote w32notify w32 lcms2 multi-tty make-network-process emacs)

Memory information:
((conses 16 130339 12789)
 (symbols 56 23060 1)
 (miscs 48 54 129)
 (strings 32 36988 1359)
 (string-bytes 1 987122)
 (vectors 16 16244)
 (vector-slots 8 507996 7504)
 (floats 8 65 211)
 (intervals 56 396 0)
 (buffers 992 14))



CONFIDENTIALITY NOTICE: This email message and any attachments to it, is intended only for the individual or entity to which it is addressed and may contain confidential material. If you are not the intended recipient, or the employee or agent responsible for delivering it to the intended recipient, please do not disclose, copy, forward, or retain. If you have received this in error, please contact the sender by reply email, erase the original message from your computer system, and destroy all copies of the original message.   Thank You.





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

* bug#33208: 26.1; mark-defun gives incorrect results in some fixed format FORTRAN
  2018-10-30 17:11 bug#33208: 26.1; mark-defun gives incorrect results in some fixed format FORTRAN Fairey, Robin M.
@ 2020-12-09 16:37 ` Lars Ingebrigtsen
  2020-12-10 21:01   ` Tomas Nordin
  0 siblings, 1 reply; 5+ messages in thread
From: Lars Ingebrigtsen @ 2020-12-09 16:37 UTC (permalink / raw)
  To: Fairey, Robin M.; +Cc: 33208

"Fairey, Robin M." <Robin.Fairey@iti-global.com> writes:

> Starting from emacs -Q,
> - Open a new fixed format fortran file ( C-x C-f t e s t . f o r <RET> )
> - Populate it with the following text:
>       SUBROUTINE ONE
>
>       END SUBROUTINE
> C------------------------------------------------------------------------
>       SUBROUTINE TWO
>
>       END SUBROUTINE
> C------------------------------------------------------------------------
>       SUBROUTINE THREE
>
>       END SUBROUTINE
>
> Position point on line 6 (the blank line in TWO), and observe that
> M-x mark-defun marks TWO and THREE instead of just TWO.
>
> Inserting an additional newline between the comment line and the start
> of TWO results in correct behaviour.

Looks like the interface of beginning-of-defun-function has changed --
it now takes an optional arg, and fortran-beginning-of-subprogram didn't
implement that.

I've now fixed that in Emacs 28, and mark-defun now seems to work fine
for me there.  (I don't know Fortran, so my testing is limited, though.)

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





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

* bug#33208: 26.1; mark-defun gives incorrect results in some fixed format FORTRAN
  2020-12-09 16:37 ` Lars Ingebrigtsen
@ 2020-12-10 21:01   ` Tomas Nordin
  2020-12-11 15:18     ` Lars Ingebrigtsen
  0 siblings, 1 reply; 5+ messages in thread
From: Tomas Nordin @ 2020-12-10 21:01 UTC (permalink / raw)
  To: Lars Ingebrigtsen, Fairey, Robin M.; +Cc: 33208

Lars Ingebrigtsen <larsi@gnus.org> writes:

> "Fairey, Robin M." <Robin.Fairey@iti-global.com> writes:
>
>> Starting from emacs -Q,
>> - Open a new fixed format fortran file ( C-x C-f t e s t . f o r <RET> )
>> - Populate it with the following text:
>>       SUBROUTINE ONE
>>
>>       END SUBROUTINE
>> C------------------------------------------------------------------------
>>       SUBROUTINE TWO
>>
>>       END SUBROUTINE
>> C------------------------------------------------------------------------
>>       SUBROUTINE THREE
>>
>>       END SUBROUTINE
>>
>> Position point on line 6 (the blank line in TWO), and observe that
>> M-x mark-defun marks TWO and THREE instead of just TWO.
>>
>> Inserting an additional newline between the comment line and the start
>> of TWO results in correct behaviour.
>
> Looks like the interface of beginning-of-defun-function has changed --
> it now takes an optional arg, and fortran-beginning-of-subprogram didn't
> implement that.
>
> I've now fixed that in Emacs 28, and mark-defun now seems to work fine
> for me there.  (I don't know Fortran, so my testing is limited, though.)

But does fortran-beginning-of-subprogram do what it documents now after
the fix when arg < 0?

I cannot recall ever writing anything in Fortran so I should just keep
silent, but I spent much time recently studying the beginning-of-defun
and friends, so this caught my eye.

Best regards
--
Tomas





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

* bug#33208: 26.1; mark-defun gives incorrect results in some fixed format FORTRAN
  2020-12-10 21:01   ` Tomas Nordin
@ 2020-12-11 15:18     ` Lars Ingebrigtsen
  2020-12-11 18:50       ` Tomas Nordin
  0 siblings, 1 reply; 5+ messages in thread
From: Lars Ingebrigtsen @ 2020-12-11 15:18 UTC (permalink / raw)
  To: Tomas Nordin; +Cc: Fairey, Robin M., 33208

Tomas Nordin <tomasn@posteo.net> writes:

> But does fortran-beginning-of-subprogram do what it documents now after
> the fix when arg < 0?

No, it was badly phrased -- it only affects what's the current
subprogram if we're between subprograms.  I've now made the doc string
more accurate.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





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

* bug#33208: 26.1; mark-defun gives incorrect results in some fixed format FORTRAN
  2020-12-11 15:18     ` Lars Ingebrigtsen
@ 2020-12-11 18:50       ` Tomas Nordin
  0 siblings, 0 replies; 5+ messages in thread
From: Tomas Nordin @ 2020-12-11 18:50 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: Fairey, Robin M., 33208

Lars Ingebrigtsen <larsi@gnus.org> writes:

> Tomas Nordin <tomasn@posteo.net> writes:
>
>> But does fortran-beginning-of-subprogram do what it documents now after
>> the fix when arg < 0?
>
> No, it was badly phrased -- it only affects what's the current
> subprogram if we're between subprograms.  I've now made the doc string
> more accurate.

Nice (for the Fortran hackers :)





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

end of thread, other threads:[~2020-12-11 18:50 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-30 17:11 bug#33208: 26.1; mark-defun gives incorrect results in some fixed format FORTRAN Fairey, Robin M.
2020-12-09 16:37 ` Lars Ingebrigtsen
2020-12-10 21:01   ` Tomas Nordin
2020-12-11 15:18     ` Lars Ingebrigtsen
2020-12-11 18:50       ` Tomas Nordin

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).