Bug#792739: yaml-mode: symbol flavor undefined when adding to load path

2018-06-04 Thread Nicholas D Steeves
Dear António,

On Fri, Jul 17, 2015 at 11:23:43PM +0200, António P. P. Almeida wrote:
>  1. Trying to load the mode after installing it via aptitude on a
> running emacs 24.
>  2. Undefined variable when adding mode to load-path:
> concat: Symbol's value as variable is void: flavor
>  3. I attach a small patch that fixes the problem. Just use
> debian-emacs-flavor instead of flavor.
>  4. I already changed it in my system as you can see by the included
> config file.

I recently adopted yaml-mode, and I'm sorry it took so long for
someone to follow-up on your bug report.  When I updated the package I
chose to defer updating and applying your patch for three reasons.

1. A pleasant side-effect to transitioning to dh-elpa often solves
   this type of bug.
2. The Debian Emacsen team is currently working on a future transition
   to unflavoured emacs.
3. Admittedly I didn't want to do the work of updating your patch when
   #1 ought to solve this bug.

If it wouldn't be too much of a bother would you please confirm that
0.0.13-1 is good?  In the absence of a reply I plan to close this bug
at the end of July, and of course you would be welcome to reopen it if
the issue can still be triggered :-)

Thank you for taking the time to report this issue,
Sincerely,
Nicholas


signature.asc
Description: PGP signature


Bug#792739: yaml-mode: symbol flavor undefined when adding to load path

2015-07-17 Thread António P . P . Almeida
Package: yaml-mode
Version: 0.0.9-2
Severity: normal

Dear Maintainer,

*** Reporter, please consider answering these questions, where appropriate ***

   * What led up to the situation?
   * What exactly did you do (or not do) that was effective (or
 ineffective)?
   * What was the outcome of this action?
   * What outcome did you expect instead?

*** End of the template - remove these template lines ***

 1. Trying to load the mode after installing it via aptitude on a
running emacs 24.
 2. Undefined variable when adding mode to load-path:
concat: Symbol's value as variable is void: flavor
 3. I attach a small patch that fixes the problem. Just use
debian-emacs-flavor instead of flavor.
 4. I already changed it in my system as you can see by the included
config file.

-- System Information:
Debian Release: 8.1
  APT prefers stable
  APT policy: (500, 'stable'), (450, 'testing'), (350, 'unstable'), (300, 
'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.12-1-amd64 (SMP w/8 CPU cores)
Locale: LANG=pt_PT.UTF-8, LC_CTYPE=pt_PT.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: sysvinit (via /sbin/init)

Versions of packages yaml-mode depends on:
ii  emacs  46.1
ii  emacs24 [emacsen]  24.4+1-5
ii  emacsen-common 2.0.8

yaml-mode recommends no packages.

yaml-mode suggests no packages.

-- Configuration Files:
/etc/emacs/site-start.d/50yaml-mode.el changed:
;; -*-emacs-lisp-*-
;;
;; Emacs startup file, e.g.  /etc/emacs/site-start.d/50yaml-mode.el
;; for the Debian yaml-mode package
;;
;; Originally contributed by Nils Naumann naum...@unileoben.ac.at
;; Modified by Dirk Eddelbuettel e...@debian.org
;; Adapted for dh-make by Jim Van Zandt j...@debian.org
;; The yaml-mode package follows the Debian/GNU Linux 'emacsen' policy and
;; byte-compiles its elisp files for each 'emacs flavor' (emacs19,
;; xemacs19, emacs20, xemacs20...).  The compiled code is then
;; installed in a subdirectory of the respective site-lisp directory.
;; We have to add this to the load-path:
(let ((package-dir (concat /usr/share/
   (symbol-name debian-emacs-flavor)
   /site-lisp/yaml-mode)))
  ;; If package-dir does not exist, the yaml-mode package must have
  ;; removed but not purged, and we should skip the setup.
  (when (file-directory-p package-dir)
;; Use debian-pkg-add-load-path-item per �9 of debian emacs subpolicy
(debian-pkg-add-load-path-item package-dir )
(autoload 'yaml-mode yaml-mode
  Major mode for editing yaml-mode files. t)
(add-to-list 'auto-mode-alist '(\\.yaml\\' . yaml-mode))
(add-to-list 'auto-mode-alist '(\\.yml\\' . yaml-mode))
))


-- no debconf information
 
--- appa

--- 50yaml-mode.el.orig	2015-07-17 23:11:26.410006330 +0200
+++ 50yaml-mode.el	2015-07-17 23:11:54.266006064 +0200
@@ -13,10 +13,10 @@
 ;; installed in a subdirectory of the respective site-lisp directory.
 ;; We have to add this to the load-path:
 (let ((package-dir (concat /usr/share/
-   (symbol-name flavor)
+   (symbol-name debian-emacs-flavor)
/site-lisp/yaml-mode)))
-;; If package-dir does not exist, the yaml-mode package must have
-;; removed but not purged, and we should skip the setup.
+  ;; If package-dir does not exist, the yaml-mode package must have
+  ;; removed but not purged, and we should skip the setup.
   (when (file-directory-p package-dir)
 ;; Use debian-pkg-add-load-path-item per §9 of debian emacs subpolicy
 (debian-pkg-add-load-path-item package-dir )
@@ -25,4 +25,3 @@
 (add-to-list 'auto-mode-alist '(\\.yaml\\' . yaml-mode))
 (add-to-list 'auto-mode-alist '(\\.yml\\' . yaml-mode))
 ))
-