From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nick Dokos Subject: Re: org-element-at-point fails in programming-modes Date: Fri, 22 Aug 2014 09:46:32 -0400 Message-ID: <874mx4y6vb.fsf@pierrot.dokosmarshall.org> References: <87zjez9xqc.fsf@gmail.com> <87vbpn9x6u.fsf@gmail.com> <87ppfvxslz.fsf@pierrot.dokosmarshall.org> <86ppfvjpwk.fsf@somewhere.org> <87tx57me13.fsf@alphaville.bos.redhat.com> <87d2btxjbn.fsf@pierrot.dokosmarshall.org> <87ha147r8z.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:33334) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XKpBE-0005i8-J5 for emacs-orgmode@gnu.org; Fri, 22 Aug 2014 09:47:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XKpB8-0001Kt-9U for emacs-orgmode@gnu.org; Fri, 22 Aug 2014 09:47:00 -0400 Received: from plane.gmane.org ([80.91.229.3]:50893) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XKpB8-0001KZ-0u for emacs-orgmode@gnu.org; Fri, 22 Aug 2014 09:46:54 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1XKpB4-0008BQ-QR for emacs-orgmode@gnu.org; Fri, 22 Aug 2014 15:46:50 +0200 Received: from pool-173-48-174-104.bstnma.fios.verizon.net ([173.48.174.104]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 22 Aug 2014 15:46:50 +0200 Received: from ndokos by pool-173-48-174-104.bstnma.fios.verizon.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 22 Aug 2014 15:46:50 +0200 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 Thorsten Jolitz writes: > Nick Dokos writes: > >> Nick Dokos writes: >> >>> Sebastien Vauban >>> writes: >>> >>>> Nick Dokos wrote: >>>>> Thorsten Jolitz writes: >>>>>> Thorsten Jolitz writes: >>>>>> >>>>>> ... >>>>>> Am I the only one seeing this? Bug in gnus/message mode? >>>>> >>>>> I see empty lines between the blocks in gnus. >>>> >>>> I don't see the empty lines, like Thorsten. >>>> >>> >>> ... and on a different machine, I don't see them either. >>> Now I have to figure out what's different between them. >>> >> >> One machine is running Gnus v. 5.13: that one smooshes the code >> blocks together. >> >> The other is running Ma Gnus v. 0.12: that one leaves empty >> lines between blocks. > > Maybe they switched to the new parser between versions, that parses a > src-block with :post-blank's, but does not take them into account when > interpreting? > No clue. > ,----[ C-h f mm-display-inline-fontify RET ] > | mm-display-inline-fontify is a compiled Lisp function in `mm-view.el'. > | > | (mm-display-inline-fontify HANDLE &optional MODE) > | > | Insert HANDLE inline fontifying with MODE. > | If MODE is not set, try to find mode automatically. > `---- > > is responsable here, and if we would find the place where 'handle' is > parsed (I couldn't in reasonable time) we would probably know what is > the problem ('handle' is the src-block in this case, 'mode' is 'org'). The stack trace on Ma Gnus v. 0.12 (and probably on 5.13 as well) looks like this: mm-display-inline-fontify((# ("text/x-org") nil nil nil nil nil nil) org-mode) mm-display-org-inline((# ("text/x-org") nil nil nil nil nil nil)) mm-display-inline((# ("text/x-org") nil nil nil nil nil nil)) mm-display-part((# ("text/x-org") nil nil nil nil nil nil) t) byte-code("..." [ignored type gnus-summary-buffer buffer gnus-inhibit-images handle string-match throw nil buffer-live-p get-buffer "\\`image/" mm-inline-override-p 4 "inline" mm-attachment-override-p mm-automatic-display-p mm-inlinable-p mm-inlined-p mm-automatic-external-display-p t split-string "/" "text" rassq "message" insert-char 10 2 0 1 gnus-unbuttonized-mime-type-p gnus-insert-mime-button (set-buffer gnus-summary-buffer) ((error)) derived-mode-p gnus-article-mode mm-display-part mm-display-inline gnus-article-insert-newline "\n" -1 put-text-property gnus-undeletable gnus-treat-article "application/pgp-signature" not-attachment display text gnus-article-mime-handle-alist ...] 6) gnus-mime-display-single((# ("text/x-org") nil nil nil nil nil nil)) gnus-mime-display-part((# ("text/x-org") nil nil nil nil nil nil)) mapcar(gnus-mime-display-part ((# ("text/plain" (charset . gnus-decoded)) nil (lambda nil (let ((inhibit-read-only t)) (delete-region # #))) nil nil nil nil) (# ("text/x-org") nil (lambda nil (let ((inhibit-read-only t)) (delete-region # #))) nil nil nil nil) (# ("text/x-org") nil nil nil nil nil nil) (# ("text/x-org") nil nil nil nil nil nil) (# ("text/x-org") nil nil nil nil nil nil) (# ("text/plain" (charset . gnu s-decoded)) nil nil nil nil nil nil))) gnus-mime-display-mixed(((# ("text/plain" (charset . gnus-decoded)) nil (lambda nil (let ((inhibit-read-only t)) (delete-region # #))) nil nil nil nil) (# ("text/x-org") nil (lambda nil (let ((inhibit-read-only t)) (delete-region # #))) nil nil nil nil) (# ("text/x-org") nil nil nil nil nil nil) (# ("text/x-org") nil nil nil nil nil nil) (# ("text/x-org") nil nil nil nil nil nil) (# ("text/plain" (charset . gnus-deco ded)) nil nil nil nil nil nil))) gnus-mime-display-part(("multipart/mixed" (# ("text/plain" (charset . gnus-decoded)) nil (lambda nil (let ((inhibit-read-only t)) (delete-region # #))) nil nil nil nil) (# ("text/x-org") nil (lambda nil (let ((inhibit-read-only t)) (delete-region # #))) nil nil nil nil) (# ("text/x-org") nil nil nil nil nil nil) (# ("text/x-org") nil nil nil nil nil nil) (# ("text/x-org") nil nil nil nil nil nil) (# ("text/plain" (ch arset . gnus-decoded)) nil nil nil nil nil nil))) gnus-display-mime() gnus-article-prepare-display() gnus-article-prepare(89997 nil) gnus-summary-display-article(89997) gnus-summary-next-page(nil) funcall-interactively(gnus-summary-next-page nil) call-interactively(gnus-summary-next-page nil nil) command-execute(gnus-summary-next-page) The mm-display-inline-fontify call inserts "#+begin_foo...\n#+end_foo\n" and (I won't swear to this but I think it's right) somebody on the way *up* the stack adds an extra newline (maybe gnus-mime-display-single - the others seem too generic and/or too simple to do it). -- Nick