Eli Zaretskii | 29 Aug 12:46 2014
Picon

[Emacs-diffs] trunk r117765: Add vectors support to Fsort.

Thanks for doing this.

This change should have a corresponding NEWS entry.

Eli Zaretskii | 29 Aug 11:53 2014
Picon

Re: Changes in frame/window code

> Date: Fri, 29 Aug 2014 11:00:31 +0200
> From: martin rudalics <rudalics <at> gmx.at>
> CC: emacs-devel <at> gnu.org
> 
>  > You mean, that "a" on the right fringe of the rightmost window?
>  > That's entirely unrelated to the problems I fixed in r117417.
> 
> Visually they are very similar.

No, they aren't: what you see on the fringe is always a remnant of a
cursor -- it's always in cursor colors, not the text colors.

IOW, something draws the cursor on the fringe, or maybe scrolls text
with the cursor on it, as drawn by the previous redisplay, without
paying attention to the fact that the x-coordinate is outside the text
area.

By contrast, the problems fixed in r117417 were due to incorrect setup
of the glyph row in the text area, not to incorrect drawing.

> (1) C-u C-h t hebrew RET
> 
> (2) C-x 3                              (gives hscroll-0.png)
> 
> (3) M-: (set-window-hscroll nil 1)     (gives hscroll-1.png)
> 
> (4) M-: (set-window-hscroll nil 2)     (gives hscroll-2.png)
> 
> (5) M-: (set-window-hscroll nil 1)     (gives hscroll-3.png)
> 
(Continue reading)

Drew Adams | 28 Aug 23:18 2014
Picon

feature request: text property to prevent font-locking

Excuse me if I'm missing something that is already available.
And in that case, please let me know what it is, so I can use it.

I want to apply some ad-hoc highlighting with text property `face'
in a font-locked buffer (whether font-locking occurs before or after
I apply `face' for this highlighting).

I do not want font-lock to override this highlighting.  I do not want
to use `font-lock-keywords' (e.g. with KEEP) in order to create this
highlighting.  I just want to prevent font-lock from overriding it.

I want to apply some other text property to the highlighted text, to
tell font-lock not to fiddle with it ("hands off this text").

1. Does this possibility already exist in Emacs?  I looked but didn't
   find anything.

2. If not, can we please add it?

Wrt #2:

Years ago I added this feature to code that I use.  It works for me,
but I don't claim that the way I implemented it is the way to go.

The code I use is here:
http://www.emacswiki.org/emacs-en/download/font-lock%2b.el

Essentially I did this:

1. Defined function `put-text-property-unless-ignore', which is the
(Continue reading)

Ken Brown | 27 Aug 19:15 2014
Picon

Gnulib ACL wrappers

Paul,

This is a followup to a discussion on the Cygwin list.  See 
https://cygwin.com/ml/cygwin/2014-08/msg00531.html, and perhaps one or 
two earlier messages in the thread if you need more context.

Although Cygwin has Solaris ACL functions, emacs doesn't use these in 
fileio.c.  Shouldn't the Gnulib ACL wrappers provide support for these? 
  Or is there something needed in Cygwin to make this work?

Here's what's in config.h concerning ACLs:

#define EMACS_CONFIG_FEATURES "DBUS ACL GNUTLS LIBXML2 ZLIB"
/* #undef HAVE_ACLSORT */
/* #undef HAVE_ACLV_H */
/* #undef HAVE_ACLX_GET */
/* #undef HAVE_ACL_COPY_EXT_NATIVE */
/* #undef HAVE_ACL_CREATE_ENTRY_NP */
/* #undef HAVE_ACL_DELETE_DEF_FILE */
/* #undef HAVE_ACL_DELETE_FD_NP */
/* #undef HAVE_ACL_DELETE_FILE_NP */
/* #undef HAVE_ACL_ENTRIES */
/* #undef HAVE_ACL_EXTENDED_FILE */
/* #undef HAVE_ACL_FIRST_ENTRY */
/* #undef HAVE_ACL_FREE */
/* #undef HAVE_ACL_FREE_TEXT */
/* #undef HAVE_ACL_FROM_MODE */
/* #undef HAVE_ACL_FROM_TEXT */
/* #undef HAVE_ACL_GET_FD */
/* #undef HAVE_ACL_GET_FILE */
(Continue reading)

Dmitry Antipov | 27 Aug 15:09 2014
Picon

Unused/obsolete `last-code-conversion-error'?

AFAICS `last-code-conversion-error' is untouched and unused since 2009
(probably it was never really used), and maintaining it just adds some
overhead to important coding.c routines.  OK to install something like this?

Dmitry
Alan Schmitt | 27 Aug 08:45 2014

Small patch for gnus nnimap.el

Hello,

I posted this on gnus.general a couple weeks ago, but nobody
replied. I'm thus wondering if emacs.devel might be a better place to
send gnus patches. If not, could you please direct me to the correct
place?

As I'm trying to make the registry working with expiration, I think
I found a bug in nnimap.el. Here is the code in question.

#+begin_src emacs-lisp
(defun nnimap-process-expiry-targets (articles group server)
  (let ((deleted-articles nil))
    (cond
     ;; shortcut further processing if we're going to delete the articles
     ((eq nnmail-expiry-target 'delete)
      (setq deleted-articles articles)
      t)
     ;; or just move them to another folder on the same IMAP server
     ((and (not (functionp nnmail-expiry-target))
	   (gnus-server-equal (gnus-group-method nnmail-expiry-target)
			      (gnus-server-to-method
			       (format "nnimap:%s" server))))
      (and (nnimap-change-group group server)
	   (with-current-buffer (nnimap-buffer)
	     (nnheader-message 7 "Expiring articles from %s: %s" group articles)
	     (nnimap-command
	      "UID COPY %s %S"
	      (nnimap-article-ranges (gnus-compress-sequence articles))
	      (utf7-encode (gnus-group-real-name nnmail-expiry-target) t))
(Continue reading)

Drew Adams | 25 Aug 22:07 2014
Picon

Why was `transient-mark-mode' turned off for `delete-selection-mode'?

I came across this item in NEWS:

** Delete Selection mode can now be used without Transient Mark mode.

"Can now be"?  That sounds positive, as if we are adding some new
possibility that is useful.  Are we?

Why would we do this - what is the use case?  Why should
`delete-selection-mode' no longer enable transient-mark-mode'?

Have we had requests from users who turn off `transient-mark-mode',
asking to be able to use `delete-selection-mode' without seeing
the selection?

I've searched a bit for a discussion about this, in emacs-devel and
in the bug list, but I didn't find anything related.  I searched around
the time of the change, which was apparently made on 2013-12-11, with
this commit:
http://bzr.savannah.gnu.org/lh/emacs/trunk/revision/115459

Stefan Monnier2013-12-11 14:42:34
Revision ID: monnier <at> iro.umontreal.ca-20131211144234-evm5nwt04uoggorp
* lisp/delsel.el (delete-selection-mode): Don't enable transient-mark-mode.
(delete-selection-helper): Make sure yank starts at the top of the
deleted region.
(minibuffer-keyboard-quit): Use region-active-p.

So far, this change doesn't sound like a very good idea to me, but I
would like to know more about it, in particular the rationale for it.  

(Continue reading)

Dmitry Antipov | 25 Aug 16:46 2014
Picon

[RFC] sigaltstack + longjmp to protect from C stack overflow

This is an experimental and most probably non-portable method to handle
C stack overflow by using well-known sigaltstack/siglongjmp approach.
This can help if someone do something like:

(setq max-specpdl-size 83200000
       max-lisp-eval-depth 640000)

(defun f1 () (f1))

(f1) ==> Re-entering top level after C stack overflow

Comments?

Dmitry
Attachment (c_stack_overflow.patch): text/x-patch, 4908 bytes
Dmitry Antipov | 25 Aug 06:05 2014
Picon

Re: [Emacs-diffs] trunk r117726: Add string collation.

As of r117732, --enable-gcc-warnings leads to:

../../trunk/src/sysdep.c:3527:1: error: no previous prototype for ‘str_collate’ [-Werror=missing-prototypes]
  str_collate (Lisp_Object s1, Lisp_Object s2)
  ^
cc1: all warnings being treated as errors

Dmitry

Alin Soare | 25 Aug 04:26 2014
Picon

Midnight Commander Quick View


I needed quick view option, like in midnight commander, and I wrote this
code. 

I want to ask if you know something that already exists and does a
similar job. My code is not complete -- for example, for large files, I
want to see only the header, not to load all the file.

In my emacs this code works as I expect to work. I did not test it
outside -- but it should work as well.

---

(setq lexical-binding t)
(require 'dired)

(defun qv-update ()
  (let ((f (dired-get-filename t t)))
    (when (and (stringp f) (file-regular-p f)
               (< (nth 7 (file-attributes f)) 1e7))
      (when (not (equal (window-buffer)
                        (save-window-excursion
                          (window-buffer (other-window 1)))))
        (save-window-excursion
          (other-window 1)
          (and buffer-read-only
               (not (buffer-modified-p))
               (kill-buffer (window-buffer)))))
      (view-file-other-window f)
       (other-window 1))))
(Continue reading)

Nic Ferrier | 24 Aug 22:43 2014
Picon

capturing backtraces

I want to capture the backtrace that was current at the time of an error
into a list, string or buffer.

Something like:

  (condition-case err
     (thing-that-causes-errors)
    (error (setq saved-backtrace 
              (way-to-get-backtrace-from-error err))))

Where the function way-to-get-backtrace-from-error represents a function
that can get the backtrace from an error.

Anyone have a clue how I can do that?

I asked this question before and Stefan referred me to
macroexp--backtrace
(http://lists.gnu.org/archive/html/emacs-devel/2014-05/msg00268.html)
which uses backtrace-frame. That function doesn't seem to be able to get
the backtrace from the point of the error though:

 (defun nic-error ()
   (let ((x 1))
     (error "MEH")))

 (condition-case err
     (nic-error)
   (error (backtrace-frame 1)))

 => (nil condition-case err (nic-error) (error (backtrace-frame 1)))
(Continue reading)


Gmane