gnu apl emacs - Package cl is depricated

2020-09-02 Thread Hans-Peter Sorge

Hi,

the recent update to emacs 27.1 gave me some headaches.

Starting emacs FILE, the warning 'Package cl is depricated' popped up 
and did not open FILE.


To make it short:

Emacs started with  path /usr/share/emacs/27.1/site-lisp in mind.
Then it did not find a proper file and continued to look at 
/usr/share/emacs/site-lisp
further ignoring path /usr/share/emacs/27.1/site-lisp for any further 
file lookup.

Moving /usr/share/emacs/site-lisp out of the way did resolve some quirks.
This note is just in case you run into this message "Package cl is 
depricated".


Back to gnu apl emacs:

My .emacs includes

;; apl mode
(add-to-list 'load-path "/TOP_LVL_PATH/gnu-apl-mode")
(require 'gnu-apl-mode)

Which results in "Package cl is depricated" (too).

Further digging led to  (include 'cl)  which has to be replaced by 
(include 'cl-lib).
Then subsequent errors popped up: loop, second, ... were not available 
any more.

They need to be replaced by cl-loop, cl-second, .

The attachment has the patch file.
I hope it helps.

Best Regards,
Hans-Peter

Nur in gnu-apl-mode: .apl.history.
Nur in gnu-apl-mode: .git.
diff -u gnu-apl-mode-master/gnu-apl-documentation.el 
gnu-apl-mode/gnu-apl-documentation.el
--- gnu-apl-mode-master/gnu-apl-documentation.el2020-01-08 
17:33:17.0 +0100
+++ gnu-apl-mode/gnu-apl-documentation.el   2020-09-02 15:14:26.086912730 
+0200
@@ -4,7 +4,7 @@
 ;;; Keymap buffer
 ;;;
 
-(require 'cl)
+(require 'cl-lib)
 (require 'gnu-apl-util)
 (require 'gnu-apl-network)
 
@@ -86,13 +86,13 @@
   (let ((header (car content))
 (lines (cdr content)))
 (list header
-  (loop for row in lines
+  (cl-loop for row in lines
 for trim-row = (gnu-apl--trim-spaces row)
 while (and (>= (length trim-row) 2) (string= (subseq 
trim-row 0 2) "⍝⍝"))
 collect (gnu-apl--remove-leading-space (subseq trim-row 
2
 
 (defun gnu-apl--get-doc-for-symbol (string)
-  (loop for e in gnu-apl--symbol-doc
+  (cl-loop for e in gnu-apl--symbol-doc
 for name = (car e)
 when (or (and (stringp name)
   (string= string name))
@@ -107,13 +107,13 @@
  (if full-text-p "\n%s\n\n" "\n%s\n")))
 (when doc
   (with-temp-buffer
-(loop for e in (second doc)
+(cl-loop for e in (cl-second doc)
   for first = t then nil
   unless first
   do (insert "\n")
   do (progn
-   (insert (format "%s: %s" (first e) (second e)))
-   (insert (format format-short (third e)))
+   (insert (format "%s: %s" (first e) (cl-second e)))
+   (insert (format format-short (cl-third e)))
(let ((long (fourth e)))
  (when long
(insert (format "%s\n" long)
@@ -133,7 +133,7 @@
 (when content
   (with-temp-buffer
 (insert (format "Function: %s\n\n" 
(gnu-apl--remove-local-variable-name (car content
-(loop for row in (cadr content)
+(cl-loop for row in (cadr content)
   for first = t then nil
   unless first do (insert "\n")
   do (insert row))
@@ -166,13 +166,13 @@
 (defun gnu-apl--name-at-point ()
   (let ((symbol-chars "[a-zA-Z0-9_∆⍙¯]"))
 (if (looking-at symbol-chars)
-(buffer-substring (save-excursion (loop while (and (> (point) 
(point-min))
+(buffer-substring (save-excursion (cl-loop while (and (> (point) 
(point-min))
(string-match 
symbol-chars
  
(buffer-substring (1- (point))

(point
 do (backward-char 1)
 finally (return (point
-  (save-excursion (loop while (< (point) (point-max))
+  (save-excursion (cl-loop while (< (point) 
(point-max))
 do (forward-char 1)
 while (looking-at symbol-chars)
 finally (return (point)
@@ -180,7 +180,7 @@
 (when (and ch
(member (char-to-string ch)
(mapcan #'(lambda (v) (let ((m (car v)))
-   (if (listp m) (copy-seq m) 
(list m
+   (if (listp m) (cl-copy-seq 
m) (list m
gnu-apl--symbol-doc)))
   (char-to-string ch))
 
@@ -303,7 +303,7 @@
 (let* ((key (match-string 1))
(found (cl-find key gnu-apl--symbols :key #'third :test 
#

Re: Could not compile gnu apl-1.8 on Fedora 32

2020-09-02 Thread Dr . Jürgen Sauermann

  
  
Hi Hans-Peter, Doug,
  
  thanks for the info.
  
  I made a few changes to improve matters. SVN 1343.
  Not sure if they help, though:
  
  * made libtinfo a weak dependency for the GNU APL RPM. According
  to
  rpm.org that should cause rpm try to install libtinfo but continue
  if that fails.
  There is an inherent problem here: the binary rpm may be built on
  a machine
  which has libtinfo installed (i.e. on my machine) and then
  installed on a
  machine which has not. The "proper" RPM solution for this would be
  to
  "Require: libtinfo" in the RPM but this is a bit too harsh since libtinfo is
optional as far as GU APL is concerned. This change only affects
the
installation from an RPM,

  * explicitly check for libtinfo in ./configure. That should
  prevent libtool from
    using -ltinfo if the libtinfo was not found.
  This change affects the building of GNU APL from source.
  
  The cleanest solution is still to install libtinfo but that is
  something that the
  GNU APL installation cannot enforce.
  
  Best Regards,
  Jürgen
  

On 9/1/20 11:40 AM, Hans-Peter Sorge
  wrote:


  
  Hi,
  
  just to let you know (FC32, most recent version). The dependency
  shows
  
  dnf deplist apl-1.8-0.x86_64.rpm
  .
    dependency: libstdc++.so.6(GLIBCXX_3.4.9)(64bit)
     provider: libstdc++-10.2.1-1.fc32.x86_64
    dependency: libtinfo.so.5()(64bit)
     provider: ncurses-compat-libs-6.1-15.20191109.fc32.x86_64
    dependency: libtinfo.so.5(NCURSES_TINFO_5.0.19991023)(64bit)
  
  
  Where as the current package installed is at 6.1:
  pkg-config --modversion /usr/lib64/pkgconfig/tinfo.pc
  6.1.20191109
  
  ->
  Installing:
  rpm -i --nodeps apl-1.8-0.x86_64.rpm
  
  /usr/bin/apl -v
  /usr/bin/apl: /lib64/libtinfo.so.5: no version
information available (required by /usr/bin/apl)
  BUILDTAG:
  -
      Project:    GNU APL
      Version / SVN:  1.8 / 15426M
      Build Date: 2019-06-23 13:45:31 UTC
      Build OS:   Linux 4.15.0-51-generic x86_64
      config.status:  default ./configure options
      Archive SVN:    15272

  --->
  Compiling from svn:
  apl -v
  BUILDTAG:
  -
      Project:    GNU APL
      Version / SVN:  1.8 / 1342M
      Build Date: 2020-09-01 09:28:50 UTC
      Build OS:   Linux 5.8.4-200.fc32.x86_64 x86_64
      config.status:  'CXXFLAGS=-Wno-maybe-uninitialized
-Wno-class-memaccess'
      Archive SVN:    1319
  
  
  The noticeable difference is the kernel version.
  
  Best Regards,
  Hans-Peter
  
  Am 31.08.20 um 18:19 schrieb Dr.
Jürgen Sauermann:
  
  

Hi Dough,
  
  see my comments inline below.
  
  Best Regards,
  Jürgen
  
  

On 8/21/20 5:41 PM, T.D. Telford
  wrote:


  
  
Hello,
Running Fedora 32.
  Downloaded apl-1.8.src.


***
in dir apl-1.8:
./configure 
...

  



  
configure: creating ./src//buildtag.hh
svn: E155007:
  '/home/doug/Downloads/apl-1.8.src/apl-1.8/src/Archive.cc'
  is not a working copy
configure: creating ./src/makefile.h
  

  

  


This may happen when GNU APL is not fetched via svn. The point
is to create a small file
called buildtag.hh in directory src. It normally
looks like this:

#include "Common.hh"
  #define BUILDTAG PACKAGE_NAME, PACKAGE_VERSION
" / 17072:17076M", "2020-08-10 09:27:53 UTC", "Linux
4.15.0-108-generic x86_64", "'--enable-maintainer-mode'
'DEVELOP_WANTED=yes' 'CXX_WERROR=yes'"
  #define ARCHIVE_SVN " 16972"
  
  If the file cannot be created for  some reason then
you can edit it manually like above
(possibly adjusting some of the values above. ./configure should
continue despite of the
error, so make after ./configure supposedly works.
 


  

  

  
configure: creating ./src/configure_args.cc