From unknown Sat Aug 16 00:33:58 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#18556 <18556@debbugs.gnu.org> To: bug#18556 <18556@debbugs.gnu.org> Subject: Status: 24.4.50; update-file-autoloads never ends Reply-To: bug#18556 <18556@debbugs.gnu.org> Date: Sat, 16 Aug 2025 07:33:58 +0000 retitle 18556 24.4.50; update-file-autoloads never ends reassign 18556 emacs submitter 18556 Vincent Bela=C3=AFche =20 severity 18556 normal tag 18556 wontfix thanks From debbugs-submit-bounces@debbugs.gnu.org Thu Sep 25 00:08:51 2014 Received: (at submit) by debbugs.gnu.org; 25 Sep 2014 04:08:51 +0000 Received: from localhost ([127.0.0.1]:51486 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XX0MN-0007zf-Bn for submit@debbugs.gnu.org; Thu, 25 Sep 2014 00:08:51 -0400 Received: from eggs.gnu.org ([208.118.235.92]:51892) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XX0ML-0007zW-2c for submit@debbugs.gnu.org; Thu, 25 Sep 2014 00:08:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XX0MD-0006R3-Tc for submit@debbugs.gnu.org; Thu, 25 Sep 2014 00:08:49 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: ** X-Spam-Status: No, score=2.1 required=5.0 tests=AC_HTML_NONSENSE_TAGS, BAYES_50, FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:53297) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XX0MD-0006Hy-Pp for submit@debbugs.gnu.org; Thu, 25 Sep 2014 00:08:41 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53593) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XX0M2-0003lK-J0 for bug-gnu-emacs@gnu.org; Thu, 25 Sep 2014 00:08:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XX0Lw-0006Gt-7v for bug-gnu-emacs@gnu.org; Thu, 25 Sep 2014 00:08:30 -0400 Received: from smtp04.smtpout.orange.fr ([80.12.242.126]:60598 helo=smtp.smtpout.orange.fr) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XX0Lv-0006FN-CB for bug-gnu-emacs@gnu.org; Thu, 25 Sep 2014 00:08:24 -0400 Received: from CHOUNEK ([90.32.172.128]) by mwinf5d59 with ME id vG7r1o00C2maGi203G7rib; Thu, 25 Sep 2014 06:08:16 +0200 X-ME-Helo: CHOUNEK X-ME-Date: Thu, 25 Sep 2014 06:08:16 +0200 X-ME-IP: 90.32.172.128 From: =?iso-8859-1?Q?Vincent_Bela=EFche?= To: bug-gnu-emacs@gnu.org Subject: 24.4.50; update-file-autoloads never ends Date: Thu, 25 Sep 2014 06:07:33 +0200 Message-ID: <80wq8sbawq.fsf@gmail.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Debbugs-Envelope-To: submit Cc: =?iso-8859-1?Q?Vincent_Bela=EFche?= X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" --=-=-= Content-Type: text/plain Hello, I try the following where `$' denotes the shell prompt, and `-|' denotes printed output: $ emacs -Q --batch '--eval=(update-file-autoloads "balance.el" nil "~/.emacs.d/etc/my_autoloads.el")' -| Generating autoloads for balance.el... and my problem is that IT NEVER ENDS. Attached below is the balance.el file causing the trouble. ----------------------------------------------------------------------- --=-=-= Content-Type: application/emacs-lisp Content-Disposition: inline; filename=balance.el Content-Transfer-Encoding: quoted-printable ;;;; balance.el -- Major mode for recording transactions and balancing a ba= nk=0D ;;;; account. Based on balance-mode by Jason Baietto=0D ;;;; (jason@ssd.csd.harris.com) and Bob Newell=0D ;;;;=0D ;;;; $Date: 2014/09/25 04:05:31 $=0D ;;;; $Revision: 1.21 $=0D ;;;=0D ;;; Ce logiciel est r=E9gi par la licence CeCILL soumise au droit fran=E7ai= s et respectant les principes de=0D ;;; diffusion des logiciels libres. Vous pouvez utiliser, modifier et/ou re= distribuer ce programme sous les=0D ;;; conditions de la licence CeCILL telle que diffus=E9e par le CEA, le CNR= S et l'INRIA sur le site=0D ;;; "http://www.cecill.info".=0D ;;;=0D ;;; En contrepartie de l'accessibilit=E9 au code source et des droits de co= pie, de modification et de=0D ;;; redistribution accord=E9s par cette licence, il n'est offert aux utilis= ateurs qu'une garantie limit=E9e. Pour=0D ;;; les m=EAmes raisons, seule une responsabilit=E9 restreinte p=E8se sur l= 'auteur du programme, le titulaire des=0D ;;; droits patrimoniaux et les conc=E9dants successifs.=0D ;;;=0D ;;; =C0 cet =E9gard l'attention de l'utilisateur est attir=E9e sur les risq= ues associ=E9s au chargement, =E0=0D ;;; l'utilisation, =E0 la modification et/ou au d=E9veloppement et =E0 la r= eproduction du logiciel par l'utilisateur=0D ;;; =E9tant donn=E9 sa sp=E9cificit=E9 de logiciel libre, qui peut le rendr= e complexe =E0 manipuler et qui le r=E9serve=0D ;;; donc =E0 des d=E9veloppeurs et des professionnels avertis poss=E9dant d= es connaissances informatiques=0D ;;; approfondies. Les utilisateurs sont donc invit=E9s =E0 charger et test= er l'ad=E9quation du logiciel =E0 leurs=0D ;;; besoins dans des conditions permettant d'assurer la s=E9curit=E9 de leu= rs syst=E8mes et ou de leurs donn=E9es et,=0D ;;; plus g=E9n=E9ralement, =E0 l'utiliser et l'exploiter dans les m=EAmes c= onditions de s=E9curit=E9.=0D ;;;=0D ;;; Le fait que vous puissiez acc=E9der =E0 cet en-t=EAte signifie que vous= avez pris connaissance de la licence=0D ;;; CeCILL, et que vous en avez accept=E9 les termes.=0D ;;;=0D ;;;; Commentary:=0D ;;;=0D ;;; Put this file in your emacs load path and add the following lines to yo= ur=0D ;;; .emacs file:=0D ;;;=0D ;;; (autoload 'balance-mode "balance")=0D ;;; (setq auto-mode-alist=0D ;;; (append '(("\\.bal\\'" . balance-mode)) auto-mode-alist))=0D ;;;=0D ;;; Then, doing a find-file on "sample.bal" will automatically load the bal= ance=0D ;;; elisp and enter Balance major mode for the buffer visiting the file.=0D ;;; See the balance-mode mode help for details.=0D ;;; Balance will, if requested, remove a lot of old transactions and put it= in=0D ;;; a backup file. To automatically open a backup file in balance-mode, pu= t=0D ;;;=0D ;;; (autoload 'balance-mode "balance")=0D ;;; (setq auto-mode-alist=0D ;;; (append '(("\\.bal\\(?:\\.-?[0-9]+\\)?\\'" . balance-mode)) auto-= mode-alist))=0D ;;; in your .emacs file.=0D =0D ;;;; Code:=0D (require 'eieio)=0D (require 'calc-ext)=0D (require 'calc-forms)=0D (declare-function math-read-number-simple "calc" (s))=0D (declare-function find-lisp-find-files "find-lisp" (directory regexp))=0D =0D (defclass balance-object-writing-backreference ()=0D ((reference-list=0D :initarg :reference-list=0D :initform nil=0D :type list)=0D (next-reference=0D :initarg :next-reference=0D :initform 0=0D :type integer)=0D (context=0D :initarg :context=0D :initform nil=0D :type symbol=0D :documentation "Mettre =E0 :balance-main-buffer pour tracer le=0D tampon principal dans la feuille de suivi.")=0D (prev-context-list=0D :initarg :prev-context-list=0D :initform nil=0D :type list ))=0D :documentation "Une classe pour g=E9r=E9r les r=E9f=E9rences de type #N#= =0D pour le lecteur de lisp" )=0D =0D (defmethod balance-push-context ((this balance-object-writing-backreference= ) new-context)=0D (with-slots (context prev-context-list) this=0D (push context prev-context-list)=0D (setq context new-context)))=0D =0D (defmethod balance-pop-context ((this balance-object-writing-backreference)= )=0D (with-slots (context prev-context-list) this=0D (setq context (pop prev-context-list))))=0D =0D (defmethod balance-new-level ((this balance-object-writing-backreference))= =0D (with-slots (reference-list) this=0D (push nil reference-list)))=0D =0D (defmethod balance-up-level ((this balance-object-writing-backreference))=0D (with-slots (reference-list next-reference) this=0D (push (list next-reference) reference-list)=0D (prog1 next-reference=0D (setq next-reference (1+ next-reference)))))=0D =0D (defmethod balance-same-level ((this balance-object-writing-backreference))= =0D (with-slots (reference-list next-reference) this=0D (setcar reference-list (cons next-reference (car reference-list)))=0D (prog1 next-reference=0D (setq next-reference (1+ next-reference)))))=0D =0D (defmethod balance-latest-same-level ((this balance-object-writing-backrefe= rence))=0D (with-slots (reference-list) this=0D (caar reference-list)))=0D =0D (defmethod balance-down-level ((this balance-object-writing-backreference))= =0D (with-slots (reference-list next-reference) this=0D (let ((old-rl (pop reference-list)))=0D (when old-rl=0D (setq next-reference (car (last old-rl)))))))=0D =0D (defvar balance-o-object-writing-backreference=0D (make-instance 'balance-object-writing-backreference))=0D =0D (defclass balance-field-editor-base ()=0D ()=0D :documentation "Classe de base pour la repr=E9sentation d'un=0D =E9diteur de champ de feuille de suivi.")=0D =0D (defclass balance-field-editor-editable (balance-field-editor-base)=0D ((prompt :initarg :prompt=0D :type string)=0D (history-list :initarg :history-list=0D :initform nil=0D :type list)=0D (column :printer=0D #'(lambda (x)=0D (case (oref balance-o-object-writing-backreference :context)=0D (( :balance-main-buffer) (princ :super-1))=0D (t (princ x))))=0D ;; (princ (format "#%d#" (balance-latest-same-level balance-o-object-w= riting-backreference))))=0D :type balance-column))=0D :documentation "Classe pour la repr=E9sentation d'un =E9diteur de=0D champ de feuille de suivi, pour les champs =E9ditable")=0D =0D (defmethod balance-editable-p ((this balance-field-editor-editable))=0D t)=0D =0D (defclass balance-field-editor-text (balance-field-editor-editable)=0D ()=0D "Classe pour la repr=E9sentation d'un =E9diteur de champ de feuille=0D de suivi, pour les champs en texte libre (par exemple=0D description).")=0D =0D (defmethod balance-edit ((this balance-field-editor-text) def-input)=0D "Renvoie une liste (TEXT) o=F9 TEXT est le texte saisi par=0D l'utilisateur."=0D (with-slots ((hl history-list)) this=0D (let* ((history-list hl)=0D (field (read-string (concat (oref this :prompt) ": ")=0D def-input 'history-list)))=0D (setcar history-list (substring-no-properties (car history-list) 0))= =0D (setq hl history-list)=0D (list field))))=0D =0D (defclass balance-field-editor-date (balance-field-editor-editable)=0D ()=0D :documentation "Classe pour la repr=E9sentation d'un =E9diteur de=0D champ de feuille de suivi, pour un champ comprenant une=0D date (le champ date).")=0D =0D (defmethod balance-edit ((this balance-field-editor-date) def-input)=0D "Renvoie une liste (TEXT) o=F9 TEXT est le texte saisi par=0D l'utilisateur."=0D (setq def-input (or def-input (calcFunc-floor (calcFunc-now))))=0D (with-slots ((hl history-list) column) this=0D (let* ((calc-date-format (oref column :date-format))=0D (history-list hl)=0D (field (read-string (concat (oref this :prompt) ": ")=0D (math-format-date def-input)=0D 'history-list)))=0D (setcar history-list (substring-no-properties (car history-list) 0))= =0D (setq hl history-list=0D field (math-parse-date field))=0D (list field))))=0D =0D =0D (defclass balance-field-editor-transaction-type (balance-field-editor-edita= ble)=0D ()=0D :documentation "Classe pour la repr=E9sentation d'un =E9diteur de champ d= e feuille=0D de suivi, pour le champ donnant le type de transaction.")=0D =0D (defmethod balance-edit ((this balance-field-editor-transaction-type) def-i= nput)=0D "Renvoie une liste (TYPE CREDIT) o=F9 TYPE est une cha=EEne donnant=0D le type de transaction, et CREDIT est non nil si la transaction=0D est cr=E9ditrice (ie. ajoute au d=E9bit du compte)."=0D (with-slots ((hl history-list)) this=0D (let* ((history-list hl)=0D (field (completing-read (concat (oref this :prompt) ": ")=0D (oref (oref this column) :transaction-types)=0D nil nil def-input=0D 'history-list)))=0D (setcar history-list (substring-no-properties (car history-list) 0))= =0D (setq hl history-list)=0D (list field (eq (string-match "deposit" field) 0)))))=0D =0D (defclass balance-field-editor-amount (balance-field-editor-editable)=0D ()=0D :documentation "Classe pour la repr=E9sentation d'un =E9diteur de=0D champ de feuille de suivi, pour un champ comprenant une=0D date (le champ date).")=0D =0D (defmethod balance-edit ((this balance-field-editor-amount) def-input)=0D "Renvoie une liste (AMOUNT) o=F9 AMOUNT est un nombre flottant=0D EMACS-Calc donnant le montant de la transaction."=0D (let* ((calc-float-format '(fix 2))=0D (history-list (oref this :history-list))=0D (field (read-string (concat (oref this :prompt) ": ")=0D (and def-input (math-format-number def-input))=0D 'history-list)))=0D (setcar history-list (substring-no-properties (car history-list) 0))=0D (oset this :history-list history-list)=0D (list (math-float (calcFunc-neg (math-read-number-simple field))))))=0D =0D (defclass balance-field-editor-non-editable (balance-field-editor-base)=0D ()=0D :documentation "Classe pour l'=E9diteur de champ des champ=0D non-=E9ditable --- c'est =E0 dire qu'il n'y a pas d'=E9diteur de=0D champ.")=0D (defmethod balance-editable-p ((this balance-field-editor-non-editable))=0D nil)=0D =0D (defvar balance-o-field-editor-non-editable=0D (make-instance 'balance-field-editor-non-editable)=0D "=C9diteur pour champ non-=E9ditable --- c'est =E0 dire que cet=0D =E9diteur ne sert qu'=E0 marquer que le champ est non =E9ditable, et=0D non pas =E0 l'=E9diter.")=0D =0D (defface balance-comment-out-face=0D ;'((t (:slant italic)))=0D (get 'font-lock-comment-face 'face-defface-spec)=0D "Face used to highlight search matches in search result buffer."=0D :group 'balance)=0D =0D (defface balance-header-face=0D '((t (:bold t)))=0D "Face used to highlight search matches in search result buffer."=0D :group 'balance)=0D =0D (defface balance-footer-face=0D '((t (:bold t)))=0D "Face used to highlight search matches in search result buffer."=0D :group 'balance)=0D =0D (defface balance-record-number-face=0D '((t (:slant italic)))=0D "Face used to highlight search matches in search result buffer."=0D :group 'balance)=0D =0D (defface balance-date-face=0D '((t (:slant italic)))=0D "Face used to highlight search matches in search result buffer."=0D :group 'balance)=0D =0D (defface balance-clear-face=0D '((t (:bold t)))=0D "Face used to highlight search matches in search result buffer."=0D :group 'balance)=0D =0D (defface balance-type-face=0D '((t (:bold t)))=0D "Face used to highlight search matches in search result buffer."=0D :group 'balance)=0D =0D (defface balance-description-face=0D '((t (:bold t=0D :foreground "blue"=0D :group 'balance)))=0D "Face used to highlight search matches in search result buffer."=0D :group 'balance)=0D =0D (defface balance-sign-face=0D '((t (:bold t)))=0D "Face used to highlight search matches in search result buffer."=0D :group 'balance)=0D =0D (defface balance-amount-face=0D '((t (:bold t)))=0D "Face used to highlight search matches in search result buffer."=0D :group 'balance)=0D =0D (defface balance-current-balance-face=0D '((t (:bold t=0D :slant italic)))=0D "Face used to highlight search matches in search result buffer."=0D :group 'balance)=0D =0D (defface balance-cleared-face=0D '((t (:foreground "dim gray"=0D :slant italic)))=0D ; '((t (:weight light=0D ; :slant italic)))=0D "Face used to highlight search matches in search result buffer."=0D :group 'balance)=0D =0D (defface balance-escaped-face=0D '((t (:foreground "red" :bold t)))=0D "Face pour mettre en vedette les caract=E8res =E9chapp=E9s (par exemple l= es retour chariot)"=0D :group 'balance)=0D =0D (defface balance-transfer-face=0D '((t (:foreground "red" :bold t)))=0D "Face pour mettre en vedette un virement entre compte."=0D :group 'balance)=0D =0D (defclass balance-column ()=0D ((width :initarg :width=0D :type (integer 1 *))=0D (header :initarg :header=0D :type string)=0D (field-id=0D :initarg :field-id=0D :initform :none=0D :type symbol=0D :documentation "Identificateur du champ correspondant dans un=0D `balance-record'.")=0D (alignment :initarg :alignment=0D :type symbol=0D :initform :left=0D :documentation ":left ou :right selon l'alignement dans la colonne")=0D (field-face :initarg :field-face=0D :type symbol)=0D (field-editor :initarg :field-editor=0D :type balance-field-editor-base)=0D )=0D "Classe representant le format d'une colonne de feuille de=0D suivi, et notamment des champs de cette colonne.")=0D =0D (defmethod initialize-instance ((this balance-column) &rest fields)=0D (call-next-method)=0D (when (slot-boundp this :field-editor)=0D (with-slots (field-editor) this=0D (when (balance-editable-p field-editor)=0D (oset field-editor column this)) )))=0D =0D (defmethod balance-parse-field ((this balance-column) field record)=0D (eieio-oset record (oref this :field-id) field))=0D =0D (defmethod balance-decode-field ((this balance-column) tab-stop)=0D (let* ((field (buffer-substring-no-properties=0D (save-excursion (move-to-column tab-stop) (point))=0D (save-excursion (move-to-column (+ tab-stop (oref this :width))) (point= )))))=0D ;; suppression des blancs d'alignement=0D (case (oref this :alignment)=0D ((:right)=0D #1=3D(when (string-match "\\`\\s-+" field)=0D (setq field (substring field (match-end 0)))))=0D ((:left)=0D #2=3D(while (string-match "\\s-+\\'" field)=0D (setq field (substring field 0 (match-beginning 0)))))=0D ((:center) #1# #2#)=0D (t (error "Alignement de colonne incorrect `%S'" (oref this :alignmen= t))))=0D (let ((pos 0))=0D ;; des=E9chappement des ellipses=0D (while (string-match "\\(\013~?<\\)\\(.+\\)\\(\013>\\)" field pos)=0D (setq=0D pos (- (match-end 0) (length (match-string 1 field))=0D (length (match-string 3 field)))=0D field (replace-match "\\2" t nil field)))=0D ;; des=E9chappement des relaxation=0D (setq pos 0)=0D (while (string-match "\013_" field pos)=0D (setq pos (match-beginning 0))=0D (replace-match "" t nil field))=0D ;; des=E9chappement des retours chariot=0D (setq pos 0)=0D (while (string-match "\013\\([JMK]\\)" field pos)=0D (setq pos (1+ (match-beginning 0)))=0D (replace-match (string (logand 31 (aref (match-string 1 field) 0)))=0D t t field)))=0D field))=0D =0D (defmethod balance-encode-field ((this balance-column) field &optional tab= -stop)=0D (with-slots (width alignment field-face) this=0D (let* ((field-length (length field))=0D (escaped-field-length field-length)=0D (pos 0)=0D p=0D escape-cr-positions=0D (escaped-length (abs (- width field-length))))=0D (put-text-property 0 field-length 'face field-face field)=0D ;; =E9chappement des blancs=0D (case (oref this :alignment)=0D ((:left)=0D #1=3D(when (string-match "\\`\\s-" field)=0D (setq field (concat "\013_" field)=0D escaped-field-length (+ escaped-field-length 2)=0D pos (+ 2 pos))=0D (put-text-property 0 2 'invisible t field)))=0D ((:right)=0D #2=3D(when (string-match "\\s-\\'" field)=0D (setq field (concat field "\013_"))=0D (put-text-property escaped-field-length=0D (setq escaped-field-length (+ 2 escaped-field-length))=0D 'invisible t field)))=0D ((:center) #1# #2#)=0D (t (error "Alignement de colonne incorrect `%S'" (oref this :alignment))))= =0D ;; =E9chappement des retours chariot=0D (setq p pos)=0D (while (setq p (string-match "[\n\r\013]" field p))=0D (setq field (concat (substring field 0 p) "\013" (substring field p))=0D escaped-field-length (1+ escaped-field-length))=0D (put-text-property p (setq p (1+ p)) 'invisible t field)=0D (push p escape-cr-positions)=0D (aset field p (+ 32 (aref field p)))=0D (put-text-property p (1+ p) 'face 'balance-escaped-face field))=0D (if (<=3D field-length width)=0D ;; cas o=F9 le champ est plus court que la colonne=0D (case alignment=0D ((:left)=0D (setq field (concat field (make-string escaped-length 32))))=0D ((:right)=0D (setq field (concat (make-string escaped-length 32) field)))=0D ((:center)=0D (let ((wl (/ escaped-length 2)))=0D (setq field (concat (make-string wl 32)=0D field=0D (make-string (- escaped-length wl) 32)))))=0D (t (error "Alignement incorrect : `%S'" alignment)))=0D ;; cas o=F9 le champ est plus large que la colonne=0D (setq pos (+ pos (/ (- field-length escaped-length) 2))=0D pos (if (and (>=3D pos 1)=0D (=3D #o13 (aref field (1- pos)))) (1+ pos) pos))=0D (while (and escape-cr-positions (> pos (car escape-cr-positions)))=0D (pop escape-cr-positions))=0D (setq p (+ pos escaped-length))=0D (while (and escape-cr-positions (>=3D p (car escape-cr-positions)))=0D (pop escape-cr-positions)=0D (setq p (1+ p)))=0D (setq=0D p (if (>=3D 1 width) p (1+ p))=0D field (concat=0D (if (=3D 0 pos) "\013_" "")=0D (substring field 0 pos)=0D (if (>=3D 1 width) "\013<" "\013~<")=0D (substring field pos p)=0D "\013>"=0D (substring field p)))=0D (when (=3D 0 pos)=0D (put-text-property 0 2 'invisible t field)=0D (setq pos (+ 2 pos)=0D p (+ 2 p)))=0D (if (>=3D 1 width)=0D (setq p (+ 4 p))=0D (put-text-property pos (1+ pos) 'invisible t field)=0D (put-text-property (1+ pos) (setq pos (+ 2 pos)) 'face 'balance-escaped-= face field)=0D (setq p (+ 5 p)))=0D (put-text-property pos p 'invisible t field) ))=0D (let ((inhibit-read-only t))=0D (if tab-stop=0D (progn=0D (move-to-column tab-stop)=0D (delete-region (point) (progn (move-to-column (+ tab-stop width)) (poi= nt)))=0D (save-excursion (insert field)))=0D (insert field)))))=0D =0D (defclass balance-record-number-column (balance-column)=0D ()=0D :documentation "Format de colonne pour la colonne donnant le=0D num=E9ro d'enregistrement. Cette colonne n'est partinente que pour les ta= mpons secondaire")=0D (oset-default balance-record-number-column :field-id :record-number)=0D (oset-default balance-record-number-column :width 6)=0D (oset-default balance-record-number-column :alignment :center)=0D (oset-default balance-record-number-column :field-editor balance-o-field-ed= itor-non-editable)=0D (oset-default balance-record-number-column :header "R#")=0D (oset-default balance-record-number-column :field-face 'balance-record-numb= er-face)=0D =0D (defmethod balance-encode-field ((this balance-record-number-column) field= &optional tab-stop)=0D (setq field (number-to-string field))=0D (call-next-method this field tab-stop))=0D =0D (defmethod balance-parse-field ((this balance-record-number-column) field = record)=0D (oset record :record-number (string-to-number field)))=0D =0D (defclass balance-gap-column (balance-column)=0D ()=0D :documentation "Colonne factice servant d'espacement entre deux colonnes"= )=0D (oset-default balance-gap-column :width 1)=0D (oset-default balance-gap-column :header " ")=0D (oset-default balance-gap-column :field-editor balance-o-field-editor-non-e= ditable)=0D =0D (defmethod balance-encode-field ((this balance-gap-column) field &optional = tab-stop)=0D (let ((inhibit-read-only t) (width (oref this :width)))=0D (if tab-stop=0D (progn=0D (move-to-column tab-stop)=0D (delete-region (point) (+ (point) width))=0D (save-excursion (insert (make-string width 32))))=0D (insert (make-string width 32)))))=0D =0D (defmethod balance-parse-field ((this balance-gap-column) field record))=0D =0D (defclass balance-date-column (balance-column)=0D ((date-format :initarg :date-format=0D :documentation "Format de date au sens de Calc."))=0D :documentation "Format de colonne pour la colonne donnant la date.")=0D (oset-default balance-date-column :date-format '(X YYYY "-" MM "-" DD ("T" = HH ":" mm ":" SS)))=0D (oset-default balance-date-column :width 12)=0D (oset-default balance-date-column :field-id :date)=0D (oset-default balance-date-column :header "Date")=0D (oset-default balance-date-column :field-face 'balance-date-face)=0D =0D (defmethod initialize-instance ((this balance-date-column) &rest fields)=0D (let ((field-editor-field (plist-get fields :field-editor)))=0D (unless field-editor-field=0D (oset=0D (oset this :field-editor=0D (make-instance 'balance-field-editor-date=0D :prompt "Entrez la date"))=0D column this)))=0D (call-next-method))=0D =0D (defmethod balance-parse-field ((this balance-date-column) field record)=0D (let ((calc-date-format (oref this :date-format)))=0D (oset record :date (math-parse-date field))))=0D =0D (defmethod balance-decode-field ((this balance-date-column) tab-stop)=0D (with-slots ((calc-date-format date-format)) this=0D (math-parse-date (call-next-method this tab-stop))))=0D =0D (defmethod balance-encode-field ((this balance-date-column) field &optiona= l tab-stop)=0D (let ((calc-date-format (oref this :date-format)))=0D (setq field (math-format-date field)))=0D (call-next-method this field tab-stop))=0D =0D (defclass balance-state-column (balance-column) nil)=0D (oset-default balance-state-column :width 1)=0D (oset-default balance-state-column :field-id :state)=0D (oset-default balance-state-column :header "")=0D (oset-default balance-state-column :field-editor balance-o-field-editor-non= -editable)=0D (oset-default balance-state-column :field-face 'balance-type-face)=0D =0D ;;;###autoload=0D (defconst balance-transaction-type-list=0D '(=0D ("check " "Ch=E8que")=0D ("atm" "Guichet automatique") ;; Automatic teller machine .=0D ("bank" "Initi=E9 par la banque (frais)") ;; Initiated by the bank (f= ees, interest).=0D ("deposit" "D=E9pot non direct") ;; Non-direct deposits=0D ("teller" "Guichet") ;; Human at teller or drive through.=0D ("direct" "D=E9pot ou retrait direct") ;; Direct deposit or direct wi= thdrawl.=0D ("phone" "Initi=E9 par un t=E9l=E9phone =E0 touches vocales") ;; Init= iated over a=0D ;; touch-tone phone.=0D ("online" "Transaction bancaire en ligne") ;; On-line banking transac= tion.=0D ("pos" "Achat =E0 un point de vente (facture CB)") ;; Point of sale p= urchase (debit=0D ;; card).=0D ("misc" "divers") ;; Miscellaneous=0D ("" "Non pr=E9cis=E9") ;; Ceci permet les champs vide / This allows = blank type fields.=0D ))=0D =0D (defclass balance-transaction-type-column (balance-column)=0D ((check-type :initarg :check-type=0D :type string=0D :initform "check[ \t]+\\([0-9]+\\)"=0D :documentation "expression rationnelle pour les=0D types de transaction qui sont des paiement par ch=E8que. Le=0D premier groupe \\( \\) doit =EAtre le num=E9ro de ch=E8que." )=0D (check-number-decode=0D :initarg :check-number-decode=0D :type function=0D :initform math-read-number-simple=0D :documentation "Convertit une cha=EEne en un num=E9ro de ch=E8que,=0D la cha=EEne repr=E9sentant le num=E9or de ch=E8que." )=0D (check-transaction-type-encode=0D :initarg :check-transaction-type-encode=0D :type function=0D :documenation "Convertiy un num=E9ro de ch=E8que en un type de=0D transaction ch=E8que." )=0D (transaction-types=0D :initarg :transaction-types=0D "Liste des expressions valides autoris=E9e dans le champ =AB=A0type=0D de transaction=A0=BB. Cette liste permet l'auto-compl=E9tion lors de la=0D saisie. Toute autre valeur est une erreur et sera signal=E9 durant=0D le re-calcul du solde."))=0D :documentation "Format de colonne pour la colonne donnant le type de tra= nsaction.")=0D (oset-default balance-transaction-type-column :transaction-types=0D (mapcar 'car balance-transaction-type-list))=0D (oset-default balance-transaction-type-column :check-transaction-type-encod= e=0D #'(lambda (x)=0D (concat "check "=0D (math-format-number x))))=0D (oset-default balance-transaction-type-column :width 11)=0D (oset-default balance-transaction-type-column :field-id :transaction-type)= =0D (oset-default balance-transaction-type-column :header "Type")=0D (oset-default balance-transaction-type-column :field-face 'balance-type-fac= e)=0D (defmethod initialize-instance ((this balance-transaction-type-column) &res= t fields)=0D (let ((field-editor-field (plist-get fields :field-editor)))=0D (unless field-editor-field=0D (oset=0D (oset this :field-editor=0D (make-instance 'balance-field-editor-transaction-type=0D :prompt "Entrez le type de transaction"))=0D column this)))=0D (call-next-method))=0D =0D =0D (defclass balance-description-column (balance-column) nil )=0D (oset-default balance-description-column :width 25)=0D (oset-default balance-description-column :field-id :description)=0D (oset-default balance-description-column :header "Description")=0D (oset-default balance-description-column :field-face 'balance-description-f= ace)=0D (defmethod initialize-instance ((this balance-description-column) &rest fie= lds)=0D (let ((field-editor-field (plist-get fields :field-editor)))=0D (unless field-editor-field=0D (oset=0D (oset this :field-editor=0D (make-instance 'balance-field-editor-text=0D :prompt "Entrez la description"))=0D column this)))=0D (call-next-method))=0D =0D (defclass balance-sign-column (balance-column) nil )=0D (oset-default balance-sign-column :field-id :sign)=0D (oset-default balance-sign-column :width 1)=0D (oset-default balance-sign-column :header "")=0D (oset-default balance-sign-column :field-editor balance-o-field-editor-non-= editable)=0D (oset-default balance-sign-column :field-face 'balance-sign-face)=0D =0D (defmethod balance-encode-field ((this balance-sign-column) field &optiona= l tab-stop)=0D "La valeur pass=E9e pour FIELD est le champ :amount de=0D l'enregistrement, ou `t' dans le cas d'un solde."=0D (call-next-method this=0D (cond=0D ((eq field t) "=3D")=0D ((and field (Math-posp field)) "+")=0D (t ""))=0D tab-stop))=0D =0D (defmethod balance-parse-field ((this balance-sign-column) field record)=0D (cond=0D ((string=3D "+" field)=0D (if (slot-boundp record :amount)=0D (oset record :amount (calcFunc-neg (oref record :amount)))=0D (oset record :amount 0))=0D (oset record :is-balance-p nil))=0D =0D ((string=3D "=3D" field)=0D (oset record :is-balance-p t))=0D =0D (t=0D (oset record :is-balance-p nil)) ))=0D =0D (defclass balance-money-column (balance-column) nil)=0D (oset-default balance-money-column :width 9)=0D (oset-default balance-money-column :alignment :right)=0D =0D =0D (defclass balance-amount-column (balance-money-column) nil )=0D (oset-default balance-amount-column :field-id :amount)=0D (oset-default balance-amount-column :width 10)=0D (oset-default balance-amount-column :header "Montant")=0D (oset-default balance-amount-column :field-face 'balance-amount-face)=0D (defmethod initialize-instance ((this balance-amount-column) &rest fields)= =0D (let ((field-editor-field (plist-get fields :field-editor)))=0D (unless field-editor-field=0D (oset=0D (oset this :field-editor=0D (make-instance 'balance-field-editor-amount=0D :prompt "Entrez le montant"))=0D column this)))=0D (call-next-method))=0D =0D =0D (defmethod balance-encode-field ((this balance-amount-column) field &optio= nal tab-stop)=0D (call-next-method this=0D (cond=0D ((null field) "")=0D (t=0D (let ((calc-float-format '(fix 2)))=0D (math-format-number (calcFunc-abs field)))))=0D tab-stop))=0D =0D (defmethod balance-parse-field ((this balance-amount-column) field record)= =0D (oset record :amount=0D (funcall=0D (if=0D (and=0D (slot-boundp record :amount)=0D (=3D (oref record :amount) 0))=0D 'identity=0D #'(lambda (x) (when x (calcFunc-neg x))))=0D (math-read-number-simple field))))=0D =0D (defclass balance-balance-column (balance-money-column) nil )=0D (oset-default balance-balance-column :field-id :balance)=0D (oset-default balance-balance-column :header "Solde")=0D (oset-default balance-balance-column :field-face 'balance-current-balance-f= ace)=0D (oset-default balance-balance-column :field-editor balance-o-field-editor-n= on-editable)=0D =0D (defmethod balance-encode-field ((this balance-balance-column) field &opti= onal tab-stop)=0D (call-next-method this=0D (cond=0D ((null field) "")=0D (t=0D (let ((calc-float-format '(fix 2)))=0D (math-format-number field))))=0D tab-stop))=0D =0D (defmethod balance-parse-field ((this balance-balance-column) field record= )=0D (oset record :balance (math-read-number-simple field)))=0D =0D (defclass balance-transfer-column (balance-column) nil=0D :documentation "Colonne contenant le lien du compte source/destination du= virement.")=0D (oset-default balance-transfer-column :header "Virement")=0D (oset-default balance-transfer-column :field-id :transfer)=0D (oset-default balance-transfer-column :width 10)=0D (oset-default balance-transfer-column :field-editor balance-o-field-editor-= non-editable)=0D (oset-default balance-transfer-column :field-face 'balance-transfer-face)=0D =0D (deftype balance-math-natnum ()=0D '(satisfies math-natnump))=0D =0D (defclass balance-transfer nil=0D ((dest-account=0D :initarg :dest-account=0D :initform nil=0D :type (or null string))=0D (id-number=0D :initarg :id-number=0D :type balance-math-natnum=0D :documentation "Le num=E9ro de virement dans ce compte. Ce doit=0D =EAtre un identifiant unique dans ce compte-ci.")=0D (dest-id-number=0D :initarg :dest-id-number=0D :type balance-math-natnum=0D :documentation "Le num=E9ro de virement dans le compte=0D destinataire. Ce doit =EAtre un identifiant unique dans ce=0D compte-l=E0."))=0D "Indique un virement d'un compte =E0 un autre.")=0D =0D (defmethod balance-parse-field ((this balance-transfer-column) field recor= d)=0D (cond=0D ((string-match "\\`[[:blank:]]*\\'" field)=0D (oset record :transfer nil))=0D ((string-match "\\`[[:blank:]]*\\(\\\(?:[^\\:\r\n]\\|\\\\:\\)+\\):\\([0-= 9]+\\):\\([0-9]+\\)[[:blank:]]*\\'" field)=0D (let ((dest (save-match-data=0D (with-temp-buffer=0D (insert (match-string 1 field))=0D (goto-char (point-min))=0D (while (re-search-forward "\\\\." nil t)=0D (backward-char 2)=0D (delete-char 1)=0D (forward-char 1))=0D (buffer-substring (point-min) (point-max)))))=0D (id (math-read-number-simple (match-string 2 field)))=0D (dest-id (math-read-number-simple (match-string 3 field))))=0D (oset record :transfer=0D (make-instance 'balance-transfer=0D :dest-account dest=0D :id-number id=0D :dest-id-number dest-id))))))=0D =0D (defmethod balance-encode-field ((this balance-transfer-column) field &opt= ional tab-stop)=0D (call-next-method this=0D (cond=0D ((null (balance-transfer-p field)) "")=0D (t=0D (with-temp-buffer=0D (insert (oref field :dest-account))=0D (goto-char (point-min))=0D (while (re-search-forward "[:\\]" nil t)=0D (backward-char)=0D (insert "\\")=0D (forward-char))=0D (goto-char (point-max))=0D (insert ":" (math-format-number (oref field :id-number))=0D ":" (math-format-number (oref field :dest-id-number)))=0D (buffer-substring-no-properties (point-min) (point-max)))))=0D tab-stop))=0D =0D =0D (deftype balance-math-number ()=0D '(satisfies math-numberp))=0D =0D (defclass balance-record-base ()=0D ()=0D :documentation "Anc=EAtre commun =E0 `balance-record' et =E0=0D `balance-sequence-break'.")=0D =0D (defclass balance-record (balance-record-base)=0D ((record-number=0D :initarg :record-number=0D :type integer=0D :documentation "Le num=E9ro de ligne, en partant de z=E9ro, dans=0D le tampon principal. Dans un tampon secondaire, le contenu de=0D la colonne de type `balance-record-number-column'." )=0D (date=0D :initarg :date=0D :type list=0D :documentation "Date de l'enregistrement au format de date de=0D Calc" )=0D (transaction-type=0D :initarg :transaction-type=0D :type string=0D :documentation "Le type de transaction")=0D (description=0D :initarg :description=0D :type string)=0D (state=0D :initarg :state=0D :initform ""=0D :type string=0D :documentation "Indique si l'op=E9ration a =E9t=E9 compens=E9e ou non p= ar la banque."=0D )=0D (is-balance-p=0D :initarg :is-balance-p=0D :initform nil=0D :type boolean=0D :documentation "vrai (`t') si l'enregistrement donne un solde initial")= =0D (amount=0D :initarg :amount=0D :type (or null balance-math-number)=0D :documentation "Lorsque le slot is-balance-p est `nil', c'est=0D montant de la transaction. Ce montant est n=E9gatif pour un=0D d=E9bit (ma d=E9pense), et positif pour un cr=E9dit (mon=0D b=E9n=E9fice).")=0D (balance=0D :initarg :balance=0D :type (or null balance-math-number)=0D :documentation "Solde courant, apr=E8s que le montant dans le=0D slot `amount' a =E9t=E9 pris en compte.")=0D (transfer=0D :initarg :transfer=0D :initform nil=0D :type (or null balance-transfer)=0D :documentation "Lien vers l'op=E9ration en contre-partie")=0D )=0D :documentation "D=E9crit un enregistrement dans une feuille de=0D suivi.")=0D =0D (defmethod balance-commented-p ((this balance-record))=0D (string-match "%" (oref this :state)))=0D =0D (defmethod balance-is-balance-p ((this balance-record))=0D (and (null (string-match "%" (oref this :state)))=0D (oref this :is-balance-p)))=0D =0D (defmethod balance-cleared-p ((this balance-record))=0D (string-match "x" (oref this :state)))=0D =0D (defmethod balance-record-toggle-cleared ((this balance-record))=0D "Bascule l'=E9tat \"transaction compens=E9e\" (marqu=E9 par un=0D `x'). Renvoie un non-nil si l'=E9tat initial =E9tait que la=0D transaction =E9tait compens=E9e."=0D (let* ((state (oref this :state))=0D (cleared (string-match "x" state)))=0D (if cleared=0D (oset this :state (concat (substring state 0 cleared)=0D (let ((from (- cleared (length state) -1)))=0D (if (=3D 0 from) ""=0D (substring state from)))))=0D (oset this :state (concat state "x")))=0D cleared))=0D =0D (defmethod balance-record-toggle-commented ((this balance-record))=0D "Bascule l'=E9tat \"en commentaire\" (marqu=E9 par un `%'). Renvoie=0D un non-nil si l'=E9tat initial =E9tait que la transaction =E9tait=0D comment=E9."=0D (let* ((state (oref this :state))=0D (comment-out (string-match "%" state)))=0D (if comment-out=0D (oset this :state (concat (substring state 0 comment-out)=0D (let ((from (- comment-out (length state) -1)))=0D (if (=3D 0 from) ""=0D (substring state from)))))=0D (oset this :state (concat "%" state)))=0D comment-out))=0D =0D (defvar balance-o-buffer nil)=0D =0D (defmethod balance-insert ((this balance-record) column-list)=0D (end-of-line)=0D (let ((inhibit-read-only t))=0D (insert "\n"))=0D (with-slots (max-line) balance-o-buffer=0D (setq max-line (1+ max-line)))=0D (balance-write this column-list))=0D =0D (defmethod balance-write ((this balance-record) column-list)=0D "=C9crit un enregistrement dans un tampon de feuille de suivi.=0D =0D Le tampon courant =E0 l'appel est suppos=E9 =EAtre le tamon de feuille=0D de suivi consid=E9r=E9.=0D =0D COLUMN-LIST est la liste des colonnes `balance-column' pour le=0D tampon consid=E9r=E9.=0D =0D L'enregistrement sur la ligne courante est effac=E9. Aucun test=0D n'est fait pour savoir si le num=E9ro de ligne est entre=0D `:min-line' et `:max-line', l'appelant ayant la responsabilit=E9=0D d'assurer cette condition."=0D (end-of-line)=0D (let (beg end state)=0D (let ((inhibit-read-only t))=0D =0D (delete-region (save-excursion (beginning-of-line) (setq=0D beg (point))) (point)))=0D (dolist (col column-list)=0D (let ((field-id (oref col :field-id)))=0D (case field-id=0D ((:none)=0D (balance-encode-field col nil))=0D ((:balance)=0D (balance-encode-field col (and (slot-boundp this :balance)=0D (oref this :balance))))=0D ((:sign)=0D (balance-encode-field col (or (oref this :is-balance-p) (oref this :amo= unt))))=0D =0D (otherwise (balance-encode-field col (eieio-oref this field-id))))))=0D (setq end (point)=0D state (oref this :state))=0D (cond=0D ((string-match "%" state)=0D (overlay-put (make-overlay beg end nil t)=0D 'face 'balance-comment-out-face))=0D ((string-match "x" state)=0D (overlay-put (make-overlay beg end nil t)=0D 'face 'balance-cleared-face)))))=0D =0D (defmethod balance-read ((this balance-record) column-list)=0D (slot-makeunbound this :amount)=0D (save-match-data=0D (let ((record-text (save-excursion=0D (beginning-of-line)=0D (buffer-substring-no-properties=0D (point)=0D (progn=0D (end-of-line)=0D (point)))))=0D (pos-0 0)=0D pos=0D continue=0D field=0D tailing-blanks=0D pos-1=0D remainder=0D field-text=0D within-ellipsis; vrai quand on est dans une zone invisible d=E9limit=E9e= par ^K~< ... ^K>=0D )=0D (with-temp-buffer=0D (insert record-text)=0D (goto-char (setq pos-1 (point-min)))=0D (dolist (col column-list)=0D (setq pos-0 pos-1)=0D (let ((width (oref col :width)))=0D (setq pos-1 (if (>=3D width 0) (min (+ pos-0 width) (point-max)) (poin= t-max))=0D pos pos-0=0D remainder width=0D tailing-blanks ""=0D within-ellipsis nil)=0D (when (and=0D (memq (oref col :alignment)=0D '(:right :center))=0D (looking-at " +"))=0D (let ((filling-length=0D (min (- (match-end 0) pos-0)=0D remainder)))=0D (delete-region pos-0 (+ pos-0 filling-length))=0D (setq remainder (- remainder filling-length)=0D pos-1 (- pos-1 filling-length))))=0D (while=0D (progn=0D (if=0D (re-search-forward "\013\\(?:\\([KLJIM]\\)\\|\\(_\\)\\|\\(~?<\\)\\|= \\(>\\)\\)" nil t)=0D (progn=0D (setq continue t)=0D (cond=0D =0D ((match-string 3) ; cas ^K ~? <=0D (when within-ellipsis=0D (error "Codage d'un enregistrement: Ellipse re-entrante"))=0D (if (<=3D (match-beginning 0) pos-1)=0D (progn=0D (setq=0D within-ellipsis t=0D pos (match-beginning 0))=0D (when (string=3D (match-string 3) "~<")=0D (setq pos-1 (1- pos-1)=0D remainder (1- remainder)))=0D (delete-region (match-beginning 0)=0D (match-end 0)))=0D (setq continue nil)))=0D =0D ((match-string 4) ; cas ^K >=0D (unless within-ellipsis=0D (error "Codage d'un enregistrement: \=0D Marqueur de fin d'ellipse rencontr=E9, alors qu'elle n'a jamais =E9t=E9 com= menc=E9e"))=0D (let ((ellipsis-length (- (match-beginning 0) pos)))=0D (setq=0D pos-1 (+ pos-1 ellipsis-length)=0D remainder (+ remainder ellipsis-length)=0D within-ellipsis nil))=0D (delete-region (match-beginning 0)=0D (match-end 0)))=0D =0D ((match-string 1) ; cas ^K [KLJIM]=0D (when (or=0D within-ellipsis=0D (<=3D (point) (1+ pos-1)))=0D (let ((char (string (logand 31=0D (aref (match-string 1) 0)))))=0D (delete-region=0D (- 2 (point))=0D (point))=0D (insert char))))=0D =0D (t ; (match-string 2) ; cas ^K _=0D (if (< (match-beginning 0) pos-1)=0D (progn=0D (delete-region (match-beginning 0)=0D (match-end 0))=0D (when=0D (and (looking-at " +")=0D (>=3D (match-end 0) pos-1)=0D (memq (oref col :alignment)=0D '(:left :center))=0D (null within-ellipsis))=0D (setq pos (point)=0D continue nil=0D tailing-blanks (buffer-substring=0D (if (re-search-backward "[^ ]" nil t)=0D (max (1+ (point))=0D pos-0)=0D pos-0)=0D pos))=0D (goto-char pos-1)))=0D (setq continue nil))) ); (cond ... )=0D (if continue=0D t=0D .=0D #1=3D((setq field (buffer-substring pos-0=0D pos-1))=0D (goto-char pos-1)=0D nil)) ); (if (re-search-forward ...) (progn ...)=0D ;; cas o=F9 aucun ^K n'est trouv=E9=0D (when within-ellipsis=0D (error "Ellipse non close"))=0D . #1#))); (while ...)=0D (when (memq (oref col :alignment)=0D '(:left :center))=0D (when (string-match " +\\'" field)=0D (setq field (concat (substring field 0 (match-beginning 0))=0D tailing-blanks))))=0D (balance-parse-field col field this))))))=0D this)=0D =0D (defclass balance-sequence-break (balance-record-base)=0D ()=0D :documentation "=C0 ins=E9rer dans une liste d'enregistrement pour=0D indiquer une rupture dans la s=E9quence des enregistrement.")=0D =0D (defclass balance-sheet ()=0D (=0D ;(name=0D ; :initarg :name=0D ; :documentation "Nom de la feuille de suivi.")=0D (main-buffer=0D :type balance-buffer=0D :printer=0D #'(lambda (x)=0D (case (oref balance-o-object-writing-backreference :context)=0D (( :balance-main-buffer) (princ :super-1))=0D (t (princ x)))=0D ; (princ (format "#%d#"=0D ; (balance-latest-same-level balance-o-object-writing-backreference))= ))=0D ))=0D (current-record=0D :initarg :current-record=0D :type balance-record)=0D (transfer-id=0D :initarg :transfer-id=0D :initform 0=0D :type balance-math-natnum=0D :documentation "Num=E9ro du prochain virement.")=0D (secondary-buffers=0D :initform nil=0D :type list )=0D (footer-filler=0D :initarg :footer-filler=0D :type string=0D :initform "=3D=3D=3D.=3D=3D"=0D :documentation "Motif de remplissage de la ligne de bas de page.")=0D (header-filler=0D :initarg :header-filler=0D :type string=0D :initform "=3D=3D=3D.=3D=3D"=0D :documentation "Motif de remplissage de la ligne de haut de page."))=0D :documentation "Feuille de suivi." )=0D =0D (defmethod balance-current-record ((this balance-sheet) &optional record-nu= mber)=0D (balance-current-record (oref this main-buffer) record-number))=0D =0D =0D (defclass balance-calculation-result ()=0D ((balance=0D :initarg :balance=0D :initform nil=0D :documentation "Solde total"=0D :type (or null balance-math-number))=0D (uncleared=0D :initarg :uncleared=0D :initform nil=0D :documentation "Solde sur l'ensemble des transaction non compens=E9e"=0D :type (or null balance-math-number))=0D (changes=0D :initarg :changes=0D :initform 0=0D :type integer)=0D (total=0D :initarg :transactions=0D :initform 0=0D :type integer))=0D :documentation "Resultat d'un calcul de solde sur une feuille de suivi"= )=0D =0D (defmethod balance-update-result ((this balance-calculation-result) record)= =0D "Met =E0 jour le resultat du calcul de solde. Notez que RECORD=0D est aussi mis =E0 jour avec la valeur de solde."=0D ;; mise =E0 jour du solde=0D (unless (balance-commented-p record)=0D (oset this :transactions (1+ (oref this :transactions)))=0D (if (oref record :is-balance-p)=0D (oset this :balance (oref record :balance))=0D (let* ((amount (oref record :amount)))=0D (let ((current-balance (oref record :balance))=0D (new-balance (oset this :balance (math-add (or (oref this :balance) = 0) amount))))=0D (unless (and current-balance (Math-equal current-balance new-balance))=0D (oset this :changes (1+ (oref this :changes)))=0D (oset record :balance new-balance)))=0D (unless (balance-cleared-p record)=0D (oset this :uncleared (math-add (or (oref this :uncleared) 0) amount))))= )))=0D =0D (defmethod balance-display ((this balance-calculation-result))=0D (message=0D (let ((calc-float-format '(fix 2)))=0D (if=0D (oref this :uncleared)=0D (format=0D "Solde=3D%s, non compens=E9es=3D%s, compens=E9es=3D%s (%s/%s m.=E0.j)"=0D (math-format-number (oref this :balance))=0D (math-format-number (calcFunc-neg (oref this :uncleared)))=0D (math-format-number (math-sub=0D (oref this :balance)=0D (oref this :uncleared)))=0D (oref this :changes)=0D (oref this :transactions))=0D (format=0D "Solde=3D%s, toutes compens=E9es, (%s/%s m.=E0.j)"=0D (math-format-number (oref this :balance))=0D (oref this :changes)=0D (oref this :transactions)) ))))=0D =0D =0D (defclass balance-buffer ()=0D ((column-list=0D :initarg :column-list=0D :printer=0D (lambda (col-list)=0D (if col-list=0D (let (non-first=0D (trace-backreference=0D (case (oref balance-o-object-writing-backreference :context)=0D ; ((:balance-main-buffer)=0D ; (lambda (x)=0D ; (princ (format "%s#%d=3D"=0D ; x=0D ; (balance-same-level balance-o-object-writing-backreference)))))= =0D (t (symbol-function 'princ)))))=0D (balance-new-level balance-o-object-writing-backreference)=0D (dolist (col col-list)=0D (if non-first=0D (funcall trace-backreference "")=0D (funcall trace-backreference "(list ")=0D (setq non-first t))=0D (object-write col) )=0D (princ ")")=0D (balance-down-level balance-o-object-writing-backreference))=0D (princ "nil")))=0D :documentation "Une liste d'objets de type `balance-column'.")=0D (min-line :initarg :min-line=0D :type integer=0D :documentation "Num=E9ro de ligne de tampon emacs=0D correspondant =E0 la ligne 0 du tampon balance.")=0D (max-line :initarg :max-line=0D :type integer=0D :documentation "Num=E9ro de ligne de tampon emacs=0D correspondant =E0 la derni=E8re ligne du tampon balance.")=0D (associated-sheet :initarg :associated-sheet=0D :type balance-sheet=0D :documentation "Feuille de suivie associ=E9e dont ce tampon offre un= e vue.")=0D (buffer=0D :documentation "Tampon associ=E9, c'est =E0 dire le tampon o=F9 la=0D feuille est visible. Le `balance-buffer' doit =EAtre instanci=E9=0D alors que c'est le tampon courant")=0D (tab-stop-list :initarg :tab-stop-list=0D :type list=0D :documentation "Liste d'entiers donnant les num=E9ros de=0D colonne du tampon associ=E9 o=F9 se trouve la colonne=0D correspondante." ))=0D :documentation=0D "Classe reprensentant le format d'un tampon de feuille de suivi.")=0D =0D (defmethod object-write ((this balance-buffer) &optional comment)=0D (princ=0D (format (case (oref balance-o-object-writing-backreference :context)=0D ; ((:balance-main-buffer) "#%d=3D")=0D (t ""))=0D (balance-up-level balance-o-object-writing-backreference)))=0D (call-next-method))=0D =0D (defmethod balance-insert-head&bottom ((this balance-buffer))=0D (with-current-buffer (oref this buffer)=0D (let ((inhibit-read-only t))=0D (insert (balance-get-header this))=0D (oset this :max-line (line-number-at-pos))=0D (insert "\n" )=0D (oset this :min-line (line-number-at-pos))=0D (insert (balance-get-footer this) "\n") )))=0D =0D (defclass balance-main-buffer (balance-buffer)=0D ()=0D "Classe reprensentant le format d'un tampon principal de feuille de suivi= .")=0D =0D (defmethod balance-current-record ((this balance-main-buffer) &optional rec= ord-number)=0D (let ((record-number (or record-number (- (line-number-at-pos) (oref thi= s :min-line)))))=0D (when (and (<=3D record-number (- (oref this :max-line) (oref this :min= -line)))=0D (>=3D record-number 0))=0D (with-slots (associated-sheet column-list buffer) this=0D (with-slots (current-record) associated-sheet=0D (with-current-buffer buffer=0D (balance-read current-record column-list)))))))=0D =0D (defmethod balance-buffer-transpose-lines ((this balance-main-buffer) l-1 l= -2)=0D (with-slots (min-line max-line buffer column-list) this=0D ;; qq v=E9rif. pr=E9liminaires=0D (cond=0D ((null l-2)=0D (error "La marque n'est pas pos=E9e"))=0D ((progn (when (< l-2 l-1)=0D (let ((l l-2))=0D (setq l-2 l-1=0D l-1 l)))=0D (setq l-1 (max l-1 min-line)=0D l-2 (min l-2 max-line))=0D (=3D l-1 l-2))=0D (error "Lignes non transposables")))=0D (let (r1 r2)=0D (set-buffer buffer)=0D (balance-goto-line l-1)=0D (setq r1 (balance-read (make-instance 'balance-record "rec-1")=0D column-list))=0D =0D (balance-goto-line l-2)=0D (setq r2 (balance-read (make-instance 'balance-record "rec-2")=0D column-list))=0D (balance-write r1 column-list)=0D (balance-goto-line l-1)=0D (balance-write r2 column-list)=0D (balance-goto-line (min (1+ l-2) max-line)))))=0D =0D (defmethod balance-remove-cleared ((this balance-main-buffer))=0D (let ((min-line (oref this :min-line))=0D (max-line (oref this :max-line))=0D beg=0D date balance=0D beg-line end-line=0D is-balance-p=0D (record (make-instance 'balance-record))=0D (column-list (oref this :column-list))=0D removed-record-numbers=0D result=0D (removed-record-count 0))=0D (save-excursion=0D (balance-goto-line (setq beg-line min-line))=0D (while (<=3D beg-line max-line)=0D ;; trouve la prochaine transaction compens=E9e=0D (while (and=0D (null (balance-cleared-p (setq record (balance-read record= column-list))))=0D (< beg-line max-line))=0D (forward-line 1)=0D (setq beg-line (1+ beg-line)))=0D (setq is-balance-p nil=0D beg (point)=0D end-line beg-line)=0D ;; si une transaction compens=E9e a =E9t=E9 trouv=E9e, alors avance jusqu'= =E0 la=0D ;; derni=E8re transaction compens=E9e contigu=EB=0D (if (balance-cleared-p record)=0D (progn=0D (while=0D (progn=0D (setq date (oref record :date)=0D balance (oref record :balance)=0D is-balance-p (or is-balance-p=0D (balance-is-balance-p record))=0D end-line (1+ end-line))=0D (forward-line 1)=0D (and (<=3D end-line max-line)=0D (balance-cleared-p (setq record (balance-read record column-list))))))= =0D (push (cons beg-line end-line) removed-record-numbers)=0D (setq removed-record-count (+ removed-record-count=0D (- end-line beg-line 1))=0D result (balance-recalculate this beg-line (1- end-line)))=0D (let ((inhibit-read-only t))=0D (delete-region beg (point)))=0D (setq record=0D (make-instance 'balance-record=0D :record-number (- beg-line=0D min-line=0D removed-record-count=0D -1)=0D :date date=0D :transaction-type "cleared"=0D :description ""=0D :state "x"=0D :is-balance-p is-balance-p=0D :amount (unless is-balance-p=0D (oref result :balance))=0D :balance (if is-balance-p=0D (oref result :balance)=0D balance)))=0D (let ((inhibit-read-only t))=0D (save-excursion (insert ?\n)))=0D (balance-write record column-list)=0D (forward-line)=0D (setq beg-line end-line))=0D ;; aucune transcation compens=E9e trouv=E9e, alors on rompt la boucle.=0D (setq beg-line (1+ max-line)))))=0D (oset this :max-line (- max-line removed-record-count))=0D removed-record-numbers))=0D =0D (defmethod balance-recalculate ((this balance-buffer) min-line max-line &op= tional current-result)=0D "Calcule le solde sur un tampon. Renvoie un `balance-calculation-result'"= =0D (when (or (< min-line (oref this :min-line))=0D (> max-line (oref this :max-line)))=0D (error "MIN-LINE ou MAX-LINE hors de la plage autoris=E9e"))=0D (setq current-result (or current-result (make-instance 'balance-calculat= ion-result)))=0D (let ((current-record (make-instance 'balance-record))=0D (column-list (oref balance-o-buffer :column-list)))=0D (save-excursion=0D (balance-goto-line min-line)=0D (dotimes (i (- max-line min-line -1))=0D (balance-read current-record column-list)=0D (balance-update-result current-result current-record)=0D (balance-write current-record column-list)=0D (beginning-of-line 2) ))=0D current-result))=0D =0D (defmethod balance-summarize ((this balance-main-buffer)=0D min-line max-line=0D summary-order)=0D "Effectue un sommaire sur le tampon THIS."=0D (when (or (< min-line (oref this :min-line))=0D (> max-line (oref this :max-line)))=0D (error "MIN-LINE ou MAX-LINE hors de la plage autoris=E9e"))=0D (let* (record=0D summary-buffer=0D (cur-line min-line)=0D (associated-sheet (oref this :associated-sheet))=0D (secondary-buffers (eieio-oref associated-sheet 'secondary-buffers))=0D (column-list (oref this :column-list))=0D (summary (make-instance 'balance-summary))=0D summary-buffer-name)=0D (with-current-buffer (oref this buffer)=0D (balance-goto-line min-line)=0D (while (<=3D cur-line max-line)=0D (setq record (balance-read (make-instance 'balance-record=0D :record-number (- cur-line min-line))=0D column-list))=0D (balance-push summary-order record)=0D (setq cur-line (1+ cur-line))=0D (beginning-of-line 2)))=0D (balance-complete summary-order summary)=0D ;; instancie un tampon secondaire pour le sommaire=0D (setq summary-buffer-name=0D (concat "*" (oref summary :buffer-name) "*"))=0D (while secondary-buffers=0D (setq summary-buffer (pop secondary-buffers))=0D (if (string=3D=0D (buffer-name (oref summary-buffer buffer))=0D summary-buffer-name)=0D (setq secondary-buffers nil)=0D (setq summary-buffer nil)))=0D (if summary-buffer=0D (if (buffer-live-p (oref summary-buffer buffer))=0D (progn=0D (set-buffer (oref summary-buffer buffer))=0D (let ((inhibit-read-only t)=0D (pt-min (progn=0D (balance-goto-line (oref summary-buffer :min-line))=0D (point)))=0D (pt-max (progn=0D (balance-goto-line (oref summary-buffer :max-line))=0D (end-of-line)=0D (forward-char)=0D (point))))=0D (widen)=0D (when (> pt-max pt-min)=0D (delete-region pt-min pt-max))=0D (oset summary-buffer :max-line (1- (oref summary-buffer :min-line)))= ))=0D ;; le tampon-emacs a =E9t=E9 supprim=E9=0D (oset summary-buffer buffer=0D (get-buffer-create summary-buffer-name))=0D (balance-insert-head&bottom summary-buffer))=0D ;; pas de tampon-balance=0D (oset associated-sheet=0D secondary-buffers=0D (cons=0D (setq summary-buffer=0D (make-instance=0D 'balance-secondary-buffer=0D :associated-sheet associated-sheet=0D :column-list (cons=0D (make-instance 'balance-record-number-column)=0D (oref this :column-list))))=0D (oref associated-sheet secondary-buffers)))=0D (oset summary-buffer buffer (get-buffer-create summary-buffer-name))= =0D (balance-insert-head&bottom summary-buffer))=0D (set-buffer (oref summary-buffer buffer))=0D (set (make-local-variable 'balance-o-buffer) summary-buffer)=0D (setq buffer-read-only t)=0D (let ((inhibit-read-only t)=0D (column-list (oref summary-buffer :column-list)))=0D (balance-goto-line (1- (oref summary-buffer :min-line)))=0D (dolist (record (oref summary :record-list))=0D (balance-insert record column-list)))))=0D =0D (defmethod balance-first-latest-line ((this balance-buffer))=0D "Renvoie le num=E9ro de ligne de la derni=E8re transaction non=0D compens=E9e, en partant du bas."=0D (let ((line (oref this :max-line))=0D (min-line (oref this :min-line))=0D (column-list (oref this :column-list))=0D (record (make-instance 'balance-record)))=0D (with-current-buffer (oref this buffer)=0D (balance-goto-line line)=0D (while (and (null (balance-cleared-p=0D (setq record (balance-read record column-list))))=0D (> line min-line))=0D (forward-line -1)=0D (setq line (1- line))))=0D (if (balance-cleared-p record)=0D (1+ line)=0D line)))=0D =0D (defclass balance-secondary-buffer (balance-buffer)=0D ((record-number-tab-stop=0D :initarg :record-number-tab-stop=0D :type integer=0D )=0D (record-number-column=0D :initarg :record-number-column=0D :type balance-record-number-column=0D ))=0D :documentation=0D "Classe reprensentant le format d'un tampon secondaire de=0D feuille de suivi, par exemple un sommaire des paiements par=0D ch=E8que.")=0D =0D (defclass balance-summary-order ()=0D ((column-list=0D :initarg :column-list=0D :documentation=0D "Liste de colonnes du tampon sur lequel on fait le sommaire."=0D )=0D (summary-list=0D :initform nil=0D :documentation=0D "Liste des =E9l=E9ments du sommaire."))=0D :documentation=0D "Crit=E8re d'ordonnancement d'enrgistrements dans un=0D `balance-summary'"=0D :abstract t)=0D =0D (defclass balance-check-summary-order (balance-summary-order)=0D ((transaction-type-column=0D :type balance-transaction-type-column=0D )=0D (check-type=0D :type string=0D :documentation "La loge `check-type' de la loge=0D `transaction-type-column' de THIS." ))=0D :documentation=0D "Crit=E8re d'ordonnancement d'enregistrements de ch=E8que dans un=0D `balance-summary'" )=0D =0D (defmethod initialize-instance ((this balance-check-summary-order) &rest fi= elds)=0D (call-next-method)=0D (let ((column-list (oref this :column-list))=0D col)=0D (while column-list=0D (when (balance-transaction-type-column-p=0D (setq col (pop column-list)))=0D (oset this transaction-type-column col)=0D (oset this check-type (oref col check-type))=0D (setq column-list nil)))=0D (unless (slot-boundp this 'transaction-type-column)=0D (error "Impossible de faire un sommaire des ch=E8ques dans\=0D un tampon sans colonne donnant le type de transaction." ))))=0D =0D (defmethod balance-push ((this balance-check-summary-order)=0D record;(record balance-record)=0D )=0D "Renvoie nil si l'enregistrement RECORD n'est pas =E0 prendre=0D dans le sommaire. THIS est mis =E0 jour avec record sans faire de=0D clonage de record, c'est =E0 dire que THIS garde une r=E9f=E9rence sur=0D RECORD."=0D (with-slots (summary-list) this=0D (save-match-data=0D (and=0D (string-match (eieio-oref=0D (oref this transaction-type-column)=0D :check-type)=0D (oref record :transaction-type))=0D (push (cons (math-read-number-simple=0D (match-string 1 (oref record :transaction-type)))=0D record)=0D summary-list)))))=0D =0D (defclass balance-summary ()=0D ((record-list=0D :initarg :record-list=0D :type list=0D :documentation "Liste des enregistrement correspondant =E0 des=0D ch=E8ques. C'est une liste de `balance-record-base'." )=0D (sequence-break-count=0D :initarg :sequence-break-count=0D :type integer=0D :documentation "Nombre de ruptures de s=E9quence"=0D )=0D (element-count=0D :initarg :element-count=0D :type integer=0D :documentation "Nombre d'=E9l=E9ments.")=0D (buffer-name=0D :initarg :buffer-name=0D :type string=0D :documentation "Nom du tampon o=F9 est =E0 placer le sommaire"))=0D :documentation=0D "Sommaire des ch=E8ques compris dans un tampon.")=0D =0D (defmethod balance-complete ((this balance-check-summary-order)=0D summary;(summary balance-summary)=0D )=0D =0D (let ((summary-list (oref this summary-list))=0D record-list=0D (break-count 0)=0D (elt-count 0)=0D sequence-break=0D previous-summary-cell=0D this-summary-cell)=0D (setq summary-list=0D (sort summary-list=0D #'(lambda (x y)=0D (<=3D (math-compare (car x) (car y)) 0))))=0D (while summary-list=0D (setq elt-count (1+ elt-count))=0D (if record-list=0D (progn=0D (unless (Math-equal (math-add (car previous-summary-cell) 1)=0D (car (setq this-summary-cell (pop summary-list))))=0D (setq break-count (1+ break-count))=0D (push (or sequence-break=0D (setq sequence-break (make-instance 'balance-sequence-break) ))=0D record-list))=0D (push (cdr (setq previous-summary-cell this-summary-cell))=0D record-list))=0D (push (cdr=0D (setq previous-summary-cell (pop summary-list)))=0D record-list) ))=0D (oset summary :record-list (nreverse record-list))=0D (oset summary :element-count elt-count)=0D (oset summary :buffer-name "Sommaire des ch=E8ques")=0D (oset summary :sequence-break-count break-count))=0D (oset this summary-list nil))=0D =0D (defmethod balance-current-record ((this balance-secondary-buffer) &optiona= l record-number)=0D (let ((line-number (line-number-at-pos)))=0D (when (and (<=3D line-number (oref this :max-line))=0D (>=3D line-number (oref this :min-line)))=0D (unless record-number=0D (with-slots (record-number-column record-number-tab-stop) this=0D (setq record-number (balance-decode-field record-number-column record-nu= mber-tab-stop))))=0D (balance-current-record (oref this :associated-sheet) record-number))= ))=0D =0D (defmethod initialize-instance ((this balance-buffer) &rest fields)=0D ; (let ((facility (plist-member fields :facility)) facility-plist)=0D ; (when facility=0D ; (setq facility-plist (cadr facility))=0D ; (setcar facility (caddr facility))=0D ; (setcdr facility (cdddr facility)))=0D ; (when (plist-get facility-plist :is-main)=0D ; (let ((associated-sheet (plist-get fields :associated-sheet)))=0D ; (when associated-sheet=0D ; (oset associated-sheet :main-buffer this)))))=0D =0D (call-next-method)=0D ;; assure que les tabulations sont calcul=E9es au moins une fois=0D (balance-get-tab-stops this))=0D =0D (defmethod initialize-instance ((this balance-secondary-buffer) &rest field= s)=0D (call-next-method)=0D (let (found=0D (column-list (oref this :column-list))=0D (tab-stop 0))=0D (while column-list=0D (let ((col (pop column-list)))=0D (if (balance-record-number-column-p col)=0D (with-slots (record-number-tab-stop record-number-column) this=0D (setq=0D record-number-tab-stop tab-stop=0D record-number-column col=0D column-list nil=0D found t))=0D (setq tab-stop (+ tab-stop (oref col :width))))))=0D (unless found=0D (error "Colonne de num=E9ro d'enregistrement non trouv=E9e!"))))=0D =0D (defmethod balance-get-record-number ((this balance-main-buffer))=0D (let ((line-number (save-restriction (widen) (line-number-at-pos))))=0D (with-slots (min-line max-line) this=0D (when (and (>=3D line-number min-line) (<=3D line-number max-line))=0D (- line-number min-line)))))=0D =0D (defmethod balance-get-record-number ((this balance-secondary-buffer))=0D (save-restriction=0D (widen)=0D (let ((line-number (line-number-at-pos)))=0D (with-slots (min-line max-line record-number-tab-stop record-number-col= umn) this=0D (when (and (>=3D line-number min-line) (<=3D line-number max-line))=0D (string-to-number (balance-decode-field record-number-column record-number= -tab-stop)))))))=0D =0D (defmethod balance-get-tab-stops ((this balance-buffer))=0D "Renvoie la liste des crans de tabulation."=0D (unless (slot-boundp this 'tab-stop-list)=0D (let (tab-stop-l)=0D (with-slots (column-list) this=0D (let ((tab-stop 0))=0D (dolist (x column-list)=0D (when (balance-editable-p (oref x :field-editor))=0D (push tab-stop tab-stop-l))=0D (setq tab-stop (+ tab-stop (oref x :width))))))=0D (oset this :tab-stop-list (nreverse tab-stop-l))))=0D (oref this :tab-stop-list))=0D =0D (defmethod balance-get-header ((this balance-buffer))=0D "Renvoie la cha=EEne d'en-t=EAte"=0D (with-slots (column-list associated-sheet) this=0D (let* (header-title=0D (header-length 0)=0D (header-line-length 0)=0D field-width=0D field-title=0D header-line=0D (header-filler (oref associated-sheet :header-filler))=0D (header-filler-length (length header-filler) ))=0D (dolist (column column-list)=0D (setq field-width (oref column :width)=0D field-title (oref column :header)=0D field-title (if (>=3D (length field-title) field-width)=0D (substring field-title 0 (1- field-width))=0D field-title))=0D (push field-title header-title)=0D (push (make-string (- field-width (length field-title)) 32) header-title)= =0D (setq header-length (+ header-length field-width))=0D (unless (> header-filler-length 0)=0D (error "Motif de remplissage de bas de page vide!"))=0D (while (< header-line-length header-length)=0D (push header-filler header-line)=0D (setq header-line-length (+ header-line-length header-filler-length))))= =0D (let ((header (concat (apply 'concat (nreverse header-title))=0D "\n"=0D (substring (apply 'concat (nreverse header-line)) 0 header-length)))= )=0D (put-text-property 0 (length header) 'face 'balance-header-face header)=0D header))))=0D =0D (defmethod balance-get-footer ((this balance-buffer))=0D "Renvoie la cha=EEne de bas de page"=0D (with-slots (column-list associated-sheet) this=0D (let* ((footer-length 0)=0D (footer-line-length 0)=0D footer-line=0D (footer-filler (oref associated-sheet :footer-filler))=0D (footer-filler-length (length footer-filler) ))=0D (dolist (column column-list)=0D (setq footer-length (+ footer-length (oref column :width)))=0D (unless (> footer-filler-length 0)=0D (error "Motif de remplissage de bas de page vide!"))=0D (while (< footer-line-length footer-length)=0D (push footer-filler footer-line)=0D (setq footer-line-length (+ footer-line-length footer-filler-length))))= =0D (let ((footer=0D (substring (apply 'concat (nreverse footer-line)) 0 footer-length)))= =0D (put-text-property 0 (length footer) 'face 'balance-footer-face footer)=0D footer))))=0D =0D (defclass balance-buffer-imports ()=0D ((column-list =0D :initarg :column-list=0D :documentation "Une liste d'objets de type `balance-column'."))=0D :documentation=0D "Classe repr=E9sentant ce que l'on importe d'une autre feuille de=0D suivi lorsqu'on cr=E9e une nouvelle feuille de suivi.")=0D =0D (defvar balance-o-buffer-imports nil=0D "Si non nil, le balance-buffer-imports que la fonction=0D `balance-mode' utilise pour cr=E9er une feuille de suivi=0D ex-nihilo.")=0D =0D (defmethod balance-make-buffer-imports ((this balance-buffer))=0D "Instancie un balance-buffer-imports =E0 partir d'un balance-buffer"=0D (let ((imports (make-instance 'balance-buffer-imports))=0D (import-column-list (oref this :column-list))=0D gap=0D column-list)=0D (dolist (column import-column-list)=0D (if (and (balance-gap-column-p column) (null gap))=0D (progn=0D (setq gap (clone column))=0D (push gap column-list))=0D (push (clone column) column-list)))=0D (oset imports :column-list (nreverse column-list))=0D imports))=0D =0D (defmethod initialize-instance ((this balance-buffer-imports) &rest fields)= =0D (call-next-method)=0D (oset this :column-list=0D (let ((gap (make-instance 'balance-gap-column)))=0D (list=0D (make-instance 'balance-date-column)=0D gap=0D (make-instance 'balance-state-column)=0D gap=0D (make-instance 'balance-transaction-type-column)=0D gap=0D (make-instance 'balance-description-column)=0D gap=0D (make-instance 'balance-sign-column)=0D (make-instance 'balance-amount-column)=0D gap=0D (make-instance 'balance-balance-column)))))=0D =0D ;; Definitions=0D ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;=0D =0D (defvar balance-o-main-sheet nil)=0D (defvar balance-killed-rows nil)=0D =0D (defvar balance-mode-map nil=0D "Keymap for balance buffer.")=0D =0D (if balance-mode-map=0D ()=0D (setq balance-mode-map (make-sparse-keymap))=0D (define-key balance-mode-map "\C-x\C-t" 'balance-transpose-lines)=0D (define-key balance-mode-map "\C-c\C-b" 'balance-switch-buffer)=0D (define-key balance-mode-map [backtab] 'balance-backward-field); done=0D (define-key balance-mode-map [(shift tab)] 'balance-backward-field); don= e=0D (define-key balance-mode-map "\C-c\C-c" 'balance-recalculate-buffer)=0D (define-key balance-mode-map "\C-c\C-l" 'balance-recalculate-latest)=0D (define-key balance-mode-map "\C-c\C-k" 'balance-recalculate-region)=0D (define-key balance-mode-map "\C-c\C-x" 'balance-toggle-cleared)=0D (define-key balance-mode-map "\C-c;" 'balance-toggle-comment-out)=0D (define-key balance-mode-map "\C-c+" 'balance-toggle-credit)=0D (define-key balance-mode-map "\C-c\C-f" 'balance-forward-field); done=0D (define-key balance-mode-map "\C-c\C-n" 'balance-append-next-check)=0D (define-key balance-mode-map "\C-c\C-r" 'balance-summarize-checks-region= )=0D (define-key balance-mode-map "\C-c\C-s" 'balance-summarize-checks-buffer= )=0D (define-key balance-mode-map "\C-c\C-a" 'balance-append-transaction)=0D (define-key balance-mode-map [tab] 'balance-forward-field); done=0D (define-key balance-mode-map "\C-k" 'balance-kill-row)=0D (define-key balance-mode-map "\C-w" 'balance-kill-region)=0D (define-key balance-mode-map "\C-y" 'balance-yank-row)=0D (define-key balance-mode-map "\C-c\C-u" 'balance-next-uncleared)=0D (define-key balance-mode-map "\C-m" 'balance-toggle-hidden-cleared)= =0D (define-key balance-mode-map "=3D" 'balance-change-field)=0D (define-key balance-mode-map "C" 'balance-counterpart) )=0D =0D (defvar balance-mode-abbrev-table nil=0D "Abbrev table used while in balance mode.")=0D =0D (define-abbrev-table 'balance-mode-abbrev-table nil)=0D =0D (defgroup balance nil=0D "Paquetage pour maintenir une comptabilit=E9 domestique."=0D :group 'emacs)=0D (custom-add-version 'balance (substring "$Revision: 1.21 $" 11 -2) )=0D =0D (defcustom balance-load-hook nil=0D "Normal hook run at end of loading the `balance' package."=0D :group 'balance=0D :type 'hook)=0D =0D (defcustom balance-default-counterpart-transation-type=0D "direct"=0D "Type par d=E9faut d'une transaction en contre-partie."=0D :group 'balance=0D :type=0D (cons 'radio=0D (mapcar #'(lambda (x) (list 'const :tag (cadr x) (car x)))=0D balance-transaction-type-list)))=0D =0D ;; Code=0D ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;=0D (defun balance-goto-line (line)=0D (goto-char (point-min))=0D (forward-line (1- line)))=0D =0D (defun balance-warn (warn-message)=0D (warn warn-message))=0D =0D ;;;###autoload=0D (defun balance-mode()=0D "Mode majeur pour l'=E9dition d'un tampon contenant une comptabilit=E9 do= mestique.=0D Les raccourcis clavier suivant fournissent les fonctionalit=E9 principale d= e ce mode:=0D =0D \\[balance-append-transaction]\=0D Ajoute une transaction =E0 la fin du tampon.=0D \\[balance-append-next-check]\=0D Ajoute la transaction par ch=E8que suivante =E0 la fin du tampon.=0D \\[balance-recalculate-buffer]\=0D Recalcule le solde de toute les transactions dans le tamon.=0D \\[balance-recalculate-region]\=0D Recalcule le solde de toute les transactions dans la r=E9gi= on.=0D \\[balance-change-field] \=0D Change le contenu du champ courant.=0D \\[balance-summarize-checks-buffer]\=0D Produit un sommaire de tous les ch=E8ques dans le tampon.=0D \\[balance-summarize-checks-region]\=0D Produit un sommaire de tous les ch=E8ques dans la r=E9gion.=0D \\[balance-toggle-credit]\=0D Bascule si la ligne courante est un d=E9bit (le signe par=0D d=E9fault), a cr=E9dit (indiqu=E9 par \"+\"), ou fait que la=0D ligne courante =E9tablit le solde (ce qui est indiqu=E9 par le=0D signe \"=3D\").=0D =0D Quand une transaction est compens=E9e par la banque, ceci devrait=0D =EAtre not=E9 avec:=0D =0D \\[balance-toggle-cleared]\=0D Bascule qu'une transaction est marqu=E9e comme compens=E9e ou=0D non. Quand un tampon balance est ouvert la premi=E8re=0D fois, toutes les suites de transactions compens=E9es seront=0D remplac=E9es par des points de suspension. En tapant RET=0D sur les points de suspension, cela affichera les=0D transactions compens=E9es, et inversement toute transaction=0D compens=E9e peuvent =EAtre cach=E9e en tapant RET.=0D =0D Les transactions peuvent =EAtre tri=E9es avec=0D \\[balance-order-latest]\=0D Ordonne les derni=E8res =E9critures (celles enrgistr=E9es=0D depuis la derni=E8re compens=E9e en partant du bas de la=0D feuille de suivi) selon la date.=0D \\[balance-order-buffer]\=0D Ordonne toutes les =E9critures selon la date.=0D \\[balance-kill-row]\=0D Coupe l'=E9criture courante.=0D \\[balance-yank-row]\=0D Copie la derni=E8re =E9criture coup=E9e.=0D =0D En plus, les raccourcis clavier suivants sont d=E9finis pour simplifier l'= =E9dition de=0D transactions:=0D =0D \\[balance-forward-field]\=0D Avance sur le d=E9but du prochain champ (pareil que TAB).=0D \\[balance-backward-field]\=0D Recule sur le d=E9but du champ pr=E9c=E9dent (pareil que MAJ-TAB).= =0D =0D Chaque transaction occupe une seule ligne et comprend les champs=0D suivant (dans l'ordre d'apparation de gauche =E0 droite):=0D =0D Date La date de la transaction en format ISO-8601.=0D =0D type Ce champ peut =EAtre laiss=E9 blanc, =E7a peut =EAtre un = ch=E8que,=0D ou =EAtre =E9gal =E0 l'une des expressions d=E9finies=0D dans l'attribute `:transaction-types' de=0D l'objet de classe=0D `balance-transaction-type-column'.=0D =0D =C9tat =E9tat de la transaction, \"x\" signifie compens=E9.=0D =0D Description Une description de la transaction, peut =EAtre laiss=E9 b= lanc.=0D =0D Signe Ce champs vaut \"+\", \" \" ou \"=3D\".=0D + pour cr=E9dit, espace pour d=E9bit, et =3D pour initial= iser le solde.=0D =0D amount Le montant de la transaction. Vous devez entrer ce champ= .=0D =0D balance Votre solde apr=E8s cette transaction. Ce champs est=0D calcul=E9 lors du calcul du=0D solde (\\[balance-recalculate-buffer]).=0D =0D Modifier le montant d'une quelconque transaction, et recalculer=0D le tampon de nouveau mettra =E0 jour tous les soldes visibles. Les=0D transactions peuvent =EAtre mise en commentaires avec \=0D \\[balance-toggle-comment-out] (et sorties de commentaires=0D avec la m=EAme commandes). Ceci facilite le rapprochement de votre=0D feuille de suivi =E0 votre compt en banque, qui en g=E9n=E9ral est en=0D retard de plusieurs transaction par rapport =E0 celle-ci.=0D =0D Le mode balance offre =E9galement la possibilit=E9 de produire un=0D sommaire des ch=E8que. En tapant \=0D \\[balance-summarize-checks-buffer]=0D =0D vous produirez un tampon contenant le sommaire de tous les=0D ch=E8ques du tampon courant. Les transaction seront tri=E9es selon=0D les num=E9ros de ch=E8que, et les ruptures dans la s=E9quence des=0D num=E9ros de ch=E8que seront marqu=E9es par une ast=E9risque. En plus, le=0D solde sur les ch=E8ques seuls est calcul=E9.=0D =0D To keep the file from getting too large, the command \\[balance-backup] wil= l=0D make a copy of the current file (in the form `filename.n' for the smallest= =0D number `n' for which the file doesn't already exist) and then replace any=0D sequence of cleared lines by a single line with an appropriate sign and amo= unt.=0D =0D Entrer dans le mode `balance-mode' ex=E9cute les fonctions crochet=0D list=E9es dans `balance-mode-hook' s'il en est. Il y a aussi un=0D mode d'abbr=E9viation `balance-mode-abbrev-table'."=0D (interactive)=0D (setq major-mode 'balance-mode)=0D (setq mode-name "Balance")=0D (use-local-map balance-mode-map)=0D (make-local-variable 'tab-stop-list)=0D (add-to-invisibility-spec '(balance . t))=0D (dolist (s '(balance-o-main-sheet=0D before-save-hook after-save-hook=0D balance-o-buffer))=0D (make-local-variable s))=0D =0D (add-hook 'before-save-hook 'balance-before-save-hook)=0D (add-hook 'after-save-hook 'balance-after-save-hook)=0D (if (progn=0D (goto-char (point-max))=0D (null (re-search-backward "^\014" nil t)))=0D ;; cas d'une nouvelle feuille de suivi, o=F9 d'une feuille de suivi a= vec=0D ;; format historique=0D (let ((balance-o-buffer-imports (or balance-o-buffer-imports=0D (make-instance 'balance-buffer-imports))))=0D (oset=0D (setq balance-o-main-sheet=0D (make-instance 'balance-sheet=0D (concat "Sheet:" (buffer-name))=0D :current-record (make-instance 'balance-record "current-record"=0D :record-number -1)=0D ))=0D main-buffer=0D (setq balance-o-buffer=0D (make-instance=0D 'balance-main-buffer (concat "Buffer/main:" (buffer-name))=0D :column-list=0D (oref balance-o-buffer-imports :column-list))))=0D (oset balance-o-buffer :associated-sheet balance-o-main-sheet)=0D (oset balance-o-buffer buffer (current-buffer))=0D (if (=3D (point-min) (point-max))=0D ;; cas d'une nouvelle feuille de suivi=0D (balance-insert-head&bottom balance-o-buffer)=0D ;; cas du format historique=0D (goto-char (point-max))=0D (if (re-search-backward "^=3D\\{10,\\}\\s-*$" nil t)=0D (oset balance-o-buffer :max-line (1- (line-number-at-pos)))=0D (error "Format inconnu"))=0D (oset balance-o-buffer :min-line 3)=0D (balance-goto-line (oref balance-o-buffer :min-line))=0D (oset (car (oref balance-o-buffer :column-list))=0D :date-format '(X DD " " Mmm " " YYYY))=0D ;; reformattage des lignes en commentaire=0D (dotimes=0D (record-number (- (oref balance-o-buffer :max-line)=0D (oref balance-o-buffer :min-line)=0D -1))=0D (let (commented)=0D (when (setq commented (looking-at "^%"))=0D (delete-region (point) (1+ (point))))=0D (move-to-column 53)=0D (when (looking-at "=3D")=0D (forward-char 2)=0D (let ((balance (buffer-substring-no-properties=0D (point)=0D (+ 9 (point)))))=0D (delete-region (point) (progn (end-of-line) (point)))=0D (insert " " balance)))=0D (when commented=0D (move-to-column 12)=0D (if (looking-at "x")=0D (insert "=0B_=0B<%=0B>")=0D (delete-region (point) (1+ (point)))=0D (insert "%"))))=0D (beginning-of-line 2)) )=0D (balance-goto-line (1+ (oref balance-o-buffer :max-line)))=0D (end-of-line)=0D (insert "\n\014\n")=0D (let ((standard-output (current-buffer)))=0D (balance-push-context balance-o-object-writing-backreference :balance-ma= in-buffer)=0D (object-write balance-o-buffer)=0D (balance-pop-context balance-o-object-writing-backreference))=0D (delete-region (point) (point-max)))=0D ;; cas d'une feuille de suivi comprenant la trace du tampon principal=0D (forward-char)=0D (let (main-buffer)=0D (condition-case ()=0D (setq main-buffer (read (current-buffer)))=0D (error "Constructeur de tampon principal illisible"))=0D (when (and=0D (consp main-buffer)=0D (eq (car main-buffer) 'balance-main-buffer)=0D (stringp (cadr main-buffer)))=0D (setq balance-o-buffer (eval main-buffer)=0D balance-o-main-sheet (oref balance-o-buffer :associated-sheet))=0D (oset balance-o-buffer buffer (current-buffer)))) )=0D (set (make-local-variable 'tab-stop-list) (balance-get-tab-stops balance-= o-buffer))=0D (set (make-local-variable 'indent-tabs-mode) nil)=0D (setq indent-line-function 'balance-forward-field)=0D (setq local-abbrev-table balance-mode-abbrev-table)=0D (auto-fill-mode -1)=0D (setq buffer-read-only t)=0D ; (balance-fontify-buffer)=0D (balance-goto-line (1- (oref balance-o-buffer :min-line)))=0D (let ((current-record (oref balance-o-main-sheet :current-record))=0D (column-list (oref balance-o-buffer :column-list)))=0D (dotimes (record-number (- (oref balance-o-buffer :max-line)=0D (oref balance-o-buffer :min-line)=0D -1))=0D (beginning-of-line 2)=0D (oset current-record :record-number record-number)=0D (balance-read current-record column-list)=0D (balance-write current-record column-list) ))=0D ; (forward-line -1)=0D ; (balance-hide-cleared)=0D (run-hooks 'balance-mode-hook))=0D =0D =0D ;; pas de menu d'=E9dition standard dans ce mode=0D (put 'balance-mode 'mode-class 'special)=0D =0D (defun balance-forward-field()=0D "D=E9place le curseur sur le champ =E9ditable suivant de la ligne=0D courante."=0D (interactive)=0D (move-to-tab-stop))=0D =0D (defun balance-backward-field()=0D "D=E9place le curseur sur le champ =E9ditable pr=E9c=E9dent sur la ligne co= urante."=0D (interactive)=0D (when balance-o-buffer=0D (let ((col (current-column))=0D (tab-stop-list (balance-get-tab-stops balance-o-buffer)))=0D (while (and (cdr tab-stop-list)=0D (< (cadr tab-stop-list) col))=0D (setq tab-stop-list (cdr tab-stop-list)))=0D (move-to-column (car tab-stop-list)))))=0D =0D (defun balance-change-field ()=0D (interactive)=0D (when balance-o-buffer=0D (let ((tab-stops (reverse (balance-get-tab-stops balance-o-buffer)))=0D (column-list (reverse (oref balance-o-buffer :column-list)))=0D (column-number (current-column))=0D ;; 0: col 1: field-editor 2: tab=0D (info [nil nil nil])=0D field)=0D (while column-list=0D (and=0D (balance-editable-p=0D (aset info 1=0D (oref (aset info 0 (pop column-list))=0D :field-editor)))=0D (>=3D column-number (aset info 2 (pop tab-stops)))=0D (setq column-list nil)))=0D (setq field=0D (balance-edit (aref info 1)=0D (balance-decode-field (aref info 0)=0D (aref info 2))))=0D (balance-encode-field (aref info 0) (car field)=0D (aref info 2))=0D ;; v=E9rifications=0D (cond=0D ;; si c'est un montant on v=E9rifie qu'on n'a pas affaire =E0 un sol= de=0D ((balance-amount-column-p (aref info 0))=0D (let ((current-record (balance-current-record balance-o-buffer)))=0D (when (oref current-record :is-balance-p)=0D (oset current-record :balance (calcFunc-neg (oref current-record :amou= nt)))=0D (oset current-record :amount nil)=0D (balance-write current-record (oref balance-o-buffer :column-list)))))= ))))=0D =0D (defun balance-next-uncleared ()=0D (interactive)=0D (when (and balance-o-buffer=0D (< (line-number-at-pos) (oref balance-o-buffer :max-line)))=0D (forward-line 1)=0D (let (current-record)=0D (while (and (setq current-record (balance-current-record balance-o-bu= ffer))=0D (balance-cleared-p current-record))=0D (forward-line 1)))))=0D =0D (defun balance-next-uncomment-out ()=0D (interactive)=0D (when (and balance-o-buffer=0D (< (line-number-at-pos) (oref balance-o-buffer :max-line)))=0D (forward-line 1)=0D (let (current-record)=0D (while (and (setq current-record (balance-current-record balance-o-bu= ffer))=0D (balance-commented-p current-record))=0D (forward-line 1)))))=0D =0D =0D (defun balance-toggle-cleared ()=0D (interactive)=0D (let ((current-record (and balance-o-buffer (balance-current-record balan= ce-o-buffer))))=0D (when current-record=0D (let ((xed (balance-record-toggle-cleared current-record)))=0D (balance-write current-record (oref balance-o-buffer :column-list))=0D (unless xed=0D (balance-next-uncleared))))))=0D =0D (defun balance-toggle-comment-out ()=0D (interactive)=0D (let ((current-record (and balance-o-buffer (balance-current-record balan= ce-o-buffer))))=0D (when current-record=0D (let ((xed (balance-record-toggle-commented current-record)))=0D (balance-write current-record (oref balance-o-buffer :column-list))=0D (unless xed=0D (balance-next-uncomment-out))))))=0D =0D (defun balance-transpose-lines (&optional n)=0D (interactive "P")=0D (when balance-o-buffer=0D (let ((l-1 (1- (line-number-at-pos))) l-2)=0D (setq n (if n (prefix-numeric-value n) 1)=0D l-2 (if (=3D 0 n)=0D (when (mark)=0D (save-excursion (goto-char (mark)) (line-number-at-pos)))=0D (+ n l-1)))=0D (balance-buffer-transpose-lines balance-o-buffer l-1 l-2))))=0D =0D ;=0D ;(defun balance-hide-cleared-lines ()=0D ; (interactive)=0D ; (save-excursion=0D ; (when (balance-cleared-p) ;(balance-cleared-but-not-backed-up-p)=0D ; (forward-line -1)=0D ; (while (and=0D ; (balance-cleared-p) ;(balance-cleared-but-not-backed-up-p)=0D ; (> (point) (point-min)))=0D ; (forward-line -1))=0D ; (if (not (balance-cleared-p)) ;(balance-cleared-but-not-backed-up-p)= )=0D ; (forward-line 1))=0D ; (let ((beg (point))=0D ; end)=0D ; (while (balance-cleared-p) ;(balance-cleared-but-not-backed-up-p)= =0D ; (forward-line 1))=0D ; (overlay-put (make-overlay beg (1- (point)) nil t)=0D ; 'invisible 'balance)))))=0D ;=0D ;(defun balance-show-hidden-lines ()=0D ; (let ((beg=0D ; (save-excursion=0D ; (forward-line 0)=0D ; (while (and=0D ; (get-char-property (point) 'invisible)=0D ; (> (point) (point-min)))=0D ; (forward-line -1))=0D ; (point)))=0D ; (end=0D ; (save-excursion=0D ; (forward-line 1)=0D ; (while (get-char-property (point) 'invisible)=0D ; (forward-line 1))=0D ; (point))))=0D ; (remove-overlays beg end 'invisible 'balance)))=0D ;=0D ;(defun balance-toggle-hidden-cleared ()=0D ; (interactive)=0D ; (if (not (get-char-property (line-beginning-position) 'invisible))=0D ; (balance-hide-cleared-lines)=0D ; (balance-show-hidden-lines)))=0D ;=0D ;(defun balance-hide-cleared ()=0D ; (interactive)=0D ; (let (beg)=0D ; (save-excursion=0D ; (goto-char (point-min))=0D ; (forward-line 2)=0D ; (while (not (looking-at balance-footer))=0D ; (while (and=0D ; (not (balance-cleared-p))=0D ; (not (looking-at balance-footer)))=0D ; (forward-line 1))=0D ; (setq beg (point))=0D ; (while (balance-cleared-p)=0D ; (forward-line 1))=0D ; (unless (=3D beg (point))=0D ; (overlay-put (make-overlay beg (1- (point)) nil t)=0D ; 'invisible 'balance))=0D ; (if (not (looking-at balance-footer))=0D ; (forward-line 1))))))=0D ;=0D =0D =0D =0D (defun balance-backup ()=0D (interactive)=0D (when balance-o-buffer=0D (save-buffer)=0D (let ((file (buffer-file-name))=0D (n 1))=0D (while (file-exists-p=0D (concat file (format ".%04d" n)))=0D (setq n (1+ n)))=0D (save-excursion=0D (find-file (concat file (format ".%04d" n)))=0D (let ((buffer-read-only nil))=0D (insert-file-contents file)=0D (save-buffer))=0D (kill-buffer (current-buffer))))=0D (balance-remove-cleared balance-o-buffer)=0D (save-buffer)))=0D =0D (defun balance-toggle-credit (&optional arg)=0D "Permet d'inverser le signe d'une transaction. Deux=0D invocations successives en restant sur le m=EAme enregistrement=0D remplacent la transaction en une indication de solde (report en=0D d=E9but de feuille de suivi). De m=EAme si l'enregistrement courant=0D est une indication de solde, l'invocation de la commande permet=0D de le remplacer par une transaction dont le montant est la valeur=0D du solde de l'indication de solde. Pour forcer le changement de=0D signe il suffit d'invoquer la commande `C-u=0D \\[balance-toggle-credit]'."=0D (interactive "P")=0D (let ((current-record (when balance-o-buffer (balance-current-record bala= nce-o-buffer)))=0D ;; =E9l=E9ment 0 =3D record-number=0D ;; =E9l=E9ment 1 =3D t apr=E8s transition amount -> balance=0D ;; nil apr=E8s transition amount -> -amount=0D (static-state [-1 nil])=0D previous-record=0D (force-negate (and (consp arg) (eq (car arg) 4))))=0D (when current-record=0D (unless (=3D (aref static-state 0) (oref current-record :record-numbe= r))=0D (aset static-state 0 -1)=0D (aset static-state 1 nil))=0D (cond=0D ((and force-negate=0D (oref current-record :is-balance-p))=0D (oset current-record :balance (calcFunc-neg (oref current-record :b= alance))))=0D =0D ((oref current-record :is-balance-p)=0D (oset current-record :is-balance-p nil)=0D (oset current-record :amount (oref current-record :balance))=0D (oset current-record :balance nil))=0D =0D ((and (oref current-record :amount)=0D (or force-negate=0D (aref static-state 1)=0D (Math-negp (oref current-record :amount))))=0D (aset static-state 1 nil)=0D (oset current-record :amount (calcFunc-neg (oref current-record :amount)))= )=0D =0D ((and (oref current-record :amount)=0D (null (Math-negp (oref current-record :amount))))=0D (oset current-record :balance (oref current-record :amount))=0D (oset current-record :amount nil)=0D (aset static-state 1 t)=0D (oset current-record :is-balance-p t) ))=0D (unless (oref current-record :balance)=0D (with-slots (min-line balance-o-buffer)=0D (let ((prev-record-line (1- (line-number at-pos)))=0D balance)=0D (when (>=3D prev-record-line min-line)=0D (setq previous-record (make-insance 'balance-record "prev-rec")=0D balance (oref previous-record :balance))=0D (when balance=0D (oset current-record :balance=0D (math-add balance (oref current-record :amount))))))))=0D (balance-write current-record (oref balance-o-buffer :column-list)))= =0D (aset static-state 0 (oref current-record :record-number)) ))=0D =0D (defun balance-append-transaction (&optional arg)=0D "Ajoute une transaction =E0 la fin du tampon courant en utilisant=0D la date d'aujourd'hui. Lorsque ARG est non nil, la transaction=0D est ins=E9r=E9e =E0 la ligne courante."=0D (interactive "P")=0D (let* ((credit nil)=0D (min-line (oref balance-o-buffer :min-line))=0D (max-line (oref balance-o-buffer :max-line))=0D (line-number (if arg=0D (let ((line-number (line-number-at-pos)))=0D (unless (and (<=3D line-number max-line)=0D (>=3D line-number min-line))=0D (error "Insertion de transaction interdite =E0 cette=0D ligne.")) line-number)=0D max-line))=0D (current-record (make-instance 'balance-record :record-number (- line-num= ber min-line)))=0D (other-record (make-instance 'balance-record "Other record"))=0D field-id=0D (column-list (oref balance-o-buffer :column-list)))=0D =0D ;; lis l'enregistrement courant, de sorte =E0 pouvoir mettre =E0 jour= le=0D ;; solde=0D (balance-goto-line line-number)=0D (if (or (< max-line min-line)=0D (progn (balance-read other-record column-list)=0D (null (slot-boundp other-record :balance))))=0D (oset current-record :balance 0)=0D (oset current-record :balance (oref other-record :balance)))=0D =0D ;; saisie par l'utilisateur=0D (dolist (col column-list)=0D (with-slots (field-editor) col=0D (when (balance-editable-p field-editor)=0D (let ((field (balance-edit field-editor nil)))=0D (case (setq field-id (oref col :field-id))=0D ((:transaction-type)=0D (setq credit (cadr field)))=0D ((:amount)=0D (when credit=0D (setcar field (calcFunc-neg (car field))))))=0D (eieio-oset current-record field-id (car field)) ))))=0D =0D ;; mise =E0 jour du solde=0D (when (oref current-record :balance)=0D (oset current-record :balance=0D (math-add (oref current-record :balance)=0D (oref current-record :amount))))=0D =0D (oset balance-o-main-sheet :current-record current-record)=0D (balance-insert current-record column-list)))=0D =0D (defun balance-append-next-check (&optional arg)=0D "Ajoute une transaction =E0 la fin du tampon courant en utilisant=0D la date d'aujourd'hui. Lorsque ARG est non nil, la transaction=0D est ins=E9r=E9e =E0 la ligne courante."=0D (interactive "P")=0D (let* ((credit nil)=0D (min-line (oref balance-o-buffer :min-line))=0D (max-line (oref balance-o-buffer :max-line))=0D (line-number (if arg=0D (let ((line-number (line-number-at-pos)))=0D (unless (and (<=3D line-number max-line)=0D (>=3D line-number min-line))=0D (error "Insertion de transaction interdite =E0 cette ligne."))=0D line-number)=0D max-line))=0D (prev-check-line-number (min line-number max-line))=0D (current-record (make-instance 'balance-record :record-number (- line-num= ber min-line)))=0D (other-record (make-instance 'balance-record "Other record"))=0D field-id=0D (column-list (oref balance-o-buffer :column-list))=0D (transaction-type-col=0D (let ((column-list column-list) col)=0D (while column-list=0D (if (balance-transaction-type-column-p (setq col (pop column-list)))= =0D (setq column-list nil)=0D (setq col nil)))=0D col)) )=0D =0D (unless transaction-type-col=0D (error "Pas de colonne type de transaction !"))=0D =0D ;; lecture de l'enregistement pr=E9c=E9dent --- pour la mise =E0 jour d= u solde=0D (balance-goto-line line-number)=0D (if (or (< max-line min-line)=0D (progn (balance-read other-record column-list)=0D (null (slot-boundp other-record :balance))))=0D (oset current-record :balance 0)=0D (oset current-record :balance (oref other-record :balance)))=0D =0D ;; recherche le num=E9ro de ch=E8que pr=E9c=E9dent=0D (while=0D (and (>=3D prev-check-line-number min-line)=0D (unless (string-match=0D (oref transaction-type-col :check-type)=0D (oref (balance-read other-record column-list)=0D :transaction-type))=0D (forward-line -1)=0D (setq prev-check-line-number (1- prev-check-line-number)) )))=0D (unless (>=3D prev-check-line-number min-line)=0D (error "Aucun ch=E8que pr=E9c=E9dent"))=0D =0D ;; calcul du type de transaction (num=E9ro de ch=E8que)=0D (eieio-oset=0D current-record :transaction-type=0D (funcall (oref transaction-type-col :check-transaction-type-encode)=0D (math-add 1=0D (funcall (oref transaction-type-col :check-number-decode)=0D (match-string-no-properties=0D 1=0D (oref other-record :transaction-type))))))=0D =0D ;; insertion du ch=E8que=0D (balance-goto-line line-number)=0D (dolist (col column-list)=0D (unless (eq transaction-type-col col)=0D (with-slots (field-editor) col=0D (when (balance-editable-p field-editor)=0D (let ((field (balance-edit field-editor nil)))=0D (case (setq field-id (oref col :field-id))=0D ((:transaction-type)=0D (setq credit (cadr field)))=0D ((:amount)=0D (when credit=0D (setcar field (calcFunc-neg (car field))))))=0D (eieio-oset current-record field-id (car field)) )))))=0D =0D =0D ;; mise =E0 jour du solde=0D (unless (null (oref current-record :balance))=0D (eieio-oset=0D current-record :balance=0D (math-add (oref current-record :balance)=0D (oref current-record :amount))))=0D =0D (oset balance-o-main-sheet :current-record current-record)=0D (balance-insert current-record column-list)))=0D =0D ;=0D ;(defun balance-fontify-region (beg end)=0D ; (save-excursion=0D ; (goto-char beg)=0D ; (beginning-of-line)=0D ; (forward-line 2)=0D ; (overlay-put (make-overlay (point-min) (point) nil t) 'face 'balance-h= eader-face)=0D ; (while (and=0D ; (balance-find-next-transaction t)=0D ; (< (point) end))=0D ; (balance-fontify-line))))=0D ;=0D (defun balance-order-region (beg end)=0D "Ordonne les enregistrements de la r=E9gion comprise dans [BEG=0D END[ par date."=0D (when balance-o-buffer=0D (let (record-list=0D (cur-point (point))=0D (cur-mark (mark))=0D (buffer balance-o-buffer)=0D (column-list (oref balance-o-buffer :column-list)))=0D (goto-char beg)=0D (setq beg (line-beginning-position))=0D (while (< (point) end)=0D (push (balance-read (make-instance 'balance-record) column-list)=0D record-list)=0D (forward-line))=0D (goto-char (setq end (line-beginning-position)))=0D (setq record-list=0D (sort record-list=0D #'(lambda (x y)=0D (<=3D=0D (math-compare=0D (oref x :date)=0D (oref y :date))=0D 0))))=0D (let ((inhibit-read-only t))=0D (delete-region beg end)=0D (end-of-line 0)=0D (while record-list=0D (insert ?\n)=0D (balance-write (pop record-list) column-list)))=0D (set-mark cur-mark)=0D (goto-char cur-point))))=0D =0D (defun balance-order-buffer ()=0D "Ordonne les transactions dans le tampon courant selon la=0D date."=0D (interactive)=0D (when balance-o-buffer=0D (balance-order-region=0D (save-excursion (balance-goto-line (oref balance-o-buffer :min-line))= =0D (point))=0D (save-excursion (balance-goto-line (1+ (oref balance-o-buffer :max-lin= e)))=0D (point)))))=0D =0D =0D (defun balance-order-latest ()=0D "Ordonne les transactions dans le tampon courant selon la date,=0D en ne consid=E9rant que les transactions depuis la derni=E8re=0D transaction non compens=E9e selon l'ordre du tampon."=0D (interactive)=0D (when balance-o-buffer=0D (balance-order-region=0D (save-excursion (balance-goto-line (balance-first-latest-line balance-= o-buffer))=0D (point))=0D (save-excursion (balance-goto-line (1+ (oref balance-o-buffer :max-lin= e)))=0D (point)))))=0D =0D (defun balance-kill-row ()=0D (interactive)=0D (when balance-o-buffer=0D (let ((current-record (balance-current-record balance-o-buffer)))=0D (when current-record=0D (push (list current-record) balance-killed-rows)=0D (with-slots (max-line) balance-o-buffer=0D (setq max-line (1- max-line)))=0D (let ((pt (line-beginning-position))=0D (inhibit-read-only t))=0D (remove-overlays pt (line-end-position))=0D (forward-line 1)=0D (delete-region pt (point)))))))=0D =0D (defun balance-kill-region (beg end)=0D (interactive "r")=0D (when balance-o-buffer=0D (let ((min-line (oref balance-o-buffer :min-line))=0D (max-line (oref balance-o-buffer :max-line))=0D beg-line end-line=0D p record-number=0D current-record=0D (column-list (oref balance-o-buffer :column-list))=0D lines-to-kill)=0D (save-excursion=0D (goto-char beg)=0D (beginning-of-line)=0D (setq beg-line (line-number-at-pos)=0D beg (point))=0D (when (> min-line beg-line)=0D (forward-line (- min-line beg-line))=0D (setq beg (point)=0D beg-line min-line))=0D (goto-char end)=0D (beginning-of-line 2)=0D (setq end-line (line-number-at-pos)=0D end (point))=0D (when (< (+ max-line 2) end-line)=0D (forward-line (- end-line max-line 2))=0D (setq end (point)=0D end-line (1+ max-line)))=0D (when (< end beg)=0D (error "La r=E9gion ne contient pas d'=E9criture"))=0D (goto-char (setq record-number (- beg-line min-line -1)=0D p beg))=0D (while (< p end)=0D (setq current-record (make-instance 'balance-record :record-number (set= q record-number=0D (1+ record-number))))=0D (balance-read current-record column-list)=0D (push current-record lines-to-kill)=0D (forward-line)=0D (setq p (point)))=0D (push (nreverse lines-to-kill) balance-killed-rows)=0D (with-slots (max-line) balance-o-buffer=0D (setq max-line (- max-line (- end-line beg-line))))=0D (let ((inhibit-read-only t))=0D (remove-overlays beg end)=0D (delete-region beg end))))))=0D =0D (defun balance-yank-row ()=0D (interactive)=0D (when balance-o-buffer=0D (end-of-line 1)=0D (if balance-killed-rows=0D (let ((min-line (oref balance-o-buffer :min-line))=0D (max-line (oref balance-o-buffer :max-line))=0D (cur-line (line-number-at-pos)))=0D (if (< cur-line min-line)=0D (balance-goto-line (min min-line max-line))=0D (if (> cur-line max-line)=0D (balance-goto-line max-line)))=0D (let ((rows-to-yank (pop balance-killed-rows))=0D (column-list (oref balance-o-buffer :column-list)))=0D (dolist (row rows-to-yank)=0D (balance-insert row column-list))))=0D (message "Pas d'=E9criture coup=E9e"))))=0D =0D (defun balance-recalculate-buffer()=0D "Recalcule le solde pour le tampon courant. Voir `balance-recalculate'."= =0D (interactive)=0D (when balance-o-buffer=0D (let ((result (balance-recalculate balance-o-buffer=0D (oref balance-o-buffer :min-line)=0D (oref balance-o-buffer :max-line))))=0D (balance-display result)=0D (when (> 0 (oref result :changes))=0D (end-of-line)))))=0D =0D (defun balance-recalculate-region(start end)=0D "Recalcule le solde pour la r=E9gion courant. Voir `balance-recalculate'.= "=0D (interactive "r")=0D (when balance-o-buffer=0D (let ((result (balance-recalculate balance-o-buffer=0D (max (save-excursion=0D (goto-char start)=0D (line-number-at-pos))=0D (oref balance-o-buffer :min-line))=0D (min (save-excursion=0D (goto-char end)=0D (line-number-at-pos))=0D (oref balance-o-buffer :max-line)))))=0D (balance-display result)=0D (when (> 0 (oref result :changes))=0D (end-of-line)))))=0D =0D (defun balance-recalculate-latest ()=0D "Go through the region specified by START and END and recalculate all=0D transaction balances. The final balance, uncleared total, and=0D the number of balances that changed, and the transaction count are=0D returned in a list."=0D (interactive)=0D (when balance-o-buffer=0D (let ((start-line (balance-first-latest-line balance-o-buffer))=0D (result (make-instance 'balance-calculation-result)))=0D (unless (=3D start-line (oref balance-o-buffer :min-line))=0D (let ((record (make-instance 'balance-record)))=0D (save-excursion=0D (balance-goto-line (1- start-line))=0D (setq record (balance-read record (oref balance-o-buffer :column-list)= ))=0D (oset result :balance (oref record :balance)))))=0D (balance-recalculate balance-o-buffer=0D start-line=0D (oref balance-o-buffer :max-line)=0D result)=0D (balance-display result)=0D (when (> 0 (oref result :changes))=0D (end-of-line)))))=0D =0D (defun balance-before-save-hook ()=0D (let ((inhibit-read-only t) p1 p2)=0D (save-excursion=0D (save-restriction=0D (goto-char (setq p2 (point-max)))=0D (when (re-search-backward "^\014" nil t)=0D (beginning-of-line 2)=0D (setq p1 (point))=0D (when (re-search-forward "^;\\s-*Local Variables\\s-*:" nil p2)=0D (end-of-line 0)=0D (setq p2 (point)))=0D (goto-char p1)=0D (delete-region p1 p2)=0D (let ((standard-output (current-buffer)))=0D (balance-push-context balance-o-object-writing-backreference :balance-= main-buffer)=0D (object-write balance-o-buffer)=0D (balance-pop-context balance-o-object-writing-backreference))) ))=0D (unless (and p1 p2)=0D (fset 'balance-after-save-hook (symbol-function 'balance-error-case-a= fter-save-hook)))))=0D =0D =0D (fset 'balance-after-save-hook (symbol-function 'ignore))=0D (defun balance-error-case-after-save-hook ()=0D (fset 'balance-after-save-hook (symbol-function 'ignore))=0D (error "Saut de page non trouv=E9, impossible de tracer le tampon principa= l") )=0D =0D (defun balance-summarize-checks-buffer()=0D (interactive)=0D (when (balance-main-buffer-p balance-o-buffer)=0D (balance-summarize balance-o-buffer=0D (oref balance-o-buffer :min-line)=0D (oref balance-o-buffer :max-line)=0D (make-instance 'balance-check-summary-order=0D :column-list (oref balance-o-buffer :column-list)))=0D (balance-recalculate=0D balance-o-buffer=0D (oref balance-o-buffer :min-line)=0D (oref balance-o-buffer :max-line))))=0D =0D =0D (defun balance-switch-buffer ()=0D "Commute de tampon en ne listant que les tampons dont=0D `balance-mode' est le mode d'=E9dition."=0D (interactive)=0D (require 'iswitchb)=0D (let (iswitchb-make-buflist-hook=0D (iswitchb-regexp "\\.bal\\(?:-?[0-9]\\{3,\\}\\)?\\(?:<[0-9]+>\\)?$"))=0D (add-hook 'iswitchb-make-buflist-hook=0D (function=0D (lambda ()=0D (let (ret buf)=0D (dolist (b iswitchb-temp-buflist)=0D (when (and=0D (setq buf (get-buffer b))=0D (buffer-live-p buf)=0D (with-current-buffer buf=0D (derived-mode-p 'balance-mode)))=0D (push b ret)))=0D (setq iswitchb-temp-buflist (nreverse ret))))))=0D (iswitchb-buffer)))=0D =0D (defun balance-get-root+name (buffer &optional no-error)=0D "Renvoie (ROOT/ . NAME) lorsque BUFFER visite un fichier dont le chemin e= st ROOT/NAME/XXXX.=0D Si NO-ERROR est non nil, alors ne g=E9n=E8re pas d'erreur si (ROOT=0D . NAME) ne peut pas =EAtre trouv=E9, mais renvoie nil =E0 la place."=0D (let (root)=0D (if (setq root (buffer-file-name buffer))=0D (if (setq root (directory-file-name (file-name-directory root)))=0D (let ((name (file-name-nondirectory root)))=0D (setq root (file-name-directory root)=0D root (if root (file-name-as-directory root) ""))=0D (cons root name))=0D (null (or no-error (error "Le fichier visit=E9 par le tampon n'est pas d= ans un r=E9pertoire"))))=0D (null (or no-error (error "Le tampon ne visite pas un fichier"))))))= =0D =0D (defun balance-get-archive-extention (buffer negative)=0D "D=E9termine une extension d'archive non encore=0D utilis=E9e. Renvoie (BFN EXT) o=F9 BFN est le chemin du fichier=0D visit=E9 par le tampon BUFFER, et EXT est l'extension d=E9termin=E9e."=0D (let ((bfn (buffer-file-name buffer))=0D dir=0D (archive-number 0)=0D (re (if negative "\\.bal\\.-\\([0-9]\\{3,\\}\\)$" "\\.bal\\.\\([0-9]\\{= 3,\\}\\)$" ))=0D archives)=0D (when (and bfn (string-match re bfn))=0D (error "Cette feuille est d=E9j=E0 une archive et ne peut donc pas = =EAtre archiv=E9e/reformatt=E9e"))=0D (setq dir (file-name-directory bfn)=0D dir (if dir (file-name-as-directory dir) "")=0D archives =0D (progn (require 'find-lisp)=0D (find-lisp-find-files dir re)))=0D (dolist (archive archives)=0D (setq archive-number=0D (calcFunc-max archive-number=0D (progn (string-match re archive)=0D (math-read-number-simple (match-string-no-properties 1 archive))))))= =0D (setq archive-number (math-add archive-number 1))=0D (list bfn=0D (apply 'concat=0D (if negative ".-" ".")=0D (let ((ext (math-format-number archive-number)))=0D (list=0D (make-string (max 0 (- 3 (length ext))) ?0)=0D ext))))))=0D =0D =0D (defun balance-reformatter (record-processor imports-preprocess)=0D "Archive la feuille de suivi courante, et reformatte la dans le format co= urant."=0D (when balance-o-buffer=0D (balance-goto-line (1- (oref balance-o-buffer :min-line)))=0D (let* (record-list=0D (balance-o-buffer-imports (balance-make-buffer-imports balance-o-buffer= ))=0D (buf (oref balance-o-buffer buffer))=0D (bfn-ext (balance-get-archive-extention buf t)) =0D (bfn (pop bfn-ext))=0D (ext (pop bfn-ext)) =0D current-record=0D progress-p=0D (column-list (oref balance-o-buffer :column-list))=0D (record-count (- (oref balance-o-buffer :max-line)=0D (oref balance-o-buffer :min-line)=0D -1))=0D (progress-threshold (time-add (current-time) '(0 0 500 0))))=0D (when (>=3D record-count 10)=0D (setq progress-p t)=0D (message "Reformattage feuille de suivie 0%%"))=0D (dotimes (record-number record-count)=0D (beginning-of-line 2)=0D (setq current-record (make-instance 'balance-record :record-number record= -number))=0D (balance-read current-record column-list)=0D (push current-record record-list)=0D (when (time-less-p progress-threshold (current-time))=0D (message "Reformattage feuille de suivie %.1f%%"=0D (/ (float record-number) record-count 0.02))=0D (setq=0D progress-p t=0D progress-threshold (time-add progress-threshold '(0 0 500 0)))))=0D (let ((other-bufs (find-buffer-visiting bfn #'(lambda (x) (null (eq = x buf)))))=0D (archive-bfn (concat bfn ext)))=0D (write-file archive-bfn)=0D (dolist (other-buf other-bufs)=0D (with-current-buffer other-buf=0D (set-visited-file-name archive-bfn t t))))=0D (switch-to-buffer (create-file-buffer bfn))=0D (funcall imports-preprocess)=0D (balance-mode)=0D (set-visited-file-name bfn t)=0D (setq=0D column-list (oref balance-o-buffer :column-list)=0D record-list (nreverse record-list))=0D (balance-goto-line (1- (oref balance-o-buffer :min-line)))=0D (let ((inhibit-read-only t))=0D (dotimes (record-number record-count)=0D (balance-insert (funcall record-processor (pop record-list)) column-list= )=0D (when (time-less-p progress-threshold (current-time))=0D (message "Reformattage feuille de suivie %.1f%%"=0D (+ 50 (/ (float record-number) record-count 0.02)))=0D (setq=0D progress-p t=0D progress-threshold (time-add progress-threshold '(0 0 500 0))))))=0D (when progress-p=0D (message "Reformattage feuille de suivi 100%%")) )))=0D =0D (defun balance-reformat ()=0D "Archive la feuille de suivi courante, et reformatte la dans le format co= urant."=0D (interactive)=0D (balance-reformatter 'identity=0D 'ignore ))=0D =0D (defun balance-inverse ()=0D "Archive la feuille de suivi courante, et inverse toutes les op=E9rations= ."=0D (interactive)=0D (balance-reformatter=0D #'(lambda (record)=0D (with-slots (balance amount) record=0D (when (math-numberp balance)=0D (setq balance (math-neg balance)))=0D (when (math-numberp amount)=0D (setq amount (math-neg amount))))=0D record)=0D 'ignore ))=0D =0D =0D (defun balance-ensure-has-transfer-col ()=0D "Assure que le tampon courant est une feuille de suivi avec une colonne d= e type `balance-transfer-column'"=0D (unless (cl-member-if 'balance-transfer-column-p (oref balance-o-buffer := column-list))=0D (balance-reformatter=0D 'identity=0D #'(lambda ()=0D (let* ((column-list (oref balance-o-buffer-imports :column-list))=0D (gap (or (car-safe (cl-member-if 'balance-gap-column-p column-list))=0D (make-instance 'balance-gap-column)))=0D (transfer-col (list gap=0D (make-instance 'balance-transfer-column))))=0D (if column-list=0D (nconc (last column-list) transfer-col)=0D (balance-warn "Liste de colonnes vide ?!")=0D (oset balance-o-buffer-imports :column-list (cdr transfer-col))))))))= =0D =0D (defvar balance-counterpart-history (list balance-default-counterpart-trans= ation-type))=0D (defun balance-counterpart ()=0D "Ins=E8re la contre-partie de la transaction courante dans un=0D autre tampon."=0D (interactive)=0D (when balance-o-buffer=0D (let* (iswitchb-make-buflist-hook=0D (this-record (balance-current-record balance-o-buffer))=0D (this-sheet balance-o-main-sheet)=0D counterpart-sheet=0D (this-transfer-id (oref balance-o-main-sheet :transfer-id))=0D counterpart-transfer-id=0D this-transfer=0D this-root+name=0D counterpart-root+name=0D balance-root+name-alist=0D counterpart-transfer=0D counterpart-record)=0D (when this-record=0D (when (oref this-record :is-balance-p)=0D (error "Pas de contrepartie pour un solde"))=0D (setq this-root+name (balance-get-root+name (oref balance-o-buffer buffer)= )=0D counterpart-record (make-instance 'balance-record))=0D (oset counterpart-record :date (oref this-record :date))=0D (oset counterpart-record :transaction-type=0D (let ((tt=0D (completing-read=0D (concat "Type de transaction de la contrepartie ("=0D (or (car-safe balance-counterpart-history)=0D balance-default-counterpart-transation-type)=0D "): ")=0D balance-transaction-type-list=0D nil; predicate=0D t; require-match=0D nil; initial input=0D 'balance-counterpart-history=0D (or (car-safe balance-counterpart-history)=0D balance-default-counterpart-transation-type)=0D )))=0D ;; TODO cas du ch=E8que=0D tt))=0D (oset counterpart-record :description (oref this-record :description))=0D (oset counterpart-record :state (oref this-record :state))=0D (oset counterpart-record :amount (calcFunc-neg (oref this-record :amount))= )=0D (oset counterpart-record :balance nil)=0D (require 'iswitchb)=0D (add-hook 'iswitchb-make-buflist-hook=0D (lambda ()=0D (let (ret buf root+name)=0D (setq balance-root+name-alist nil)=0D (dolist (b iswitchb-temp-buflist)=0D (when (and=0D (setq buf (get-buffer b))=0D (buffer-live-p buf)=0D (with-current-buffer buf=0D (derived-mode-p 'balance-mode))=0D (setq root+name (balance-get-root+name buf))=0D (string=3D (car root+name) (car this-root+name)))=0D (push (cons buf root+name) balance-root+name-alist)))=0D (let ((this-buff-cell=0D (and balance-o-buffer=0D (assq (oref balance-o-buffer buffer)=0D balance-root+name-alist))))=0D (and this-buff-cell=0D (setq balance-root+name-alist=0D (delq this-buff-cell balance-root+name-alist))))=0D (setq iswitchb-temp-buflist =0D (nreverse (mapcar =0D (lambda (x) (buffer-name (car x)))=0D balance-root+name-alist))))))=0D (let* ((prompt "Contrepartie vers ")=0D (iswitchb-regexp "\\.bal\\(?:<[0-9]+>\\)?$")=0D (counterpart-buf (get-buffer (iswitchb-read-buffer prompt))))=0D (when (and counterpart-buf=0D (setq counterpart-root+name (assq counterpart-buf balance-root+name-= alist)))=0D (with-current-buffer counterpart-buf=0D (setq=0D ;; cdr n=E9cessaire, car assq renvoie (KEY . VAL) et pas seulement = VAL.=0D counterpart-root+name (cdr counterpart-root+name)=0D counterpart-sheet balance-o-main-sheet=0D counterpart-transfer-id (oref counterpart-sheet :transfer-id))=0D (oset counterpart-sheet :transfer-id (math-add 1 counterpart-transfe= r-id))=0D (oset this-sheet :transfer-id (math-add 1 this-transfer-id))=0D (let ((min-line (oref balance-o-buffer :min-line))=0D (max-line (oref balance-o-buffer :max-line))=0D (cur-line (line-number-at-pos)))=0D (if (< cur-line min-line)=0D (balance-goto-line (min min-line max-line))=0D (if (> cur-line max-line)=0D (balance-goto-line max-line)))=0D (oset counterpart-record=0D :transfer=0D (make-instance 'balance-transfer=0D :dest-account (cdr this-root+name)=0D :id-number counterpart-transfer-id=0D :dest-id-number this-transfer-id))=0D (oset this-record=0D :transfer=0D (make-instance 'balance-transfer=0D :dest-account (cdr counterpart-root+name)=0D :id-number counterpart-transfer-id=0D :dest-id-number this-transfer-id))=0D (balance-ensure-has-transfer-col)=0D (balance-insert counterpart-record=0D (oref balance-o-buffer :column-list) )))=0D (balance-ensure-has-transfer-col)=0D (balance-write this-record (oref balance-o-buffer :column-list)) ))))= ))=0D =0D (run-hooks 'balance-load-hook)=0D (provide 'balance)=0D ;;;; end of balance.el=0D --=-=-= Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable ----------------------------------------------------------------------- My Emacs version is ----------------------------------------------------------------------- GNU Emacs 24.4.50.1 (i686-pc-mingw32) of 2014-09-23 on CHOUNEK ----------------------------------------------------------------------- VBR, Vincent. In GNU Emacs 24.4.50.1 (i686-pc-mingw32) of 2014-09-23 on CHOUNEK Repository revision: 117919 monnier@iro.umontreal.ca-20140922182202-1xk0sig= 32d1av0lw Windowing system distributor `Microsoft Corp.', version 5.1.2600 Configured using: `configure --prefix=3Dc:/Programme/GNU/Emacs --without-jpeg --without-tiff --without-gif --without-png 'CPPFLAGS=3D -DFOR_MSW=3D1 -I C:/Programme/GNU/installation/emacs-install/libXpm-3.5.8/include -I C:/Programme/GNU/installation/emacs-install/libXpm-3.5.8/src -L c:/Programme/GNU/installation/emacs-install/libXpm-3.5.8/src' CPP=3D/mingw/bin/cpp.exe PKG_CONFIG_PATH=3D/mingw/lib/pkgconfig:/usr/local/lib/pkgconfig' Configured features: XPM SOUND NOTIFY ACL ZLIB Important settings: value of $EMACSPATH: c:\Programme\NGNU\CVS;C:\Programme\GNU\GnuPG;c:\Prog= ramme\apache-ant-1.8.0\bin;c:\msys\1.0\bin;c:\msys\1.0\mingw\bin; value of $LANG: FRA locale-coding-system: cp1252 Major mode: Shell Minor modes in effect: TeX-PDF-mode: t diff-auto-refine-mode: t shell-dirtrack-mode: t recentf-mode: t mail-abbrevs-mode: t iswitchb-mode: t tooltip-mode: t electric-indent-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 line-number-mode: t Recent input: x m k r c ] SPC t y p o SPC i n SPC m a n y =20 u a l F o u n d SPC =20 C-y =20 _ _ =20 SPC i n SPC M-SPC C-y p a g=20 e SPC , SPC o f SPC 2 SPC D e c m =20 e m b e r SPC 2 0 1 3 , SPC p a g e SPC 7 / 3 6 , SPC=20 d o c u m e n t a t i o n SPC o f SPC - n o r c SPC=20 o p t i o n . =20 C-a C-k C-k C-x C-o : SPC `=20 i s ' SPC s h o u l d SPC r e a d SPC ' =20 =EC ` i t ' SPC , SPC s h o l=20 d u l d n ' t SPC i t SPC ?=20 SPC=20 SPC SPC V i n c e n t . V B R , C-x 1 =20 C-a H e=20 l l o SPC J p o h n , =20 =20 =20 M-d =20 C-c C-s y=20 C-x b M-x r e p o r t - b u f =20 g e m Recent messages: Sending via mail... 250 2.1.0 sender ok 250 2.1.5 recipient ok 250 2.1.5 recipient ok 354 enter mail, end with "." on a line by itself Sending email=20 Sending email done 250 2.0.0 vFer1o0032maGi203FerKl mail accepted for delivery 221 2.0.0 mwinf5d59 ME closing connection Sending...done Load-path shadows: d:/msys/1.0/home/Vincent/.emacs.d/etc/custom hides c:/Programme/GNU/Emacs/s= hare/emacs/24.4.50/lisp/custom c:/Programme/GNU/Emacs/share/emacs/24.4.50/lisp/loaddefs hides c:/Programme= /GNU/installation/cedet-install/cedet/lisp/cedet/loaddefs Features: (shadow warnings emacsbug pcmpl-unix balance autoload lisp-mnt parse-time vc-cvs plain-tex etags doc-view image-mode ps-mode find-dired iso-transl calc-map picture calc-vec tabify table vc ediff-vers ediff-merg ediff-wind ediff-diff ediff-mult ediff-help ediff-init ediff-util ediff cal-move cal-menu calendar cal-loaddefs calc-store perl-mode calc-lang thingatpt calc-embed calc-yank calc-units calccomp calc-alg calc-aent calc-menu calc-prog calc-forms cus-edit add-log texmathp tex-info texinfo make-mode mule-util vc-dispatcher vc-svn preview prv-emacs reftex-dcr reftex-auc reftex reftex-vars tex-buf noutline outline font-latex latex tex-style tex advice tex-mode compile latexenc dired-aux mailcap whitespace diff-mode easy-mmode sh-script smie executable rect vc-bzr autoconf autoconf-mode shell pcomplete comint ansi-color ring bbdb-com crm network-stream starttls tls mailalias smtpmail auth-source password-cache qp mail-extr sort bbdb-message sendmail gnus-util message format-spec rfc822 mml mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils gmm-utils mailheader dired-x dired ses unsafep misearch multi-isearch hl-line eieio-opt speedbar sb-image ezimage dframe find-func help-mode help-fns jka-compr info accents-ascii eieio byte-opt bytecomp byte-compile cconv eieio-core tex-mik preview-latex tex-site auto-loads calc-mathfloat calc-math edmacro kmacro w32utils java-init cl-macs cl gv bsh-init recentf tree-widget wid-edit cl-loaddefs cl-lib generic-x cc-mode cc-fonts cc-guess cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs template mailabbrev iswitchb cus-start cus-load bbdb easymenu bbdb-site timezone bbdb-loaddefs calc-misc calc-arith calc-ext calc calc-loaddefs calc-macs skeleton load-path-to-cedet-svn time-date tooltip electric uniquify ediff-hook vc-hooks lisp-float-type mwheel dos-w32 ls-lisp w32-common-fns disp-table w32-win w32-vars tool-bar dnd fontset image regexp-opt fringe tabulated-list newcomment lisp-mode prog-mode register page menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core frame cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer 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 make-network-process w32notify w32 multi-tty emacs) Memory information: ((conses 8 773132 199581) (symbols 24 43851 86) (miscs 20 2350 4804) (strings 16 108692 22663) (string-bytes 1 4446193) (vectors 8 44769) (vector-slots 4 1606851 63216) (floats 8 223 967) (intervals 28 51226 4510) (buffers 516 81)) --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Fri Sep 26 12:59:58 2014 Received: (at 18556) by debbugs.gnu.org; 26 Sep 2014 16:59:58 +0000 Received: from localhost ([127.0.0.1]:53236 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XXYs9-0004TK-Ej for submit@debbugs.gnu.org; Fri, 26 Sep 2014 12:59:57 -0400 Received: from smtp.cs.ucla.edu ([131.179.128.62]:41553) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XXYs4-0004T6-UR for 18556@debbugs.gnu.org; Fri, 26 Sep 2014 12:59:53 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp.cs.ucla.edu (Postfix) with ESMTP id A329839E8019; Fri, 26 Sep 2014 09:59:51 -0700 (PDT) X-Virus-Scanned: amavisd-new at smtp.cs.ucla.edu Received: from smtp.cs.ucla.edu ([127.0.0.1]) by localhost (smtp.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 13PYZxSNmHQP; Fri, 26 Sep 2014 09:59:43 -0700 (PDT) Received: from penguin.cs.ucla.edu (Penguin.CS.UCLA.EDU [131.179.64.200]) by smtp.cs.ucla.edu (Postfix) with ESMTPSA id F04F039E8012; Fri, 26 Sep 2014 09:59:42 -0700 (PDT) Message-ID: <54259B7A.4090802@cs.ucla.edu> Date: Fri, 26 Sep 2014 09:59:38 -0700 From: Paul Eggert Organization: UCLA Computer Science Department User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.1.1 MIME-Version: 1.0 To: =?UTF-8?B?VmluY2VudCBCZWxhw69jaGU=?= Subject: Re: 24.4.50; update-file-autoloads never ends Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: -3.0 (---) X-Debbugs-Envelope-To: 18556 Cc: 18556@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.0 (---) I could not reproduce the problem with Emacs trunk bzr 117958 built on Fedora 20 with GCC 4.9.1, in either 32- or 64-bit builds, and in either en_US.UTF-8 or fr_FR.iso885915@euro locales. Here's the behavior I observed: $ ls -l /tmp/d/balance.el -rw-r--r--. 1 eggert eggert 110567 Sep 26 09:38 /tmp/d/balance.el $ time src/emacs -Q --batch '--eval=(update-file-autoloads "/tmp/d/balance.el" nil "/tmp/d/my_autoloads.el")' Generating autoloads for /tmp/d/balance.el... Wrote /tmp/d/my_autoloads.el Generating autoloads for /tmp/d/balance.el...done real 0m0.041s user 0m0.033s sys 0m0.007s $ ls -l /tmp/d/my_autoloads.el -rw-r--r--. 1 eggert eggert 260 Sep 26 09:56 /tmp/d/my_autoloads.el $ cat /tmp/d/my_autoloads.el ;;; my_autoloads.el --- automatically extracted autoloads ;; ;;; Code: (provide 'my_autoloads) ;; Local Variables: ;; version-control: never ;; no-byte-compile: t ;; no-update-autoloads: t ;; coding: utf-8 ;; End: ;;; my_autoloads.el ends here From debbugs-submit-bounces@debbugs.gnu.org Fri Sep 26 13:21:33 2014 Received: (at 18556) by debbugs.gnu.org; 26 Sep 2014 17:21:33 +0000 Received: from localhost ([127.0.0.1]:53240 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XXZD3-00053f-5c for submit@debbugs.gnu.org; Fri, 26 Sep 2014 13:21:33 -0400 Received: from mtaout20.012.net.il ([80.179.55.166]:65202) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XXZD0-00053T-5S for 18556@debbugs.gnu.org; Fri, 26 Sep 2014 13:21:31 -0400 Received: from conversion-daemon.a-mtaout20.012.net.il by a-mtaout20.012.net.il (HyperSendmail v2007.08) id <0NCI00800QRERH00@a-mtaout20.012.net.il> for 18556@debbugs.gnu.org; Fri, 26 Sep 2014 20:21:28 +0300 (IDT) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout20.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NCI008ETQVSIX50@a-mtaout20.012.net.il>; Fri, 26 Sep 2014 20:21:28 +0300 (IDT) Date: Fri, 26 Sep 2014 20:21:16 +0300 From: Eli Zaretskii Subject: Re: bug#18556: 24.4.50; update-file-autoloads never ends In-reply-to: <54259B7A.4090802@cs.ucla.edu> X-012-Sender: halo1@inter.net.il To: Paul Eggert Message-id: <83fvfeti0j.fsf@gnu.org> References: <80wq8sbawq.fsf@gmail.com> <54259B7A.4090802@cs.ucla.edu> X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 18556 Cc: vincent.b.1@hotmail.fr, 18556@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: Eli Zaretskii List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) > Date: Fri, 26 Sep 2014 09:59:38 -0700 > From: Paul Eggert > Cc: 18556@debbugs.gnu.org > > I could not reproduce the problem with Emacs trunk bzr 117958 built on > Fedora 20 with GCC 4.9.1, in either 32- or 64-bit builds, and in either > en_US.UTF-8 or fr_FR.iso885915@euro locales. And I couldn't reproduce it on MS-Windows with trunk r117955. It finishes almost instantly for me. Vincent, if you attach GDB to the hung Emacs and type "thread apply all bt" at the GDB prompt, what do you see? From debbugs-submit-bounces@debbugs.gnu.org Fri Sep 26 13:25:13 2014 Received: (at 18556) by debbugs.gnu.org; 26 Sep 2014 17:25:13 +0000 Received: from localhost ([127.0.0.1]:53246 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XXZGa-00059W-SC for submit@debbugs.gnu.org; Fri, 26 Sep 2014 13:25:13 -0400 Received: from mtaout20.012.net.il ([80.179.55.166]:32895) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XXZGX-00059L-V5 for 18556@debbugs.gnu.org; Fri, 26 Sep 2014 13:25:10 -0400 Received: from conversion-daemon.a-mtaout20.012.net.il by a-mtaout20.012.net.il (HyperSendmail v2007.08) id <0NCI00800QRERH00@a-mtaout20.012.net.il> for 18556@debbugs.gnu.org; Fri, 26 Sep 2014 20:25:09 +0300 (IDT) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout20.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NCI0085XR1WOG20@a-mtaout20.012.net.il>; Fri, 26 Sep 2014 20:25:09 +0300 (IDT) Date: Fri, 26 Sep 2014 20:24:57 +0300 From: Eli Zaretskii Subject: Re: bug#18556: 24.4.50; update-file-autoloads never ends In-reply-to: <83fvfeti0j.fsf@gnu.org> X-012-Sender: halo1@inter.net.il To: eggert@cs.ucla.edu, vincent.b.1@hotmail.fr Message-id: <83eguythue.fsf@gnu.org> References: <80wq8sbawq.fsf@gmail.com> <54259B7A.4090802@cs.ucla.edu> <83fvfeti0j.fsf@gnu.org> X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 18556 Cc: 18556@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: Eli Zaretskii List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) > Date: Fri, 26 Sep 2014 20:21:16 +0300 > From: Eli Zaretskii > Cc: vincent.b.1@hotmail.fr, 18556@debbugs.gnu.org > > > Date: Fri, 26 Sep 2014 09:59:38 -0700 > > From: Paul Eggert > > Cc: 18556@debbugs.gnu.org > > > > I could not reproduce the problem with Emacs trunk bzr 117958 built on > > Fedora 20 with GCC 4.9.1, in either 32- or 64-bit builds, and in either > > en_US.UTF-8 or fr_FR.iso885915@euro locales. > > And I couldn't reproduce it on MS-Windows with trunk r117955. It > finishes almost instantly for me. > > Vincent, if you attach GDB to the hung Emacs and type "thread apply > all bt" at the GDB prompt, what do you see? Btw, is it possible that one of the packages that balance.el requires is not what we have in the Emacs trunk, but you have its different version from some other repository? From debbugs-submit-bounces@debbugs.gnu.org Sun Sep 28 05:56:52 2014 Received: (at 18556) by debbugs.gnu.org; 28 Sep 2014 09:56:52 +0000 Received: from localhost ([127.0.0.1]:54098 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XYBDm-0005CB-OH for submit@debbugs.gnu.org; Sun, 28 Sep 2014 05:56:51 -0400 Received: from smtp02.smtpout.orange.fr ([80.12.242.124]:16752 helo=smtp.smtpout.orange.fr) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XYBDj-0005C1-2E for 18556@debbugs.gnu.org; Sun, 28 Sep 2014 05:56:48 -0400 Received: from CHOUNEK ([109.218.82.63]) by mwinf5d37 with ME id wZwh1o00Z1MyVad03ZwhiH; Sun, 28 Sep 2014 11:56:45 +0200 X-ME-Helo: CHOUNEK X-ME-Date: Sun, 28 Sep 2014 11:56:45 +0200 X-ME-IP: 109.218.82.63 From: =?iso-8859-1?Q?Vincent_Bela=EFche?= To: Eli Zaretskii , Paul Eggert Subject: RE: bug#18556: 24.4.50; update-file-autoloads never ends Date: Sun, 28 Sep 2014 11:56:38 +0200 Message-ID: <80zjdk9ig9.fsf@gmail.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: 1.2 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has identified this incoming email as possible spam. The original message has been attached to this so you can view it (if it isn't spam) or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Hello Eli & Paul, > Date: Fri, 26 Sep 2014 20:24:57 +0300 > From: eliz@gnu.org > Subject: Re: bug#18556: 24.4.50; update-file-autoloads never ends > To: eggert@cs.ucla.edu; vincent.b.1@hotmail.fr > CC: 18556@debbugs.gnu.org > > > Date: Fri, 26 Sep 2014 20:21:16 +0300 > > From: Eli Zaretskii > > Cc: vincent.b.1@hotmail.fr, 18556@debbugs.gnu.org > > > > > Date: Fri, 26 Sep 2014 09:59:38 -0700 > > > From: Paul Eggert > > > Cc: 18556@debbugs.gnu.org > > > > > > I could not reproduce the problem with Emacs trunk bzr 117958 built on > > > Fedora 20 with GCC 4.9.1, in either 32- or 64-bit builds, and in either > > > en_US.UTF-8 or fr_FR.iso885915@euro locales. > > > > And I couldn't reproduce it on MS-Windows with trunk r117955. It > > finishes almost instantly for me. > > > > Vincent, if you attach GDB to the hung Emacs and type "thread apply > > all bt" at the GDB prompt, what do you see? > > Btw, is it possible that one of the packages that balance.el requires > is not what we have in the Emacs trunk, but you have its different > version from some other repository? [...] Content analysis details: (1.2 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (vincent.b.1[at]hotmail.fr) -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [80.12.242.124 listed in list.dnswl.org] 1.0 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) 0.2 FREEMAIL_ENVFROM_END_DIGIT Envelope-from freemail username ends in digit (vincent.b.1[at]hotmail.fr) X-Debbugs-Envelope-To: 18556 Cc: =?iso-8859-1?Q?Vincent_Bela=EFche?= , 18556@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.2 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has identified this incoming email as possible spam. The original message has been attached to this so you can view it (if it isn't spam) or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Hello Eli & Paul, > Date: Fri, 26 Sep 2014 20:24:57 +0300 > From: eliz@gnu.org > Subject: Re: bug#18556: 24.4.50; update-file-autoloads never ends > To: eggert@cs.ucla.edu; vincent.b.1@hotmail.fr > CC: 18556@debbugs.gnu.org > > > Date: Fri, 26 Sep 2014 20:21:16 +0300 > > From: Eli Zaretskii > > Cc: vincent.b.1@hotmail.fr, 18556@debbugs.gnu.org > > > > > Date: Fri, 26 Sep 2014 09:59:38 -0700 > > > From: Paul Eggert > > > Cc: 18556@debbugs.gnu.org > > > > > > I could not reproduce the problem with Emacs trunk bzr 117958 built on > > > Fedora 20 with GCC 4.9.1, in either 32- or 64-bit builds, and in either > > > en_US.UTF-8 or fr_FR.iso885915@euro locales. > > > > And I couldn't reproduce it on MS-Windows with trunk r117955. It > > finishes almost instantly for me. > > > > Vincent, if you attach GDB to the hung Emacs and type "thread apply > > all bt" at the GDB prompt, what do you see? > > Btw, is it possible that one of the packages that balance.el requires > is not what we have in the Emacs trunk, but you have its different > version from some other repository? [...] Content analysis details: (1.2 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [80.12.242.124 listed in list.dnswl.org] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (vincent.b.1[at]hotmail.fr) 1.0 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) 0.2 FREEMAIL_ENVFROM_END_DIGIT Envelope-from freemail username ends in digit (vincent.b.1[at]hotmail.fr) --=-=-= Content-Type: text/plain Hello Eli & Paul, ---------------------------------------- > Date: Fri, 26 Sep 2014 20:24:57 +0300 > From: eliz@gnu.org > Subject: Re: bug#18556: 24.4.50; update-file-autoloads never ends > To: eggert@cs.ucla.edu; vincent.b.1@hotmail.fr > CC: 18556@debbugs.gnu.org > > > Date: Fri, 26 Sep 2014 20:21:16 +0300 > > From: Eli Zaretskii > > Cc: vincent.b.1@hotmail.fr, 18556@debbugs.gnu.org > > > > > Date: Fri, 26 Sep 2014 09:59:38 -0700 > > > From: Paul Eggert > > > Cc: 18556@debbugs.gnu.org > > > > > > I could not reproduce the problem with Emacs trunk bzr 117958 built on > > > Fedora 20 with GCC 4.9.1, in either 32- or 64-bit builds, and in either > > > en_US.UTF-8 or fr_FR.iso885915@euro locales. > > > > And I couldn't reproduce it on MS-Windows with trunk r117955. It > > finishes almost instantly for me. > > > > Vincent, if you attach GDB to the hung Emacs and type "thread apply > > all bt" at the GDB prompt, what do you see? > > Btw, is it possible that one of the packages that balance.el requires > is not what we have in the Emacs trunk, but you have its different > version from some other repository? It is fully possible that balance.el requires some package not in the emacs trunk as I have this in my ~/.emacs.d/init.el ----------------------------------------------------------------------- ;; remove CEDET/EIEIO/SPEEDBAR that are distributed with EMACS from the load ;; path, and replace them with those of CEDET distribution (load "~/.emacs.d/etc/load-path-to-cedet-svn.el") ----------------------------------------------------------------------- This is because I develop jpicedt with jdee, and at some point of time the eieio of Emacs was too old compared to what jdee expected. Anyhow, In don't think that this is the problem because I can reproduce the hanging with -Q command line option. Attached is the gdb session log that Paul desired. VBR, Vincent. --=-=-= Content-Type: text/plain Content-Disposition: attachment; filename=bugbug18556_1.log Content-Description: gbd session log Microsoft Windows XP [version 5.1.2600] (C) Copyright 1985-2001 Microsoft Corp. c:\Programme\GNU\Emacs\bin>gdb gdb GNU gdb (GDB) 7.4 Copyright (C) 2012 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "i686-pc-mingw32". For bug reporting instructions, please see: . (gdb) attach 231132 Attaching to process 231132 [New Thread 231132.0x382e8] [New Thread 231132.0x38130] [New Thread 231132.0x38750] [New Thread 231132.0x382e4] Reading symbols from c:\Programme\GNU\Emacs\bin\emacs.exe...done. (gdb) thread apply all bt Thread 4 (Thread 231132.0x382e4): #0 0x7c91120f in ntdll!DbgUiConnectToDbg () from C:\WINDOWS\system32\ntdll.dll #1 0x7c962119 in ntdll!KiIntSystemCall () from C:\WINDOWS\system32\ntdll.dll #2 0x00000005 in ?? () #3 0x00000004 in ?? () #4 0x00000001 in ?? () #5 0x0d35ffd0 in ?? () #6 0x00000000 in ?? () Thread 3 (Thread 231132.0x38750): #0 0x7c91e514 in ntdll!LdrAccessResource () from C:\WINDOWS\system32\ntdll.dll #1 0x7e3991be in USER32!GetProcessWindowStation () from C:\WINDOWS\system32\user32.dll #2 0x7e3991f1 in USER32!GetMessageW () from C:\WINDOWS\system32\user32.dll #3 0x01157e8c in w32_msg_pump (msg_buf=) at w32fns.c:2498 #4 0x011585e0 in w32_msg_worker@4 (arg=0x0) at w32fns.c:2724 #5 0x7c80b729 in KERNEL32!GetModuleFileNameA () from C:\WINDOWS\system32\kernel32.dll #6 0x00000000 in ?? () Thread 2 (Thread 231132.0x38130): #0 0x7c91e514 in ntdll!LdrAccessResource () from C:\WINDOWS\system32\ntdll.dll #1 0x7c91d21a in ntdll!ZwDelayExecution () from C:\WINDOWS\system32\ntdll.dll #2 0x7c8023f1 in SleepEx () from C:\WINDOWS\system32\kernel32.dll #3 0x00000000 in ?? () Thread 1 (Thread 231132.0x382e8): #0 Ffind_file_name_handler (filename=104868529, operation=21122626) at fileio.c:371 #1 0x010c316a in Fdirectory_file_name (directory=104868529) at fileio.c:675 #2 0x01100c16 in Ffuncall (nargs=2, args=0x82e918) at eval.c:2726 #3 0x01132691 in exec_byte_code (bytestr=1, vector=22454806, maxdepth=36, args_template=1028, nargs=21065338, args=0x2) at bytecode.c:920 #4 0x011007d9 in funcall_lambda (fun=75938813, nargs=1, arg_vector=0x82eaac) at eval.c:2894 #5 0x01100a2f in Ffuncall (nargs=2, args=0x82eaa8) at eval.c:2787 #6 0x01132691 in exec_byte_code (bytestr=1, vector=22454806, maxdepth=84, args_template=0, nargs=21065338, args=0x2) at bytecode.c:920 #7 0x011007d9 in funcall_lambda (fun=76245765, nargs=0, arg_vector=0x82ec44) at eval.c:2894 #8 0x01100a2f in Ffuncall (nargs=1, args=0x82ec40) at eval.c:2787 #9 0x01100346 in eval_sub (form=25559334) at eval.c:2153 #10 0x010ff326 in internal_catch (tag=22277098, func=0x10ffd5e , arg=25559334) at eval.c:1111 #11 0x01134016 in exec_byte_code (bytestr=1, vector=22454806, maxdepth=52, args_template=3076, nargs=8580368, args=0x8d) at bytecode.c:1101 #12 0x011007d9 in funcall_lambda (fun=75939429, nargs=1, arg_vector=0x82eea4) at eval.c:2894 #13 0x01100a2f in Ffuncall (nargs=2, args=0x82eea0) at eval.c:2787 #14 0x01132691 in exec_byte_code (bytestr=1, vector=22454806, maxdepth=28, args_template=3076, nargs=8580764, args=0x2) at bytecode.c:920 #15 0x011007d9 in funcall_lambda (fun=75939565, nargs=3, arg_vector=0x82f098) at eval.c:2894 #16 0x01100a2f in Ffuncall (nargs=4, args=0x82f094) at eval.c:2787 #17 0x010fcaa0 in Ffuncall_interactively (nargs=4, args=0x82f094) at callint.c:270 #18 0x01100afb in Ffuncall (nargs=5, args=0x82f090) at eval.c:2706 #19 0x01101a3f in Fapply (nargs=3, args=0x82f194) at eval.c:2346 #20 0x010fcde6 in Fcall_interactively (function=22713250, record_flag=22541562, keys=21090829) at callint.c:416 #21 0x01100c89 in Ffuncall (nargs=4, args=0x82f25c) at eval.c:2733 #22 0x01132691 in exec_byte_code (bytestr=1, vector=22454806, maxdepth=52, args_template=4100, nargs=8581736, args=0x4) at bytecode.c:920 #23 0x011007d9 in funcall_lambda (fun=19024757, nargs=2, arg_vector=0x82f3e8) at eval.c:2894 #24 0x01100a2f in Ffuncall (nargs=3, args=0x82f3e4) at eval.c:2787 #25 0x01132691 in exec_byte_code (bytestr=1, vector=22454806, maxdepth=60, args_template=2052, nargs=8582112, args=0x3) at bytecode.c:920 #26 0x011007d9 in funcall_lambda (fun=19024429, nargs=2, arg_vector=0x82f5f8) at eval.c:2894 #27 0x01100a2f in Ffuncall (nargs=3, args=0x82f5f4) at eval.c:2787 #28 0x010fcaa0 in Ffuncall_interactively (nargs=3, args=0x82f5f4) at callint.c:270 #29 0x01100afb in Ffuncall (nargs=4, args=0x82f5f0) at eval.c:2706 #30 0x01101a3f in Fapply (nargs=3, args=0x82f6e4) at eval.c:2346 #31 0x010fcde6 in Fcall_interactively (function=21216914, record_flag=21065338, keys=21090829) at callint.c:416 #32 0x01100c89 in Ffuncall (nargs=4, args=0x82f7ac) at eval.c:2733 #33 0x01132691 in exec_byte_code (bytestr=1, vector=22454806, maxdepth=52, args_template=4100, nargs=8583096, args=0x4) at bytecode.c:920 #34 0x011007d9 in funcall_lambda (fun=19024757, nargs=1, arg_vector=0x82f92c) at eval.c:2894 #35 0x01100a2f in Ffuncall (nargs=2, args=0x82f928) at eval.c:2787 #36 0x01100eb3 in call1 (fn=21108970, arg1=21216914) at eval.c:2579 #37 0x010a3b49 in command_loop_1 () at keyboard.c:1572 #38 0x010ff3e2 in internal_condition_case (bfun=0x10a3836 , handlers=21115634, hfun=0x109b122 ) at eval.c:1350 #39 0x0109a3b7 in command_loop_2 (ignore=21065338) at keyboard.c:1196 #40 0x010ff326 in internal_catch (tag=21109474, func=0x109a397 , arg=21065338) at eval.c:1111 #41 0x0109adf5 in command_loop () at keyboard.c:1175 #42 recursive_edit_1 () at keyboard.c:785 #43 0x0109b06e in Frecursive_edit () at keyboard.c:856 #44 0x011aeb4e in main (argc=, argv=0xa42aa0) at emacs.c:1642 (gdb) quit A debugging session is active. Inferior 1 [process 231132] will be detached. Quit anyway? (y or n) [answered Y; input not from terminal] Detaching from program: c:\Programme\GNU\Emacs\bin\emacs.exe, Pid 231132 c:\Programme\GNU\Emacs\bin> --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Sun Sep 28 06:36:08 2014 Received: (at 18556) by debbugs.gnu.org; 28 Sep 2014 10:36:08 +0000 Received: from localhost ([127.0.0.1]:54120 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XYBpo-0006CZ-2a for submit@debbugs.gnu.org; Sun, 28 Sep 2014 06:36:08 -0400 Received: from dub004-omc1s23.hotmail.com ([157.55.0.222]:58595) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XYBpl-0006CR-TV for 18556@debbugs.gnu.org; Sun, 28 Sep 2014 06:36:06 -0400 Received: from DUB109-W70 ([157.55.0.237]) by DUB004-OMC1S23.hotmail.com with Microsoft SMTPSVC(7.5.7601.22724); Sun, 28 Sep 2014 03:36:05 -0700 X-TMN: [cW/spJJbOOK2ZHxrVvggn8MSARn8BS5q] X-Originating-Email: [vincent.b.1@hotmail.fr] Message-ID: From: =?iso-8859-1?B?VmluY2VudCBCZWxh72NoZQ==?= To: Paul Eggert Subject: RE: 24.4.50; update-file-autoloads never ends Date: Sun, 28 Sep 2014 12:36:04 +0200 Importance: Normal In-Reply-To: <54259B7A.4090802@cs.ucla.edu> References: <54259B7A.4090802@cs.ucla.edu> Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginalArrivalTime: 28 Sep 2014 10:36:05.0126 (UTC) FILETIME=[01AB5260:01CFDB08] X-Spam-Score: 0.2 (/) X-Debbugs-Envelope-To: 18556 Cc: "18556@debbugs.gnu.org" <18556@debbugs.gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.2 (/) Hello Paul=2C=0A= BTW=2C I had not noticed this=2C even if you cannot reproduce getting hung= =2C nevertheless there seems to be a problem in what you logged : the my_au= toloads.el that you produced is basically empty. That should not be the cas= e=2C there should be at least balance-mode function as auto-loadable.=0A= =0A= Regards=2C=A0 =A0Vincent.=0A= ----------------------------------------=0A= > Date: Fri=2C 26 Sep 2014 09:59:38 -0700=0A= > From: eggert@cs.ucla.edu=0A= > To: vincent.b.1@hotmail.fr=0A= > CC: 18556@debbugs.gnu.org=0A= > Subject: Re: 24.4.50=3B update-file-autoloads never ends=0A= >=0A= > I could not reproduce the problem with Emacs trunk bzr 117958 built on=0A= > Fedora 20 with GCC 4.9.1=2C in either 32- or 64-bit builds=2C and in eith= er=0A= > en_US.UTF-8 or fr_FR.iso885915@euro locales. Here's the behavior I=0A= > observed:=0A= >=0A= > $ ls -l /tmp/d/balance.el=0A= > -rw-r--r--. 1 eggert eggert 110567 Sep 26 09:38 /tmp/d/balance.el=0A= > $ time src/emacs -Q --batch '--eval=3D(update-file-autoloads=0A= > "/tmp/d/balance.el" nil "/tmp/d/my_autoloads.el")'=0A= > Generating autoloads for /tmp/d/balance.el...=0A= > Wrote /tmp/d/my_autoloads.el=0A= > Generating autoloads for /tmp/d/balance.el...done=0A= >=0A= > real 0m0.041s=0A= > user 0m0.033s=0A= > sys 0m0.007s=0A= > $ ls -l /tmp/d/my_autoloads.el=0A= > -rw-r--r--. 1 eggert eggert 260 Sep 26 09:56 /tmp/d/my_autoloads.el=0A= > $ cat /tmp/d/my_autoloads.el=0A= > =3B=3B=3B my_autoloads.el --- automatically extracted autoloads=0A= > =3B=3B=0A= > =3B=3B=3B Code:=0A= >=0A= >=0A= > (provide 'my_autoloads)=0A= > =3B=3B Local Variables:=0A= > =3B=3B version-control: never=0A= > =3B=3B no-byte-compile: t=0A= > =3B=3B no-update-autoloads: t=0A= > =3B=3B coding: utf-8=0A= > =3B=3B End:=0A= > =3B=3B=3B my_autoloads.el ends here=0A= = From debbugs-submit-bounces@debbugs.gnu.org Sun Sep 28 12:24:57 2014 Received: (at 18556) by debbugs.gnu.org; 28 Sep 2014 16:24:57 +0000 Received: from localhost ([127.0.0.1]:54484 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XYHHM-0007d6-VY for submit@debbugs.gnu.org; Sun, 28 Sep 2014 12:24:57 -0400 Received: from mtaout26.012.net.il ([80.179.55.182]:49841) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XYHHK-0007cv-Nh for 18556@debbugs.gnu.org; Sun, 28 Sep 2014 12:24:55 -0400 Received: from conversion-daemon.mtaout26.012.net.il by mtaout26.012.net.il (HyperSendmail v2007.08) id <0NCM00L00D82KR00@mtaout26.012.net.il> for 18556@debbugs.gnu.org; Sun, 28 Sep 2014 19:22:59 +0300 (IDT) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by mtaout26.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NCM00LQ7DIA7B10@mtaout26.012.net.il>; Sun, 28 Sep 2014 19:22:59 +0300 (IDT) Date: Sun, 28 Sep 2014 19:24:42 +0300 From: Eli Zaretskii Subject: Re: bug#18556: 24.4.50; update-file-autoloads never ends In-reply-to: <80zjdk9ig9.fsf@gmail.com> X-012-Sender: halo1@inter.net.il To: Vincent =?iso-8859-1?Q?Bela=EFche?= Message-id: <83vbo7n25x.fsf@gnu.org> MIME-version: 1.0 Content-type: text/plain; charset=iso-8859-1 Content-transfer-encoding: 8BIT References: <80zjdk9ig9.fsf@gmail.com> X-Spam-Score: 3.7 (+++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has identified this incoming email as possible spam. The original message has been attached to this so you can view it (if it isn't spam) or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: > From: Vincent Belaïche > Cc: Vincent Belaïche , > 18556@debbugs.gnu.org > Date: Sun, 28 Sep 2014 11:56:38 +0200 > > It is fully possible that balance.el requires some package not in the > emacs trunk as I have this in my ~/.emacs.d/init.el > > > ;; remove CEDET/EIEIO/SPEEDBAR that are distributed with EMACS from the load > ;; path, and replace them with those of CEDET distribution > (load "~/.emacs.d/etc/load-path-to-cedet-svn.el") > > > This is because I develop jpicedt with jdee, and at some point of time > the eieio of Emacs was too old compared to what jdee expected. Anyhow, > In don't think that this is the problem because I can reproduce the > hanging with -Q command line option. [...] Content analysis details: (3.7 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 2.7 RCVD_IN_PSBL RBL: Received via a relay in PSBL [80.179.55.182 listed in psbl.surriel.com] 1.0 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) X-Debbugs-Envelope-To: 18556 Cc: vincent.b.1@hotmail.fr, eggert@cs.ucla.edu, 18556@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: Eli Zaretskii List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 3.7 (+++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has identified this incoming email as possible spam. The original message has been attached to this so you can view it (if it isn't spam) or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: > From: Vincent Belaïche > Cc: Vincent Belaïche , > 18556@debbugs.gnu.org > Date: Sun, 28 Sep 2014 11:56:38 +0200 > > It is fully possible that balance.el requires some package not in the > emacs trunk as I have this in my ~/.emacs.d/init.el > > > ;; remove CEDET/EIEIO/SPEEDBAR that are distributed with EMACS from the load > ;; path, and replace them with those of CEDET distribution > (load "~/.emacs.d/etc/load-path-to-cedet-svn.el") > > > This is because I develop jpicedt with jdee, and at some point of time > the eieio of Emacs was too old compared to what jdee expected. Anyhow, > In don't think that this is the problem because I can reproduce the > hanging with -Q command line option. [...] Content analysis details: (3.7 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 2.7 RCVD_IN_PSBL RBL: Received via a relay in PSBL [80.179.55.182 listed in psbl.surriel.com] 1.0 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) > From: Vincent Belaïche > Cc: Vincent Belaïche , > 18556@debbugs.gnu.org > Date: Sun, 28 Sep 2014 11:56:38 +0200 > > It is fully possible that balance.el requires some package not in the > emacs trunk as I have this in my ~/.emacs.d/init.el > > ----------------------------------------------------------------------- > ;; remove CEDET/EIEIO/SPEEDBAR that are distributed with EMACS from the load > ;; path, and replace them with those of CEDET distribution > (load "~/.emacs.d/etc/load-path-to-cedet-svn.el") > ----------------------------------------------------------------------- > > This is because I develop jpicedt with jdee, and at some point of time > the eieio of Emacs was too old compared to what jdee expected. Anyhow, > In don't think that this is the problem because I can reproduce the > hanging with -Q command line option. How is -Q relevant to package shadowing? If you have a different eieio installed that shadows the stock one, Emacs will load it even with -Q. > Attached is the gdb session log that Paul desired. Thanks. Please use the procedure described in etc/DEBUG under "If the symptom of the bug is that Emacs fails to respond" to find out whether Emacs is inflooping, and if so, where. From debbugs-submit-bounces@debbugs.gnu.org Sun Sep 28 12:27:54 2014 Received: (at 18556) by debbugs.gnu.org; 28 Sep 2014 16:27:54 +0000 Received: from localhost ([127.0.0.1]:54487 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XYHKD-0007hj-Px for submit@debbugs.gnu.org; Sun, 28 Sep 2014 12:27:54 -0400 Received: from mtaout28.012.net.il ([80.179.55.184]:58835) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XYHKB-0007ha-G0 for 18556@debbugs.gnu.org; Sun, 28 Sep 2014 12:27:52 -0400 Received: from conversion-daemon.mtaout28.012.net.il by mtaout28.012.net.il (HyperSendmail v2007.08) id <0NCM00F00D7WJ300@mtaout28.012.net.il> for 18556@debbugs.gnu.org; Sun, 28 Sep 2014 19:26:45 +0300 (IDT) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by mtaout28.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NCM00HLPDOL3400@mtaout28.012.net.il>; Sun, 28 Sep 2014 19:26:45 +0300 (IDT) Date: Sun, 28 Sep 2014 19:27:39 +0300 From: Eli Zaretskii Subject: Re: bug#18556: 24.4.50; update-file-autoloads never ends In-reply-to: X-012-Sender: halo1@inter.net.il To: Vincent =?iso-8859-1?Q?Bela=EFche?= Message-id: <83tx3rn210.fsf@gnu.org> MIME-version: 1.0 Content-type: text/plain; charset=iso-8859-1 Content-transfer-encoding: 8BIT References: <54259B7A.4090802@cs.ucla.edu> X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 18556 Cc: 18556@debbugs.gnu.org, eggert@cs.ucla.edu X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: Eli Zaretskii List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) > From: Vincent Belaïche > Date: Sun, 28 Sep 2014 12:36:04 +0200 > Cc: "18556@debbugs.gnu.org" <18556@debbugs.gnu.org> > > Hello Paul, > BTW, I had not noticed this, even if you cannot reproduce getting hung, nevertheless there seems to be a problem in what you logged : the my_autoloads.el that you produced is basically empty. That should not be the case, there should be at least balance-mode function as auto-loadable. FWIW, I get the same results as Paul in that file. From debbugs-submit-bounces@debbugs.gnu.org Mon Sep 29 02:38:28 2014 Received: (at 18556) by debbugs.gnu.org; 29 Sep 2014 06:38:28 +0000 Received: from localhost ([127.0.0.1]:54779 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XYUbK-0003ON-O4 for submit@debbugs.gnu.org; Mon, 29 Sep 2014 02:38:27 -0400 Received: from smtp02.smtpout.orange.fr ([80.12.242.124]:25265 helo=smtp.smtpout.orange.fr) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XYUbE-0003O9-N2 for 18556@debbugs.gnu.org; Mon, 29 Sep 2014 02:38:22 -0400 Received: from CHOUNEK ([109.218.82.63]) by mwinf5d25 with ME id wueH1o00B1MyVad03ueHzD; Mon, 29 Sep 2014 08:38:19 +0200 X-ME-Helo: CHOUNEK X-ME-Date: Mon, 29 Sep 2014 08:38:19 +0200 X-ME-IP: 109.218.82.63 From: =?iso-8859-1?Q?Vincent_Bela=EFche?= To: Eli Zaretskii Subject: RE: bug#18556: 24.4.50; update-file-autoloads never ends Date: Mon, 29 Sep 2014 08:38:15 +0200 Message-ID: <80lhp39bjc.fsf@gmail.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: 1.2 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has identified this incoming email as possible spam. The original message has been attached to this so you can view it (if it isn't spam) or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Hello Eli, Just to clarify the point that -Q should or not prevent the shadowing: it *should* prevent shadowing. What I do in the init.el is that I remove from load-path the path to the eieio bundled with Emacs, and I replace it with another one on some cedet anonymous checkout. [...] Content analysis details: (1.2 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (vincent.b.1[at]hotmail.fr) -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [80.12.242.124 listed in list.dnswl.org] 1.0 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) 0.2 FREEMAIL_ENVFROM_END_DIGIT Envelope-from freemail username ends in digit (vincent.b.1[at]hotmail.fr) X-Debbugs-Envelope-To: 18556 Cc: =?iso-8859-1?Q?Vincent_Bela=EFche?= , Paul Eggert , 18556@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.2 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has identified this incoming email as possible spam. The original message has been attached to this so you can view it (if it isn't spam) or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Hello Eli, Just to clarify the point that -Q should or not prevent the shadowing: it *should* prevent shadowing. What I do in the init.el is that I remove from load-path the path to the eieio bundled with Emacs, and I replace it with another one on some cedet anonymous checkout. [...] Content analysis details: (1.2 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [80.12.242.124 listed in list.dnswl.org] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (vincent.b.1[at]hotmail.fr) 1.0 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) 0.2 FREEMAIL_ENVFROM_END_DIGIT Envelope-from freemail username ends in digit (vincent.b.1[at]hotmail.fr) --=-=-= Content-Type: text/plain Hello Eli, Just to clarify the point that -Q should or not prevent the shadowing: it *should* prevent shadowing. What I do in the init.el is that I remove from load-path the path to the eieio bundled with Emacs, and I replace it with another one on some cedet anonymous checkout. So, if I have -Q this hacking of load-path does not occur, and shadowing bundled module won't occur. FYI, attached is load-path-to-cedet-svn.el which is loaded from my init file to do the shadowing. Vincent. --=-=-= Content-Type: application/emacs-lisp Content-Disposition: attachment; filename=load-path-to-cedet-svn.el Content-Transfer-Encoding: quoted-printable =0D (setq load-root-dir "c:/Programme/GNU/")=0D =0D =0D (let ((dir-list '("cedet" "cedet/ede" "eieio" "speedbar"))=0D (cedet-root (concat=0D (directory-file-name (expand-file-name "installation/cedet-install/cedet= /lisp" =0D load-root-dir))=0D "/")))=0D (dolist (v dir-list)=0D (let ((found (let ((ld load-path)=0D (re (concat (regexp-quote v) "/?\\'")))=0D (while (and ld (null (string-match re (car ld))))=0D (setq ld (cdr ld)))=0D ld)))=0D (when found=0D (setcar found (concat cedet-root v))))))=0D =0D (provide 'load-path-to-cedet-svn)=0D =0D =0D --=-=-= Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable ---------------------------------------- > Date: Sun, 28 Sep 2014 19:24:42 +0300 > From: eliz@gnu.org > Subject: Re: bug#18556: 24.4.50; update-file-autoloads never ends > To: vincent.b.1@hotmail.fr > CC: eggert@cs.ucla.edu; vincent.b.1@hotmail.fr; 18556@debbugs.gnu.org > >> From: Vincent Bela=EFche >> Cc: Vincent Bela=EFche , >> 18556@debbugs.gnu.org >> Date: Sun, 28 Sep 2014 11:56:38 +0200 >> >> It is fully possible that balance.el requires some package not in the >> emacs trunk as I have this in my ~/.emacs.d/init.el >> >> ----------------------------------------------------------------------- >> ;; remove CEDET/EIEIO/SPEEDBAR that are distributed with EMACS from the = load >> ;; path, and replace them with those of CEDET distribution >> (load "~/.emacs.d/etc/load-path-to-cedet-svn.el") >> ----------------------------------------------------------------------- >> --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Mon Sep 29 02:53:33 2014 Received: (at 18556) by debbugs.gnu.org; 29 Sep 2014 06:53:33 +0000 Received: from localhost ([127.0.0.1]:54783 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XYUpx-0003mC-3T for submit@debbugs.gnu.org; Mon, 29 Sep 2014 02:53:33 -0400 Received: from mtaout24.012.net.il ([80.179.55.180]:60143) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XYUpt-0003m1-Ic for 18556@debbugs.gnu.org; Mon, 29 Sep 2014 02:53:30 -0400 Received: from conversion-daemon.mtaout24.012.net.il by mtaout24.012.net.il (HyperSendmail v2007.08) id <0NCN00K00HFE2O00@mtaout24.012.net.il> for 18556@debbugs.gnu.org; Mon, 29 Sep 2014 09:47:42 +0300 (IDT) Received: from HOME-C4E4A596F7 ([87.69.4.28]) by mtaout24.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NCN00ITFHJFTI10@mtaout24.012.net.il>; Mon, 29 Sep 2014 09:47:42 +0300 (IDT) Date: Mon, 29 Sep 2014 09:53:15 +0300 From: Eli Zaretskii Subject: Re: bug#18556: 24.4.50; update-file-autoloads never ends In-reply-to: <80lhp39bjc.fsf@gmail.com> X-012-Sender: halo1@inter.net.il To: Vincent =?iso-8859-1?Q?Bela=EFche?= Message-id: <83fvfancis.fsf@gnu.org> MIME-version: 1.0 Content-type: text/plain; charset=iso-8859-1 Content-transfer-encoding: 8BIT References: <80lhp39bjc.fsf@gmail.com> X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 18556 Cc: 18556@debbugs.gnu.org, eggert@cs.ucla.edu X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: Eli Zaretskii List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) > From: Vincent Belaïche > Cc: Vincent Belaïche , > 18556@debbugs.gnu.org, Paul Eggert > Date: Mon, 29 Sep 2014 08:38:15 +0200 > > Just to clarify the point that -Q should or not prevent the shadowing: > it *should* prevent shadowing. > > What I do in the init.el is that I remove from load-path the path to the > eieio bundled with Emacs, and I replace it with another one on some > cedet anonymous checkout. > > So, if I have -Q this hacking of load-path does not occur, and shadowing > bundled module won't occur. This is a misunderstanding. I didn't mean what you do in init.el, I meant these lines in balance.el: (require 'eieio) (require 'calc-ext) (require 'calc-forms) If you have another version of eieio and/or calc somewhere along your default load-path, then these 'require' directives will load those other versions. From debbugs-submit-bounces@debbugs.gnu.org Mon Sep 29 03:06:34 2014 Received: (at 18556) by debbugs.gnu.org; 29 Sep 2014 07:06:34 +0000 Received: from localhost ([127.0.0.1]:54798 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XYV2X-00045M-7a for submit@debbugs.gnu.org; Mon, 29 Sep 2014 03:06:33 -0400 Received: from smtp02.smtpout.orange.fr ([80.12.242.124]:46817 helo=smtp.smtpout.orange.fr) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1XYV2U-00045D-Kt for 18556@debbugs.gnu.org; Mon, 29 Sep 2014 03:06:31 -0400 Received: from CHOUNEK ([109.218.82.63]) by mwinf5d25 with ME id wv6U1o00X1MyVad03v6Vd0; Mon, 29 Sep 2014 09:06:29 +0200 X-ME-Helo: CHOUNEK X-ME-Date: Mon, 29 Sep 2014 09:06:29 +0200 X-ME-IP: 109.218.82.63 From: =?iso-8859-1?Q?Vincent_Bela=EFche?= To: Eli Zaretskii Subject: RE: bug#18556: 24.4.50; update-file-autoloads never ends Date: Mon, 29 Sep 2014 09:06:27 +0200 Message-ID: <80k34maoss.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 1.2 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has identified this incoming email as possible spam. The original message has been attached to this so you can view it (if it isn't spam) or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: > Date: Mon, 29 Sep 2014 09:53:15 +0300 > From: eliz@gnu.org > Subject: Re: bug#18556: 24.4.50; update-file-autoloads never ends > To: vincent.b.1@hotmail.fr > CC: 18556@debbugs.gnu.org; eggert@cs.ucla.edu > > > From: Vincent Belaïche > > Cc: Vincent Belaïche , > > 18556@debbugs.gnu.org, Paul Eggert > > Date: Mon, 29 Sep 2014 08:38:15 +0200 > > > > Just to clarify the point that -Q should or not prevent the shadowing: > > it *should* prevent shadowing. > > > > What I do in the init.el is that I remove from load-path the path to the > > eieio bundled with Emacs, and I replace it with another one on some > > cedet anonymous checkout. > > > > So, if I have -Q this hacking of load-path does not occur, and shadowing > > bundled module won't occur. > > This is a misunderstanding. I didn't mean what you do in init.el, I > meant these lines in balance.el: > > (require 'eieio) > (require 'calc-ext) > (require 'calc-forms) > > If you have another version of eieio and/or calc somewhere along your > default load-path, then these 'require' directives will load those > other versions. [...] Content analysis details: (1.2 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [80.12.242.124 listed in list.dnswl.org] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (vincent.b.1[at]hotmail.fr) 1.0 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) 0.2 FREEMAIL_ENVFROM_END_DIGIT Envelope-from freemail username ends in digit (vincent.b.1[at]hotmail.fr) X-Debbugs-Envelope-To: 18556 Cc: =?iso-8859-1?Q?Vincent_Bela=EFche?= , Paul Eggert , 18556@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.2 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has identified this incoming email as possible spam. The original message has been attached to this so you can view it (if it isn't spam) or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: > Date: Mon, 29 Sep 2014 09:53:15 +0300 > From: eliz@gnu.org > Subject: Re: bug#18556: 24.4.50; update-file-autoloads never ends > To: vincent.b.1@hotmail.fr > CC: 18556@debbugs.gnu.org; eggert@cs.ucla.edu > > > From: Vincent Belaïche > > Cc: Vincent Belaïche , > > 18556@debbugs.gnu.org, Paul Eggert > > Date: Mon, 29 Sep 2014 08:38:15 +0200 > > > > Just to clarify the point that -Q should or not prevent the shadowing: > > it *should* prevent shadowing. > > > > What I do in the init.el is that I remove from load-path the path to the > > eieio bundled with Emacs, and I replace it with another one on some > > cedet anonymous checkout. > > > > So, if I have -Q this hacking of load-path does not occur, and shadowing > > bundled module won't occur. > > This is a misunderstanding. I didn't mean what you do in init.el, I > meant these lines in balance.el: > > (require 'eieio) > (require 'calc-ext) > (require 'calc-forms) > > If you have another version of eieio and/or calc somewhere along your > default load-path, then these 'require' directives will load those > other versions. [...] Content analysis details: (1.2 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (vincent.b.1[at]hotmail.fr) -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [80.12.242.124 listed in list.dnswl.org] 1.0 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) 0.2 FREEMAIL_ENVFROM_END_DIGIT Envelope-from freemail username ends in digit (vincent.b.1[at]hotmail.fr) ---------------------------------------- > Date: Mon, 29 Sep 2014 09:53:15 +0300 > From: eliz@gnu.org > Subject: Re: bug#18556: 24.4.50; update-file-autoloads never ends > To: vincent.b.1@hotmail.fr > CC: 18556@debbugs.gnu.org; eggert@cs.ucla.edu > > > From: Vincent Bela=EFche > > Cc: Vincent Bela=EFche , > > 18556@debbugs.gnu.org, Paul Eggert > > Date: Mon, 29 Sep 2014 08:38:15 +0200 > > > > Just to clarify the point that -Q should or not prevent the shadowing: > > it *should* prevent shadowing. > > > > What I do in the init.el is that I remove from load-path the path to the > > eieio bundled with Emacs, and I replace it with another one on some > > cedet anonymous checkout. > > > > So, if I have -Q this hacking of load-path does not occur, and shadowing > > bundled module won't occur. > > This is a misunderstanding. I didn't mean what you do in init.el, I > meant these lines in balance.el: > > (require 'eieio) > (require 'calc-ext) > (require 'calc-forms) > > If you have another version of eieio and/or calc somewhere along your > default load-path, then these 'require' directives will load those > other versions. Well, Loading the other versions was what was "intended" for eieio. Indeed that could be changed now because I presume that current Emacs has a recent enough eieio, and anyway balance did not really needed that recent one, I just did that in my init.el because of jdee. Anyway, I don't think that this is the problem, with the -Q option I do not tamper with the default load-path, so those lines in balance.el will load the package that are bundled with Emacs, not any other ones. Won't they? But still I have the hanging with -Q. Vincent. From debbugs-submit-bounces@debbugs.gnu.org Sat Oct 25 18:03:51 2014 Received: (at 18556) by debbugs.gnu.org; 25 Oct 2014 22:03:51 +0000 Received: from localhost ([127.0.0.1]:35536 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Xi9R8-0003sI-9l for submit@debbugs.gnu.org; Sat, 25 Oct 2014 18:03:51 -0400 Received: from smtp04.smtpout.orange.fr ([80.12.242.126]:30462 helo=smtp.smtpout.orange.fr) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Xi9R4-0003s3-Or for 18556@debbugs.gnu.org; Sat, 25 Oct 2014 18:03:49 -0400 Received: from CHOUNEK ([2.2.31.48]) by mwinf5d07 with ME id 7a3c1p00A12Hghe03a3cYU; Sun, 26 Oct 2014 00:03:40 +0200 X-ME-Helo: CHOUNEK X-ME-Date: Sun, 26 Oct 2014 00:03:40 +0200 X-ME-IP: 2.2.31.48 From: =?iso-8859-1?Q?Vincent_Bela=EFche?= To: Eli Zaretskii , Paul Eggert Subject: bug#18556: 24.4.50; update-file-autoloads never ends Date: Sun, 26 Oct 2014 00:03:23 +0200 Message-ID: <80siibn6xg.fsf@gmail.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: 1.2 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has identified this incoming email as possible spam. The original message has been attached to this so you can view it (if it isn't spam) or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Hello Paul & Eli, I have tried again the same thing with a fairly recent Emacs --- built from a bzr update done yesterday, and it is still the same hanging. I need to C-g to exit the hanging up, and I get this in the *Message* buffer: [...] Content analysis details: (1.2 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [80.12.242.126 listed in list.dnswl.org] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (vincent.b.1[at]hotmail.fr) 1.0 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) 0.2 FREEMAIL_ENVFROM_END_DIGIT Envelope-from freemail username ends in digit (vincent.b.1[at]hotmail.fr) X-Debbugs-Envelope-To: 18556 Cc: =?iso-8859-1?Q?Vincent_Bela=EFche?= , 18556@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.2 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has identified this incoming email as possible spam. The original message has been attached to this so you can view it (if it isn't spam) or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Hello Paul & Eli, I have tried again the same thing with a fairly recent Emacs --- built from a bzr update done yesterday, and it is still the same hanging. I need to C-g to exit the hanging up, and I get this in the *Message* buffer: [...] Content analysis details: (1.2 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [80.12.242.126 listed in list.dnswl.org] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (vincent.b.1[at]hotmail.fr) 1.0 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) 0.2 FREEMAIL_ENVFROM_END_DIGIT Envelope-from freemail username ends in digit (vincent.b.1[at]hotmail.fr) --=-=-= Content-Type: text/plain Hello Paul & Eli, I have tried again the same thing with a fairly recent Emacs --- built from a bzr update done yesterday, and it is still the same hanging. I need to C-g to exit the hanging up, and I get this in the *Message* buffer: ----------------------------------------------------------------------- For information about GNU Emacs and the GNU system, type C-h C-a. Making completion list... Generating autoloads for c:/msys/1.0/local/projects/balance/lisp/balance.el... Quit ----------------------------------------------------------------------- The load-path variable is the following (for this Emacs started with -Q so that I get the standard value of load-path): ("c:/Programme/GNU/Emacs/share/emacs/25.0.50/lisp" "c:/Programme/GNU/Emacs/share/emacs/25.0.50/lisp/vc" "c:/Programme/GNU/Emacs/share/emacs/25.0.50/lisp/url" "c:/Programme/GNU/Emacs/share/emacs/25.0.50/lisp/textmodes" "c:/Programme/GNU/Emacs/share/emacs/25.0.50/lisp/progmodes" "c:/Programme/GNU/Emacs/share/emacs/25.0.50/lisp/play" "c:/Programme/GNU/Emacs/share/emacs/25.0.50/lisp/org" "c:/Programme/GNU/Emacs/share/emacs/25.0.50/lisp/nxml" "c:/Programme/GNU/Emacs/share/emacs/25.0.50/lisp/net" "c:/Programme/GNU/Emacs/share/emacs/25.0.50/lisp/mh-e" "c:/Programme/GNU/Emacs/share/emacs/25.0.50/lisp/mail" "c:/Programme/GNU/Emacs/share/emacs/25.0.50/lisp/leim" "c:/Programme/GNU/Emacs/share/emacs/25.0.50/lisp/language" "c:/Programme/GNU/Emacs/share/emacs/25.0.50/lisp/international" "c:/Programme/GNU/Emacs/share/emacs/25.0.50/lisp/gnus" "c:/Programme/GNU/Emacs/share/emacs/25.0.50/lisp/eshell" "c:/Programme/GNU/Emacs/share/emacs/25.0.50/lisp/erc" "c:/Programme/GNU/Emacs/share/emacs/25.0.50/lisp/emulation" "c:/Programme/GNU/Emacs/share/emacs/25.0.50/lisp/emacs-lisp" "c:/Programme/GNU/Emacs/share/emacs/25.0.50/lisp/cedet" "c:/Programme/GNU/Emacs/share/emacs/25.0.50/lisp/calendar" "c:/Programme/GNU/Emacs/share/emacs/25.0.50/lisp/calc" "c:/Programme/GNU/Emacs/share/emacs/25.0.50/lisp/obsolete") Here is the output of 'M-x version': GNU Emacs 25.0.50.3 (i686-pc-mingw32) of 2014-10-25 on CHOUNEK Also I did again the gbd/attach that Paul had asked for, and it is attached to this email. FYI, after trimming balance.el more and more, and checking whether it hangs up or not, it came out that if balance.el contains a single line as follows, that is sufficient to cause the hanging forever to happen. ----------------------------------------------------------------------- (require 'eieio) ----------------------------------------------------------------------- If under that Emacs I do `C-h f eieio-defclass-autoload', and then from the *Help* window I follow the eieio-core.el link, I get into the eieio-core.el bundled with Emacs, aka that in c:/Programme/GNU/Emacs/share/emacs/25.0.50/lisp/emacs-lisp/ where my Emacs is installed in: c:/Programme/GNU/Emacs VBR, Vincent. --=-=-= Content-Type: text/plain Content-Disposition: attachment; filename=bug18556.log /c>cd Programme/GNU/installation/emacs-install/emacs/trunk/src/ /c/Programme/GNU/installation/emacs-install/emacs/trunk/src>gdb GNU gdb (GDB) 7.4 Copyright (C) 2012 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "i686-pc-mingw32". For bug reporting instructions, please see: . (gdb) .gdbinit:19: Error in sourced command file: No symbol table is loaded. Use the "file" command. No symbol table is loaded. Use the "file" command. (gdb) attach 127520 Attaching to process 127520 [New Thread 127520.0x1ec88] [New Thread 127520.0x1f1d0] [New Thread 127520.0x1f25c] [New Thread 127520.0x1f6e8] Reading symbols from c:\Programme\GNU\Emacs\bin\emacs.exe...done. (gdb) thread apply all bt Thread 4 (Thread 127520.0x1f6e8): #0 0x7c91120f in ntdll!DbgUiConnectToDbg () from C:\WINDOWS\system32\ntdll.dll #1 0x7c962119 in ntdll!KiIntSystemCall () from C:\WINDOWS\system32\ntdll.dll #2 0x00000005 in ?? () #3 0x00000004 in ?? () #4 0x00000001 in ?? () #5 0x1d48ffd0 in ?? () #6 0x00000000 in ?? () Thread 3 (Thread 127520.0x1f25c): #0 0x7c91e514 in ntdll!LdrAccessResource () from C:\WINDOWS\system32\ntdll.dll #1 0x7e3991be in USER32!GetProcessWindowStation () from C:\WINDOWS\system32\user32.dll #2 0x7e3991f1 in USER32!GetMessageW () from C:\WINDOWS\system32\user32.dll #3 0x0115a184 in w32_msg_pump (msg_buf=) at w32fns.c:2502 #4 0x0115a7a7 in w32_msg_worker@4 (arg=0x0) at w32fns.c:2729 #5 0x7c80b729 in KERNEL32!GetModuleFileNameA () from C:\WINDOWS\system32\kernel32.dll #6 0x00000000 in ?? () Thread 2 (Thread 127520.0x1f1d0): #0 0x7c91e514 in ntdll!LdrAccessResource () from C:\WINDOWS\system32\ntdll.dll #1 0x7c91d21a in ntdll!ZwDelayExecution () from C:\WINDOWS\system32\ntdll.dll #2 0x7c8023f1 in SleepEx () from C:\WINDOWS\system32\kernel32.dll #3 0x00000000 in ?? () Thread 1 (Thread 127520.0x1ec88): #0 0x011343bf in exec_byte_code (bytestr=18041728, vector=75323703, maxdepth=36, args_template=1028, nargs=21057146, args=0x21) at bytecode.c:1963 #1 0x0110237f in funcall_lambda (fun=75560181, nargs=1, arg_vector=0x82ecd8) at eval.c:2890 #2 0x011025d9 in Ffuncall (nargs=2, args=0x82ecd4) at eval.c:2784 #3 0x011344d1 in exec_byte_code (bytestr=18041728, vector=75323703, maxdepth=96, args_template=3076, nargs=21057146, args=0x2) at bytecode.c:920 #4 0x0110237f in funcall_lambda (fun=75560389, nargs=1, arg_vector=0x82ee74) at eval.c:2890 #5 0x011025d9 in Ffuncall (nargs=2, args=0x82ee70) at eval.c:2784 #6 0x011344d1 in exec_byte_code (bytestr=18041728, vector=75323703, maxdepth=28, args_template=3076, nargs=8580716, args=0x2) at bytecode.c:920 #7 0x0110237f in funcall_lambda (fun=75705725, nargs=3, arg_vector=0x82f068) at eval.c:2890 #8 0x011025d9 in Ffuncall (nargs=4, args=0x82f064) at eval.c:2784 #9 0x010fe610 in Ffuncall_interactively (nargs=4, args=0x82f064) at callint.c:270 #10 0x011026a0 in Ffuncall (nargs=5, args=0x82f060) at eval.c:2703 #11 0x011035e0 in Fapply (nargs=3, args=0x82f174) at eval.c:2343 #12 0x010fe956 in Fcall_interactively (function=22603178, record_flag=22873594, keys=21082637) at callint.c:416 #13 0x01102826 in Ffuncall (nargs=4, args=0x82f23c) at eval.c:2730 #14 0x011344d1 in exec_byte_code (bytestr=18041728, vector=75323703, maxdepth=52, args_template=4100, nargs=8581704, args=0x4) at bytecode.c:920 #15 0x0110237f in funcall_lambda (fun=19000917, nargs=2, arg_vector=0x82f3c8) at eval.c:2890 #16 0x011025d9 in Ffuncall (nargs=3, args=0x82f3c4) at eval.c:2784 #17 0x011344d1 in exec_byte_code (bytestr=18041728, vector=75323703, maxdepth=56, args_template=2052, nargs=8582080, args=0x3) at bytecode.c:920 #18 0x0110237f in funcall_lambda (fun=19000597, nargs=2, arg_vector=0x82f5d8) at eval.c:2890 #19 0x011025d9 in Ffuncall (nargs=3, args=0x82f5d4) at eval.c:2784 #20 0x010fe610 in Ffuncall_interactively (nargs=3, args=0x82f5d4) at callint.c:270 #21 0x011026a0 in Ffuncall (nargs=4, args=0x82f5d0) at eval.c:2703 #22 0x011035e0 in Fapply (nargs=3, args=0x82f6d4) at eval.c:2343 #23 0x010fe956 in Fcall_interactively (function=21208842, record_flag=21057146, keys=21082637) at callint.c:416 #24 0x01102826 in Ffuncall (nargs=4, args=0x82f79c) at eval.c:2730 #25 0x011344d1 in exec_byte_code (bytestr=18041728, vector=75323703, maxdepth=52, args_template=4100, nargs=8583080, args=0x4) at bytecode.c:920 #26 0x0110237f in funcall_lambda (fun=19000917, nargs=1, arg_vector=0x82f91c) at eval.c:2890 #27 0x011025d9 in Ffuncall (nargs=2, args=0x82f918) at eval.c:2784 #28 0x01102a4f in call1 (fn=21100778, arg1=21208842) at eval.c:2576 #29 0x010a5409 in command_loop_1 () at keyboard.c:1569 #30 0x01100f62 in internal_condition_case (bfun=0x10a50f5 , handlers=21107466, hfun=0x109c80d ) at eval.c:1344 #31 0x0109bae7 in command_loop_2 (ignore=21057146) at keyboard.c:1197 #32 0x01100ea6 in internal_catch (tag=21101282, func=0x109bac7 , arg=21057146) at eval.c:1105 #33 0x0109c4de in command_loop () at keyboard.c:1176 #34 recursive_edit_1 () at keyboard.c:786 #35 0x0109c759 in Frecursive_edit () at keyboard.c:857 #36 0x011b10e3 in main (argc=, argv=0xa42aa0) at emacs.c:1623 (gdb) quit A debugging session is active. Inferior 1 [process 127520] will be detached. Quit anyway? (y or n) [answered Y; input not from terminal] Detaching from program: c:\Programme\GNU\Emacs\bin\emacs.exe, Pid 127520 /c/Programme/GNU/installation/emacs-install/emacs/trunk/src>exit Process shell finished --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Sat Dec 26 11:09:23 2015 Received: (at control) by debbugs.gnu.org; 26 Dec 2015 16:09:23 +0000 Received: from localhost ([127.0.0.1]:41633 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aCrPH-0002h1-EE for submit@debbugs.gnu.org; Sat, 26 Dec 2015 11:09:23 -0500 Received: from hermes.netfonds.no ([80.91.224.195]:45204) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aCrPG-0002gt-AR for control@debbugs.gnu.org; Sat, 26 Dec 2015 11:09:22 -0500 Received: from 2.150.58.24.tmi.telenormobil.no ([2.150.58.24] helo=mouse) by hermes.netfonds.no with esmtpsa (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1aCrOt-0001Tc-4u for control@debbugs.gnu.org; Sat, 26 Dec 2015 17:08:59 +0100 Date: Sat, 26 Dec 2015 17:08:58 +0100 Message-Id: <8737upry3p.fsf@gnus.org> To: control@debbugs.gnu.org From: Lars Ingebrigtsen Subject: control message for bug #18556 X-MailScanner-ID: 1aCrOt-0001Tc-4u X-Netfonds-MailScanner: Found to be clean X-Netfonds-MailScanner-From: larsi@gnus.org MailScanner-NULL-Check: 1451750940.65767@EQpm9wvl5yFcW3+iRRqjXA X-Spam-Status: No X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) tags 18556 - moreinfo From debbugs-submit-bounces@debbugs.gnu.org Fri May 05 01:37:52 2017 Received: (at 18556) by debbugs.gnu.org; 5 May 2017 05:37:52 +0000 Received: from localhost ([127.0.0.1]:55156 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d6Vw7-0007jm-QH for submit@debbugs.gnu.org; Fri, 05 May 2017 01:37:51 -0400 Received: from eggs.gnu.org ([208.118.235.92]:59213) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d6Vw6-0007jZ-E6 for 18556@debbugs.gnu.org; Fri, 05 May 2017 01:37:50 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d6Vw0-0006RF-NT for 18556@debbugs.gnu.org; Fri, 05 May 2017 01:37:45 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:45336) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d6Vvw-0006QK-RI; Fri, 05 May 2017 01:37:40 -0400 Received: from rgm by fencepost.gnu.org with local (Exim 4.82) (envelope-from ) id 1d6Vvu-00036s-Ka; Fri, 05 May 2017 01:37:38 -0400 From: Glenn Morris To: Vincent =?utf-8?Q?Bela=C3=AFche?= Subject: Re: bug#18556: 24.4.50; update-file-autoloads never ends References: <54259B7A.4090802@cs.ucla.edu> X-Spook: KGB UOP Spammer Disaster fraud National preparedness X-Ran: ;BbQbhStcW^4.jbdqFyw4w)*-)lNhP,M%-EN8CxYLGgt4[cm>y7t%8L\&0-0Ei|TEm[sUB X-Hue: brightmagenta X-Attribution: GM Date: Fri, 05 May 2017 01:37:38 -0400 In-Reply-To: ("Vincent \=\?utf-8\?Q\?Bela\=C3\=AFche\=22's\?\= message of "Sun, 28 Sep 2014 12:36:04 +0200") Message-ID: User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 18556 Cc: 18556@debbugs.gnu.org, Paul Eggert X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) Vincent Bela=C3=AFche wrote: > BTW, I had not noticed this, even if you cannot reproduce getting > hung, nevertheless there seems to be a problem in what you logged : > the my_autoloads.el that you produced is basically empty. That should > not be the case, there should be at least balance-mode function as > auto-loadable. That's because you passed nil for the SAVE-AFTER argument of update-file-autoloads. From debbugs-submit-bounces@debbugs.gnu.org Fri May 05 01:39:55 2017 Received: (at 18556) by debbugs.gnu.org; 5 May 2017 05:39:55 +0000 Received: from localhost ([127.0.0.1]:55160 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d6Vy7-0007ml-5G for submit@debbugs.gnu.org; Fri, 05 May 2017 01:39:55 -0400 Received: from eggs.gnu.org ([208.118.235.92]:59628) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d6Vy6-0007mU-1g for 18556@debbugs.gnu.org; Fri, 05 May 2017 01:39:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d6Vy0-0007N6-4H for 18556@debbugs.gnu.org; Fri, 05 May 2017 01:39:48 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:45352) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d6Vxw-0007Ig-3v; Fri, 05 May 2017 01:39:44 -0400 Received: from rgm by fencepost.gnu.org with local (Exim 4.82) (envelope-from ) id 1d6Vxu-0006aU-Nz; Fri, 05 May 2017 01:39:42 -0400 From: Glenn Morris To: Vincent =?utf-8?Q?Bela=C3=AFche?= Subject: Re: bug#18556: 24.4.50; update-file-autoloads never ends References: <80wq8sbawq.fsf@gmail.com> <80siibn6xg.fsf@gmail.com> X-Spook: computer terrorism MP5K-SD Burn Ron Brown Disaster X-Ran: ?[B$F?0tQ9ge$=Z1RC?id8AKwfE"SdMJo9=w?Ct.`bB*3-I'T"=,|iOK)LNH5:}fx&^b%' X-Hue: black X-Attribution: GM Date: Fri, 05 May 2017 01:39:42 -0400 In-Reply-To: <80siibn6xg.fsf@gmail.com> ("Vincent \=\?utf-8\?Q\?Bela\=C3\=AFche\?\= \=\?utf-8\?Q\?\=22's\?\= message of "Sun, 26 Oct 2014 00:03:23 +0200") Message-ID: User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: 18556 Cc: Eli Zaretskii , Paul Eggert , 18556@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) I'm a third person who can't reproduce this, so I think it's best to close it, since it's been years, and I can't see it ever going anywhere. The backtrace is uninformative. Sorry. BTW, generating autoloads for foo.el does not evaluate foo.el, so AFAICS all the comments about what libraries balance.el might require are irrelevant. I have no idea how requires in balance.el could affect this issue. The whole thing makes no sense to me. From debbugs-submit-bounces@debbugs.gnu.org Fri May 05 01:40:04 2017 Received: (at control) by debbugs.gnu.org; 5 May 2017 05:40:04 +0000 Received: from localhost ([127.0.0.1]:55164 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d6VyG-0007nY-Ae for submit@debbugs.gnu.org; Fri, 05 May 2017 01:40:04 -0400 Received: from eggs.gnu.org ([208.118.235.92]:59641) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d6VyE-0007mu-UE for control@debbugs.gnu.org; Fri, 05 May 2017 01:40:03 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d6Vy9-0007S3-8T for control@debbugs.gnu.org; Fri, 05 May 2017 01:39:57 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:45353) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d6Vy9-0007Rw-4k for control@debbugs.gnu.org; Fri, 05 May 2017 01:39:57 -0400 Received: from rgm by fencepost.gnu.org with local (Exim 4.82) (envelope-from ) id 1d6Vy8-0006az-Mo for control@debbugs.gnu.org; Fri, 05 May 2017 01:39:56 -0400 Subject: control message for bug 18556 To: X-Mailer: mail (GNU Mailutils 2.99.98) Message-Id: From: Glenn Morris Date: Fri, 05 May 2017 01:39:56 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) tag 18556 wontfix close 18556 From unknown Sat Aug 16 00:33:58 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Fri, 02 Jun 2017 11:24:05 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator