emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: orgmode <orgmode@h-rd.org>
To: emacs-orgmode@gnu.org
Subject: problems with org and pabbrev
Date: Tue, 09 Feb 2016 15:43:06 +0100	[thread overview]
Message-ID: <6e29e69ee8eb8913d2db433be1206aea@h-rd.org> (raw)

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 <tab> 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

             reply	other threads:[~2016-02-09 14:43 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-09 14:43 orgmode [this message]
2016-02-09 15:50 ` problems with org and pabbrev Eric S Fraga
2016-02-10 11:47   ` orgmode
2016-02-10 16:22     ` Eric S Fraga

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6e29e69ee8eb8913d2db433be1206aea@h-rd.org \
    --to=orgmode@h-rd.org \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

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

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