From mboxrd@z Thu Jan 1 00:00:00 1970 From: orgmode Subject: problems with org and pabbrev Date: Tue, 09 Feb 2016 15:43:06 +0100 Message-ID: <6e29e69ee8eb8913d2db433be1206aea@h-rd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:34101) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aT9Vc-0003Xu-01 for emacs-orgmode@gnu.org; Tue, 09 Feb 2016 09:43:17 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aT9VY-0008Tw-P4 for emacs-orgmode@gnu.org; Tue, 09 Feb 2016 09:43:15 -0500 Received: from smtprelay03.ispgateway.de ([80.67.31.30]:49572) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aT9VY-0008Op-Hl for emacs-orgmode@gnu.org; Tue, 09 Feb 2016 09:43:12 -0500 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Hi, somehow pabbrev mode doesn't work anymore with org, since I use org from elpa. after loading org, pabbrev is a minor mode, as indicated in the modeline. However runs the command org-cycle instead of pabbrev-expand-maybe. So I wrote the following functions: (defun org-cycle-or-pabbrev-expand () "use org-cycle in headline, otherwise use pabbrev-expand-maybe" (interactive) (if (looking-at org-outline-regexp) (org-cycle) (pabbrev-expand-maybe 'nil))) (add-hook 'org-mode-hook '(lambda () (define-key org-mode-map [tab] 'org-cycle-or-pabbrev-expand) )) This gives an error: Debugger entered--Lisp error: (wrong-type-argument number-or-marker-p nil) =(nil 4) (cond ((= uarg 4) (if (> (length pabbrev-expansion-suggestions) 1) (pabbrev-suggestions-goto-buffer pabbrev-expansion-suggestions) (pabbrev-call-previous-tab-binding))) ((eq last-command (quote pabbrev-expand-maybe)) (if (and (> (length pabbrev-expansion-suggestions) 1) (> (length pabbrev-last-expansion-suggestions) 1)) (pabbrev-suggestions-goto-buffer pabbrev-last-expansion-suggestions) (pabbrev-call-previous-tab-binding))) (pabbrev-expansion (progn (setq pabbrev-last-expansion-suggestions pabbrev-expansion-suggestions) (pabbrev-expand))) (t (pabbrev-call-previous-tab-binding))) pabbrev-expand-maybe-full(nil) (if pabbrev-minimal-expansion-p (pabbrev-expand-maybe-minimal uarg) (pabbrev-expand-maybe-full uarg)) pabbrev-expand-maybe(nil) (if (looking-at org-outline-regexp) (org-cycle) (pabbrev-expand-maybe (quote nil))) org-cycle-or-pabbrev-expand() call-interactively(org-cycle-or-pabbrev-expand nil nil) command-execute(org-cycle-or-pabbrev-expand) I've no idea how to preceed further, any help appreciated. Versions I use: emacs version 24.1 pabbrev Version: 4.2.1